3

I am new JMS, I have created sample JMS application.

Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
props.put(Context.PROVIDER_URL, "iiop://localhost:2809");
InitialContext context = new InitialContext(props);
QueueConnectionFactory qcf = (QueueConnectionFactory) context.lookup("jndi/testQF");
QueueConnection conn = qcf.createQueueConnection();
conn.start();
QueueSession session = (QueueSession) conn.createSession(false,Session.AUTO_ACKNOWLEDGE);
Queue t = (Queue) context.lookup("jndi/testQQ");

I have created buses testBus security is disabled , buses members, Queue Connection Factory testQF selected bus testBus. created queue as testQQ selected bus as testBus and selected testPP queue as queue name which was created service ingratiation Bus destination as point to point.

while running my app I am getting this error.

SEVERE: JSAS1480I: Security is not enabled because the ConfigURL property file is not set.
Apr 10, 2015 8:12:21 PM null null
WARNING: WSVR0072W: Ignoring undeclared override of interface, com.ibm.tx.jta.transactionManager, with implementation, com.ibm.ws.tx.jta.TranManagerSet
Apr 10, 2015 8:12:21 PM null null
WARNING: WSVR0072W: Ignoring undeclared override of interface, com.ibm.ws.transaction.TransactionInflowProxy, with implementation, com.ibm.ws.tx.jta.TransactionInflowProxyImpl
Apr 10, 2015 8:12:21 PM null null
WARNING: WSVR0072W: Ignoring undeclared override of interface, com.ibm.ws.transaction.UtxImpl, with implementation, com.ibm.ws.tx.jta.UserTransactionImpl
Apr 10, 2015 8:12:21 PM null null
WARNING: WSVR0072W: Ignoring undeclared override of interface, com.ibm.ws.transaction.XATerminator, with implementation, com.ibm.ws.tx.jta.TxXATerminator
Apr 10, 2015 8:12:21 PM null null
WARNING: WSVR0072W: Ignoring undeclared override of interface, com.ibm.ws.uow.UOWManager, with implementation, com.ibm.ws.uow.UOWManagerImpl
Apr 10, 2015 8:12:21 PM null null
INFO: Client code attempting to load security configuration
javax.naming.NameNotFoundException: Context: ADMINIB-3UJMQ4ENode01Cell/nodes/ADMINIB-3UJMQ4ENode01/servers/server1, name: jndi/testQF: First component in name testQF 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.mapNotFoundException(CNContextImpl.java:4564)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1822)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1777)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1434)
    at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:616)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
    at javax.naming.InitialContext.lookup(InitialContext.java:436)
    at MySender.main(MySender.java:31)
Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
    at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:95)
    at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:506)
    at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2958)
    at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2954)
    at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:871)
    at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2952)
    at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1818)
    ... 7 more

I am running my app from main method in j2ee project type is that an issue?? Please help me to fix this issue.

Thanks,

CVSR Sarma

  • `java.net.ConnectException: Connection refused: connect` you are using wrong port. The most likely it should be 2809, but you can check it via WebSphere admin console - go to `Application servers > server1 > Ports' and look for BOOTSTRAP_ADDRESS. – Gas Apr 10 '15 at 13:13
  • @Gas, Thanks for reply, port number 2809 is correct. I have verified it –  Apr 10 '15 at 18:43
  • I changed it iiop its started working. but now its throwing new execution. –  Apr 11 '15 at 00:26
  • `name: jndi/testQF: First component in name testQF not found` - you either have different jndi name for your queue connection factory than `jndi/testQF`, or you connect to a different server. – Gas Apr 11 '15 at 00:54
  • @Gas, I have copied pasted form my admin console. I am 200% sure its correct jndi name. can we attached screen shots in stackoverflow? –  Apr 11 '15 at 01:01
  • Resteart server and in the `SystemOut.log` verify that your qcf is bound to jndi: `[] 00000001 ResourceMgrIm I WSVR0049I: Binding myQCF as jms/myQCF` – Gas Apr 11 '15 at 10:51

0 Answers0