Suma C S

Greenhorn
+ Follow
since Aug 22, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Suma C S

I am using WSAD 5.1.2. I have an EJB deployed on to Test server(5.1). I can look up this EJB from the web project.
Now, I want to look up this EJB from J2EE application client project which has a java file with a main method.
I get the following exception when I run my java program with main method.

Note **: This works in WSAD 5.0.0 with a 5.0 test server.

I have put the runtimes/lib , runtimes/properties , namingclient.jar, j2ee.jar ... in the classpath. What's missing?

javax.naming.NamingException: The JNDI operation "lookup"on the context "localhost/nodes/localhost/servers/server1" with the name "ejb/FederalListHome" 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:360)
at com.fifththird.ebusiness.csoo.dataload.InvokeFederalLoad.main(InvokeFederalLoad.java:56)

Pls. help !!
20 years ago
The JNDI name is correct except that it should not start with a slash.
I changed that to "ejb/com.fi...." and it worked. :-))
My J2EE client is running in WSAD 5.0.0. My EJB is deployed on Websphere 5.0 Test Server in WSAD.

Here is the snippet of my code:
InitialContext context = new InitialContext(); Object objref = context.lookup("/ejb/com/fifththird/ebusiness/csoo/dataload/ejb/DataLoadServiceHome"); Object obj = PortableRemoteObject.narrow(objref, DataLoadServiceHome.class); DataLoadServiceHome home = (DataLoadServiceHome) obj; DataLoadService dataLoadService = home.create(); dataLoadService.loadFederalNoCall();

The exception is: javax.naming.NameNotFoundException: /ejb/com/fifththird/ebusiness/csoo/dataload/ejb/DataLoadServiceHome at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1503) at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1457) at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1167) at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132) at javax.naming.InitialContext.lookup(InitialContext.java:359) at com.fifththird.ebusiness.csoo.dataload.InvokeFederalLoad.main(InvokeFederalLoad.java:65) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:616) at com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:420) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)

Please let me know how the problem can be resolved?
I'm using WSAD 5.0.0. to develop Enterprise java application and connecting to DB2 7.2 using Default DB2 JDBC Provider (COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource).
One of the EJBs (EJB 2.0) invokes another java class (DAO) which inturn executes a set of sql statements.
The EJB is a stateless Session bean with Container Managed Txn. Container Txn type is Required.
IN the DAO, I am setting autoCommit(false). rollback() or commit()is executed based on the results of the query.
However, roll back is not happening in case of an exception (SQLException).

Please let me know where I am wrong.

Thanks
20 years ago