Forum Stats

  • 3,816,046 Users
  • 2,259,133 Discussions
  • 7,893,368 Comments

Discussions

Java stored procedure NoClassDefFoundError

Ramesh_R
Ramesh_R Member Posts: 162
edited Feb 6, 2010 3:54AM in SQL & PL/SQL
Hi All,
I have a webservice client created using Jdeveloper.
When tried to run the client in JDeveloper its running fine.
I have loaded the entire java class files into the Database.
I created a wrapper function in oracle and tried to invoke the webservice client its showing the Error
ORA- 298532: Java call terminated by uncaught java exception
java.lang.NoClassDefFoundError
I found in the user_objects and the class is available with 'VALID' status
What would be possible cause

Thanks,
Ramesh.R

Edited by: Ramesh_R on Feb 5, 2010 9:43 AM
Tagged:

Answers

  • Andreas Weiden
    Andreas Weiden Member Posts: 10,871 Gold Crown
    Have you also loaded the additional classes used by JDeveloper to handle the webservice into the db?

    Have a look at the project-properties in JDeveloper and check the Libraries attached to the project. These libraries also may be needed to be uploaded to the database.
  • Ramesh_R
    Ramesh_R Member Posts: 162
    Hi,
    I have loaded all the required jar files also in to the database.
    Actually i can able to connect to other webservices too, but not to a single webservice only...
    The trace for the error is
    >>
    java.lang.NoClassDefFoundError
    at HTTPClient.HTTPClientSSLFactory.class$(HTTPClientSSLFactory.java:68)
    at HTTPClient.HTTPClientSSLFactory.<clinit>(HTTPClientSSLFactory.java:69)
    >> at HTTPClient.HTTPConnection.getSSL(HTTPConnection.java:4080)
    >> at HTTPClient.HTTPConnection.getSSLSocket(HTTPConnection.java:4126)
    >> at HTTPClient.HTTPConnection.doConnect(HTTPConnection.java:3972)
    >> at HTTPClient.HTTPConnection.sendRequest(HTTPConnection.java:3007)
    >> at HTTPClient.HTTPConnection.handleRequest(HTTPConnection.java:2846)
    >> at HTTPClient.HTTPConnection.setupRequest(HTTPConnection.java:2638)
    >> at HTTPClient.HTTPConnection.Post(HTTPConnection.java:1110)
    >> at oracle.soap.transport.http.OracleSOAPHTTPConnection.post(OracleSOAPHTTPConnection.java:904)
    >> at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:713)
    >> at org.apache.soap.messaging.Message.send(Message.java:125)
    >>
  • MichaelS
    MichaelS Member Posts: 8,424 Bronze Crown
    I have loaded all the required jar files also in to the database.
    Did you verify e.g. with
    SELECT *
      FROM all_java_classes
     WHERE    LOWER (name) LIKE LOWER ('%HTTPClientSSLFactory%')
           OR LOWER (name) LIKE LOWER ('%HTTPConnection%')
           OR LOWER (name) LIKE LOWER ('%OracleSOAPHTTPConnection%')
    ?
    MichaelS
  • Ramesh_R
    Ramesh_R Member Posts: 162
    Hi Micheal,
    Thanks for the reply.
    I tested and found the HTTPClientSSLFactory is not available in my schema but available in sys. but then i loaded the http_client.jar in my schema also. Now too the error is coming :-(.. Bu the stack trace is now coming before two lines itself

    Attaching the stack trace
    java.lang.NoClassDefFoundError


    at HTTPClient.HTTPConnection.getSSL(HTTPConnection.java:4080)


    at HTTPClient.HTTPConnection.getSSLSocket(HTTPConnection.java:4126)


    at HTTPClient.HTTPConnection.doConnect(HTTPConnection.java:3972)


    at HTTPClient.HTTPConnection.sendRequest(HTTPConnection.java:3007)


    at HTTPClient.HTTPConnection.handleRequest(HTTPConnection.java:2846)


    at HTTPClient.HTTPConnection.setupRequest(HTTPConnection.java:2638)


    at HTTPClient.HTTPConnection.Post(HTTPConnection.java:1110)


    at oracle.soap.transport.http.OracleSOAPHTTPConnection.post(OracleSOAPHTTPConnection.java:904)


    at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:713)


    at org.apache.soap.messaging.Message.send(Message.java:125)
  • 609197
    609197 Member Posts: 73
    Hi Ramesh,

    Try to look into your Java code whether the classes have compiled properly and then load them into the jar.

    Thanks
  • Ramesh_R
    Ramesh_R Member Posts: 162
    Yes, the classes are in valid state

    Thanks,
    Ramesh.R
This discussion has been closed.