I am in the process of using the default JMS of WAS 6.1 rather than MQ.
I have setup the connection factory and downloaded the sibc_install-o0635.08.jar and did the steps mentioned at the following url http://www-1.ibm.com/support/docview.wss?uid=swg24012804
I use sun JDK 1.5
But I am getting some corba exception
Here is the code I am using for connection in my client
Context ctx = null;
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
p.put(Context.PROVIDER_URL, "iiop://smage:2809");
p.put("java.naming.security.principal", "webjms" );
p.put("java.naming.security.credentials", "webjms" );
p.put("java.naming.corba.orb",org.omg.CORBA.ORB.init());
Caused by: java.lang.ClassCastException
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:85)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:174)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:97)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:73)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:386)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:305)
.. 36 more
I have added all the three jars sibc.orb.jar,sibc.orb.jar,sibc.jms.jar in classpath of my client app.
I am also getting a naming not found exception.
Can some one please tell me what all jars are required for making a standalone JMS client for WAS 6.1 and the steps to do it
Regards
George S
<joj...@hotmail.com> wrote in message
news:604849786.1163776671...@ltsgwas010.sby.ibm.com...
> I have added all the three jars sibc.orb.jar,sibc.orb.jar,sibc.jms.jar in classpath of my client app.
> I am also getting a naming not found exception.
>
> Can some one please tell me what all jars are required for making a standalone JMS client for WAS 6.1 and the steps to do it
Did you use the "jms_jndi_sun" install option ?
sibc.jndi.jar, sibc.orb.jar and sibc.jms.jar in the lib folder
I get a Naming not found exception
Here is the code and stack trace
Context ctx = null;
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
p.put(Context.PROVIDER_URL, "iiop://seb-xp:2809");
p.put("java.naming.security.principal", "webuser" );
p.put("java.naming.security.credentials", "webuser" );
//p.put("java.naming.corba.orb",org.omg.CORBA.ORB.init());
//p.put("com.ibm.CORBA.ORBInit",com.ibm.ws.sib.client.ORB.class);
//p.put("java.naming.corba.orb",com.ibm.ws.sib.client.ORB.getORB ());
try {
ctx = new InitialContext(p);
if (null != ctx)
System.out.println("GOT Naming context");
TopicConnectionFactory topicConnectionFactory = (TopicConnectionFactory) ctx
lookup("MY_TOPIC_CONNECTIONFACTORY"); //$NON-NLS-1$
javax.naming.NameNotFoundException: Context: kalau01-xpNode01Cell/nodes/seb-xpNode01/servers/server1, name: jms/MY_TOPIC_CONNECTIONFACTORY: First component in name MY_TOPIC_CONNECTIONFACTORY not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
at com.ibm.ws.naming.jndicos.CNContextImpl.processNotFoundException(CNContextImpl.java:4392)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1752)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1707)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1412)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1290)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:145)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at jms.samples.Publisher.main(Publisher.java:88)
Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:72)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:4043)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1746)
... 6 more
Did you try using the corbaloc format of the provider URL?
env.put(Context.PROVIDER_URL, "corbaloc:iiop:myhost.mycompany.com:2809");
I have tried with with corbaloc... and advanced a bit further.
Now if I do a Context.lookup("Connection Factory Name") instead of connection factory instance (expected one) I am getting javax.naming.Reference instance.
Any clues on this
Regards
George S
That sounds right to me - you are getting an initial context from JNDI.
You need to use that initial context to lookup your JMS objects. See here:
I am afraid I am taking you to the wrong direction.
Let me explain it again.
Now I am able to connect.
After that I use the InitialContext object to do a lookup
InitailContext ctxt = //initialized
.
.
.
Now TopicConnectionFactory factory = ctxt.lookup("Fact_NAME");
Here I expect the lookup to give me an instance of TopicConnectionFactory but I get a class cast exception.
When I investigated in detail I found that the ctxt.lookup("Fact_NAME"); is giving me an instance of javax.naming.Reference instead of TopicConnectionFactory
I am unable to identify the cause of this
Please help
Regards
George S
Regards,
David
Thanks a lot for your reply
I have added sibc.jndi.jar, sibc.orb.jar and sibc.jms.jar in the lib of the extracted client jar to the classpath.
Is there any other classes which is required to be added to classpath to get TopicFactory instance
Is there any specific property to be set before I create an InitialContext Object
for connecting to WAS I have added the normal properties as mentioned in my previous post in the same thread.
Regards
George S
Regards,
David
I have added three more jars to classpath
com.ibm.ws.runtime_6.1.0.jar,
com.ibm.mqjms.jar
com.ibm.mq.jar
I have been able to advance a bit further.
Now I could create an instance of TopicConnectionFactory
After that when I try to create a TopicConnection I get the following error
Exception in thread "main" java.lang.NoClassDefFoundError: javax/resource/spi/ApplicationServerInternalException
at com.ibm.mq.jms.MQConnection.<init>(MQConnection.java:336)
at com.ibm.mq.jms.MQTopicConnection.<init>(MQTopicConnection.java:103)
at com.ibm.mq.jms.MQTopicConnectionFactory.createMQTopicConnection(MQTopicConnectionFactory.java:378)
at com.ibm.mq.jms.MQTopicConnectionFactory.createMQTopicConnection(MQTopicConnectionFactory.java:309)
at com.ibm.mq.jms.MQTopicConnectionFactory.createTopicConnection(MQTopicConnectionFactory.java:198)
at jms.samples.Publisher.main(Publisher.java:58)
Any idea why this happens
Regards
George S
I thought you were using SI Bus, not MQ ?
I tried using SI Bus initially and was totally lost and then I posted in developerworks.
Later I tried creating a TopicConnectionFactory in V5 default JMS provider rather than the default JMS provider.
By doing in that fashion I have been able to get away with Naming not found issue.
Since I advanced a bit in that then I thought of using the same for my purpose.
I wanted to use SI Bus only but couldn't get through.
I did not want to create a separate ApplicationClient instead I wanted to access the JMS by using simple Java application.
It would be great if some one can help me in getting some more information on configuring default JMS provider using SI Bus for TopicConnection
Regards
george S
Regards,
David
I have started using v6 messaging using SI Bus
Now I get the following error after look up and try to create a topic connection
Example configuration failed :CWSIA0241E: An exception was received during the call to the method JmsManagedConnectionFactoryImpl.createConnection: com.ibm.websphere.sib.exception.SIResourceException: CWSIT0006E: It is not possible to connect to bus MyBus because the following bootstrap servers could not be contacted [localhost:7276:BootstrapBasicMessaging] and the following bootstrap servers returned an error condition []. See previous messages for the reason for each bootstrap server failure..
javax.jms.JMSException: CWSIA0241E: An exception was received during the call to the method JmsManagedConnectionFactoryImpl.createConnection: com.ibm.websphere.sib.exception.SIResourceException: CWSIT0006E: It is not possible to connect to bus ECMIB because the following bootstrap servers could not be contacted [localhost:7276:BootstrapBasicMessaging] and the following bootstrap servers returned an error condition []. See previous messages for the reason for each bootstrap server failure..
at com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl.createConnection(JmsManagedConnectionFactoryImpl.java:240)
at com.ibm.ws.sib.api.jms.impl.JmsTopicConnectionFactoryImpl.createTopicConnection(JmsTopicConnectionFactoryImpl.java:152)
at com.ibm.ws.sib.api.jms.impl.JmsTopicConnectionFactoryImpl.createTopicConnection(JmsTopicConnectionFactoryImpl.java:116)
at jms.samples.Publisher.main(Publisher.java:58)
Caused by: com.ibm.websphere.sib.exception.SIResourceException: CWSIT0006E: It is not possible to connect to bus MyBus because the following bootstrap servers could not be contacted [localhost:7276:BootstrapBasicMessaging] and the following bootstrap servers returned an error condition []. See previous messages for the reason for each bootstrap server failure.
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.bootstrapRequest(TrmSICoreConnectionFactoryImpl2.java:607)
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.remoteBootstrap(TrmSICoreConnectionFactoryImpl2.java:404)
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.createConnection(TrmSICoreConnectionFactoryImpl2.java:239)
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.createConnection(TrmSICoreConnectionFactoryImpl2.java:144)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createCoreConnection(JmsJcaConnectionFactoryImpl.java:545)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createCoreConnection(JmsJcaConnectionFactoryImpl.java:481)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createConnection(JmsJcaConnectionFactoryImpl.java:302)
at com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl.createConnection(JmsManagedConnectionFactoryImpl.java:206)
... 3 more
Any insights on this
Regards
George S
When the factory is used in a client context (or in a server context outside
the bus' cell), this information is used to connect the client to a server
offering a SI Bus service as a bootstrap mechanism. The default value will
work if the client is running on the same box as a server whose sib service
is offered on the default sib inbound address (i.e. localhost and port
7276). If these conditions are not met you'll have to enter a different
provider endpoint setting in the connection factory.
To offer a sib bootstrap service the target server must be a member of a bus
(or have had its sib service explicitly enabled).
If you think the error message is incorrect and that the necessary
conditions are met, then we'd have to look at a trace of the underlying
connection attempt to see if that was informative.
--
Stephen Cocks
WESB/WPS System Administration
<joj...@hotmail.com> wrote in message
news:744572606.1164619654...@ltsgwas010.sby.ibm.com...
When we encountered the same exception, we used a JMS client to resolve
this problem. You can find the same from the following location:
http://www.alphaworks.ibm.com/tech/jmsclient
Hope this helps.
Regards,
-Krishna Menon B.
NCR / Teradata, Hyderabad.
My environment is like this
I have WAS 6.1 set up on m/c geotest1
I have created a SI Bus by name MyBus I have created a Topic Connection factory MY_TCF in the same bus have the following configuration for bus and TCF
Bus Details
Name = MyBus
Configuration reload enabled =enabled
In Bus members I Have
Name= geotest1Node01:server1
Type = Server
It has a message engine and is in started state
Topic Connection Factory details
Name =MY_QCF
JNDI Name = MY_QCF
Provider = Default messaging provider
Scope =Node=geotest1Node01,Server=server1
Bus Name = MyBus
Target significance =Preferred
Target inbound transport chain =<blank>
Provider endpoints 155.35.36.173:7276:BootstrapBasicMessaging (Ip address of geotest1)
Connection proximity =Bus
Client identifier =<blank>
Every thing else is default.
Now I try to create a TopicConnection from another machine geodev1
In this machine I have only the client jars
sibc.orb, sibc.jms and sibc.jndi
After doing all this and when I run my client program I get the following exception
Can you please guide me in which direction shall I proceed
GOT Naming context
javax.jms.JMSException: CWSIA0241E: An exception was received during the call to the method JmsManagedConnectionFactoryImpl.createConnection: com.ibm.websphere.sib.exception.SIResourceException: CWSIT0006E: It is not possible to connect to bus MyBus because the following bootstrap servers could not be contacted [] and the following bootstrap servers returned an error condition [155.35.36.173:7276:BootstrapBasicMessaging]. See previous messages for the reason for each bootstrap server failure..
at com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl.createConnection(JmsManagedConnectionFactoryImpl.java:240)
at com.ibm.ws.sib.api.jms.impl.JmsTopicConnectionFactoryImpl.createTopicConnection(JmsTopicConnectionFactoryImpl.java:152)
at jms.samples.Publisher.main(Publisher.java:57)
Caused by: com.ibm.websphere.sib.exception.SIResourceException: CWSIT0006E: It is not possible to connect to bus MyBus because the following bootstrap servers could not be contacted [] and the following bootstrap servers returned an error condition [155.35.36.173:7276:BootstrapBasicMessaging]. See previous messages for the reason for each bootstrap server failure.
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.bootstrapRequest(TrmSICoreConnectionFactoryImpl2.java:607)
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.remoteBootstrap(TrmSICoreConnectionFactoryImpl2.java:404)
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.createConnection(TrmSICoreConnectionFactoryImpl2.java:239)
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.createConnection(TrmSICoreConnectionFactoryImpl2.java:144)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createCoreConnection(JmsJcaConnectionFactoryImpl.java:545)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createConnection(JmsJcaConnectionFactoryImpl.java:440)
at com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl.createConnection(JmsManagedConnectionFactoryImpl.java:209)
... 2 more
Regards
George S
We are getting the same problem , could you please share your resolution of the issue.
Answer looks like pretty much a solution.
>..conditions are not met you'll have to enter a different
>provider endpoint setting in the connection factory.
>To offer a sib bootstrap service the target server must be a member of a bus
>(or have had its sib service explicitly enabled).
I am pretty new to JMS and things, We all would love if you could tell us how to actually do it. Its a little obscure.
TIA
cheers...
Did you check the following ?
http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg21195691
http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg21211800
http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg21199330
If you are using the admin console to create the connection factory then
type in the correct value for the provider endpoints in the relevant field.
If you are using a Jacl or Jython script (wsadmin) to create the connection
factory, then use the "-providerEndPoints" option of the
createSIBJMSConnectionFactory command.
The value you will set will look something like
"otherhost:7276:BootstrapBasicMessaging" although to avoid a single point of
failure you can specify multiple such values separated by commas. There must
be an application server at "otherhost:7276" which is a member of the bus
you are trying to connect to. The port number will be whatever is shown as
the "SIB_ENDPOINT_ADDRESS" port in the server's port list (7276 is the
default). If the bus is enabled for security then you'll need to use
BootstrapSecureMessaging and the port SIB_ENDPOINT_SECURE_ADDRESS.
If you're using a wsadmin script but not using the
createSIBJMSConnectionFactory command, or need more help, post back here
with the full details of how you currently define the connection factory.
PS. Which client environment are you using? The original posting here
related to the Client for JMS on J2SE with WebSphere Application Server
which is a downloadable option.
--
Stephen Cocks
WESB/WPS System Administration
<navnith...@satyam.com> wrote in message
news:915662698.1178599955...@ltsgwas009.sby.ibm.com...