how to apply the correct library on Linux RH6.0
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Hien_Trinh
Posted On:   Wednesday, March 20, 2002 02:01 AM

My servlet try to get a document stored in the Oracle database en display it in a separate window. I used the API ResultSet.GetBlob to get the object. Compiled with jsdk1.3.1 under Linux RH6.0 is OK. But when I execute it via the webpage by clicking on the link which will call the servlet, the folowing error occured: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, you@your.address and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. -----------------   More>>

My servlet try to get a document stored in the Oracle database en display it in a separate window. I used the API ResultSet.GetBlob to get the object. Compiled with jsdk1.3.1 under Linux RH6.0 is OK. But when I execute it via the webpage by clicking on the link which will call the servlet, the folowing error occured:



Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, you@your.address and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

----------------------------------------
Apache/1.3.9 Server at www.kences.nl Port 80


the error log provided the information:


java.lang.NoSuchMethodError: java.sql.ResultSet: method getBlob(Ljava/lang/String;)Ljava/sql/Blob; not found



at org.apache.jserv.JServConnection.processRequest(JServConnection.java:320)

at org.apache.jserv.JServConnection.run(JServConnection.java:188)

at java.lang.Thread.run(Thread.java)


It seem to me that the interface getBlob(string) doesn't supported in this version I used. So how can I get or applied the correct one? Or Is this just a probleem of setting correct environment?




Thank you all for your valuarabled time.
Regards,
Hien.

   <<Less

Re: how to apply the correct library on Linux RH6.0

Posted By:   michael_dean  
Posted On:   Sunday, March 24, 2002 09:56 AM

The getBlob(...) methods (and Blobs in general) were added with JDBC 2.0. Therefore, to use the methods, you will need to have:




  • A JDK supporting JDBC 2.0--I know J2SDK v1.2.2 and above provide support in the java.sql package.

  • A JDBC 2.0 driver--for Oracle this would be classes12.zip.



In addition, your CLASSPATH will have to be set appropriately to find these libraries. Most likely, if things work when you compile/run at the command-line but not when you use Apache/JServ, you need to fix the JServ CLASSPATH.



My guess is that JServ is using Oracle's classes111.zip which was a JDBC 1.0 driver package from Oracle. Even if classes12.zip is in the classpath, it may be finding classes111.zip first.

About | Sitemap | Contact