on 07-10-2015 7:18 PM
Can someone give us some guidance on correcting an issue we are having trying to get to get the context on for We are having an issue when trying to get the context for the MQ Server.
here is the code code that is causing the issues:
=====================================================
String tree; | |||||||||||||
env = new Hashtable(); | |||||||||||||
env.put( | Context.INITIAL_CONTEXT_FACTORY, | "com.ibm.websphere.naming.WsnInitialContextFactory"); |
// DEV2
env.put(Context.PROVIDER_URL, "corbaloc:iiop:LPCPBN396A.caremarkrx.net:2809"); | |||
context = new InitialContext(env); | |||
// Lookup the queue connection factory from the | |||
// initial context. |
qcf = (QueueConnectionFactory) context.lookup("JNDI_SAP_QMGR"); |
// Create a new queue connection from the queue | |||
// connection factory. | |||
conn = qcf.createQueueConnection(); | |||
// Start the connection | |||
conn.start(); | |||
// Lookup the queue to be used to send and receive | |||
// messages from the initial context. | |||
q = (Queue) context.lookup("JNDI_SAP_ALLOC"); |
// Set Reply Queue | |||
replyq = (Queue) context.lookup("JNDI_SAP_INDUCT"); |
=============================================================
When the following statement is executed,
qcf = (QueueConnectionFactory) context.lookup("JNDI_SAP_QMGR"); |
we get the following failure::
Exception in thread "P=121133:O=0:CT" java.lang.NoClassDefFoundError: com.ibm.ffdc.Manager
at com.ibm.ws.naming.util.RasUtil.logException(RasUtil.java:164)
at com.ibm.ws.naming.util.RasUtil.logException(RasUtil.java:72)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:398)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:462)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:128)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:765)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at javax.naming.InitialContext.lookup(InitialContext.java:436)
at CalltoQL2.openQ(CalltoQL2.java:281)
at CalltoQL2.step1SimpleServer(CalltoQL2.java:219)
at CalltoQL2.main(CalltoQL2.java:477)
Caused by: java.lang.ClassNotFoundException: com.ibm.ffdc.Manager
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:688)
at java.lang.ClassLoader.loadClass(ClassLoader.java:667)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:650)
... 12 more
We have not been able to find a resolution for this issue. Please give me any assistance you can on resolving the issue. I have attached a copy of the complete code.
Hi Tommy,
this is not an issue with JCo 3.0, but a class loading issue in your environmenr. Obviously, the lookup of QueueConnectionFactory from JNDI requires the class com.ibm.ffdc.Manager to be visible for the application. You need to ensure that a jar with this class is part of your environment and either in the system classpath or som other fitting location.
Best regards,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.