Skip to Content
author's profile photo
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Posted on Jun 29, 2004 at 07:18 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Posted on Jun 30, 2004 at 12:40 PM

    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

    Add comment
    10|10000 characters needed characters exceeded