cancel
Showing results for 
Search instead for 
Did you mean: 

Which jar to include com.sap.sql.log.OpenSQLException

Former Member
0 Kudos

Hi all,

when I get an SQLException using sqlj I get the above named Exception and the class is not found in the application context:

javax.servlet.ServletException: I/O operation failed : java.lang.ClassNotFoundException: com.sap.sql.log.OpenSQLException

Found in negative cache

-


Loader Info -


ClassLoader name: [sap.com/transparenz-ear]

Parent loader name: [Frame ClassLoader]

References:

common:service:http;service:servlet_jsp

service:ejb

....

That makes Exception-handling in my application pretty difficult.

I have searched the available jars but haven't found one that includes this class.

Who can help ?

Regards, Astrid

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Astrid,

You can use local interfaces to access EJBs from a servlet. In our server, the EJB is always in the same JVM as the servlet that makes use of it. Therefore, there is no need to use remote interfaces for the communication between the web and the ejb container.

By the way, what is your opinion on SQLJ?

Regards,

Christian

0 Kudos

Hi Astrid,

There is a known issue with com.sap.sql.log.OpenSQLException and serialization. Let me guess what you are doing. Probably, you use SQLJ within an EJB that is accessed via its remote interface from a servlet/jsp. If this is the case, you can avoid the error by

(1) Using local interfaces

(2) Catching and dealing with the OpenSQL exception directly in the EJB.

Regards,

Christian

Former Member
0 Kudos

Hi,

thanks a lot for your reply! I really didn't understand it in the first place.

Yes, I am calling SQLJ-classes from an EJB using the remote interface. It is possible to use local interfaces from a client ? I thought that works only within the server.

My problem arises when I catch the SQL-Exception and try to access the message of the error. My users are a bit prissy about errors without speaking messages. Therefore I try to give them a hint about the original problem. But that is ok for the time being.

Best Regards, Astrid