ejb is deployed in remote server on was 6.1
Hashtable table = new Hashtable();
table.put(InitialContext.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
table.put(InitialContext.PROVIDER_URL, "corbaloc:iiop:iedaau004.txaccess.net:4066");
InitialContext ctx = new InitialContext(table);
Object object = ctx.lookup("ejb/XX/service/XXXServiceHome");
XXServiceHome home = (XXXServiceHome)PortableRemoteObject.narrow(object,XXServiceHome.class);
XXService XXXService = home.create();
This code fails during lookup
Jun 5, 2009 6:07:15 PM com.ibm.ws.naming.util.Helpers
WARNING: jndiNamingException
Exception in thread "P=230214:O=0:CT" javax.naming.NamingException: The JNDI operation "lookupExt"on the context "iedaau004Cell01/nodes/iedaau004Node01/servers/portalServices01" with the name "ejb/TOSServiceHome" failed. Please get the root cause Throwable contained in this NamingException for more information. [Root exception is java.lang.NoSuchMethodError: com/ibm/websphere/pmi/reqmetrics/PmiReqMetrics.isComponentEnabled(II)Z]
at com.ibm.ws.naming.util.Helpers.logJndiContextException(Helpers.java:1330)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1566)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1354)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:172)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at test.JEJBTest61.getTOS(JEJBTest61.java:34)
at test.JEJBTest61.main(JEJBTest61.java:19)
Caused by: java.lang.NoSuchMethodError: com/ibm/websphere/pmi/reqmetrics/PmiReqMetrics.isComponentEnabled(II)Z
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1501)
... 5 more
How do I fix this?
What is the classpath for you EJB thin client? Does it include the com.ibm.ws.ejb.thinclient_6.1.0.jar file from the WAS_HOME/runtimes directory? This jar file should contain the PmiReqMetrics class file with the isComponentEnabled method. If not, then there may be a bug...
Hope this helps,
Andy
The client java project included other projects as reference
The other project was an ejb project which had anothere java utility project in reference
that last project had 5.1 as WAS runtime
some how the export order made was 5.1 as top priority in classpath order, even though current ejb client java project specifies it as 6.1
so it was probably not even looking at thin client jar!
surely enough PmiReqMetrics is not there in 6.1