Skip to Content
author's profile photo Former Member
Former Member

Which jar to include

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:

Found in negative cache


Loader Info -

ClassLoader name: []

Parent loader name: [Frame ClassLoader]





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 a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

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

    Hi Astrid,

    There is a known issue with 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.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member


      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?



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.