I have a servlet that calls a method from an EJB
but unfortunatly I get the following error message:
Exception: java.rmi.ServerException: RemoteException occurred in server
thread; nested exception is:
com.ibm.ejs.container.UncheckedException: ; nested exception is:
com.ibm.websphere.csi.CSIException: Failed to start transaction
[00.12.11 15:00:04:071 CET] 45d051 ServletInstan X Uncaught service()
exception thrown by servlet {0}: {1}
"SecurityTest2"
javax.servlet.ServletException
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at javax.servlet.ServletException.<init>(ServletException.java:73)
etcetera
has anyone seen this before?, how do I solve it?
this is the code of my servlet that calls the EJB
//Initial Context
javax.naming.InitialContext initContext = null;
java.util.Hashtable properties = new java.util.Hashtable(2);
properties.put(javax.naming.Context.PROVIDER_URL, "iiop://suntest:900");
//Home interface
SecurityHome securityHome = null;
//Remote Interface
Security sec = null;
try {
initContext = new javax.naming.InitialContext(properties);
}
catch (javax.naming.NamingException ne) {
System.out.println("Exception: " + ne);
}
try {
//JNDI lookup
java.lang.Object ref = initContext.lookup("test/npottrain/ejb/Security");
securityHome =
(SecurityHome) javax.rmi.PortableRemoteObject.narrow(ref,
SecurityHome.class);
sec = securityHome.create();
}
catch (javax.naming.NamingException ne) {
System.out.println("Exception: " + ne);
}
catch (java.rmi.RemoteException re) {
System.out.println("Exception: " + re);
}
catch (javax.ejb.CreateException ce) {
System.out.println("Exception: " + ce);
}
// Setting Name value
try {
sec.setName("PIPO");
}
catch (java.rmi.RemoteException re) {
System.out.println("Exception: " + re);
}
thanks in advance
Nicolas