Hi, I have developed a TestClient and an EJB module in WSAD 5.1(web sphere studio application developer). ( The ejb module has only stateless session beans. I'm accessing DB2 8.1 database from the session bean using type-4 jdbc driver)
It runs fine when i run the testclient as "Websphere v5.1 Application Client". But when i run it as "Java Application", i'm getting a NamingException. This same exception occurs when i generate an ear, deploy it on WebSphere and run the application.
The error stack-trace is as follows :
javax.naming.NamingException: The JNDI operation "lookup"on the context "localhost/nodes/localhost/servers/server1" with the name "ejb/com/thbs/PiggyBank/session/BankSessionHome" failed. Please get the root cause Throwable contained in this NamingException for more information. Root exception is java.lang.NoClassDefFoundError: com/ibm/ejs/jts/jts/CurrentFactory at com.ibm.ws.naming.jndicos.CNContextImpl.suspendTransaction(CNContextImpl.java:4064) at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3521) at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1565) at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525) at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225) at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132) at javax.naming.InitialContext.lookup(InitialContext.java:359) at com.thbs.PiggyBank.TestClient.getReferences(TestClient.java:61) at com.thbs.PiggyBank.TestClient.main(TestClient.java:628)
Observe one thing here : it's trying to lookup on server1 while i'm running my application on other server with different ports(http,bootstrap,etc all dirrerent ports). Server1 is another server running on Websphere in my system, while i'm trying to run my application in another server in WebSphere Studio, with different ports. But this doesn't seem to be important, because i tried running the application after stopping the WebSphere srever, with same error.