cancel
Showing results for 
Search instead for 
Did you mean: 

problem with Oracle DB in EJB

Former Member
0 Kudos

Hi experts,

I am doing Oracle DB application with EJB. I have written in following connection method in EJB. I am using stateless session bean


  Class.forName("oracle.jdbc.driver.OracleDriver");
 con = DriverManager.getConnection("jdbc:oracle:thin:@<>:<>:<>", "<>","<>");

While calling this method in webdynpro controller i got a following exception

com.sap.engine.services.rmi_p4.exception.P4BaseRuntimeException: I/O operation failed : java.io.NotSerializableException: com.sap.engine.services.dbpool.cci.ConnectionHandle :

I have added project reference as well as webdynpro references!!!

I am calling the connection method in controller

		String lookupString ="sap.com/<sampleBean>/<sampleEAR>";
		Object obj = ctx.lookup(lookupString);
		sampleHome ejbHome =(sampleHome ) javax.rmi.PortableRemoteObject.narrow(obj,sampleHome .class);
		sampleHome simpleEjb = ejbHome.connection ();

The same scenario I successfully done in webdynpro itself.If i execute the above connection method in Webdynpro, it is successfully executed and access the Oracle DB!!

If i Use EJB i got a above exception? how to resolve this issue? give your solutions!!

Regards,

Manivannan P

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi experts,

Problem got resolved once restart the server

Regards,

Manivannan P