An error occurred while reading the large Oracle field blob.

Source: Internet
Author: User

When reading the Blob field in the Oracle database,
Oracle. SQL. Blob blob = (Oracle. SQL. Blob) Rs. getblob (1 );
Java. Lang. classcastexception: Oracle. SQL. clob exception occurs.

Exception information:
Java. Lang. classcastexception: Oracle. SQL. blob
At MDX. DB. updateclob (db. Java: 116)
At org. Apache. jsp. processeditbiditem_jsp. _ jspservice (Org. Apache. jsp. processeditbiditem_jsp: 174)
At org. Apache. Jasper. runtime. httpjspbase. Service (httpjspbase. Java: 97)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 802)
At org. Apache. Jasper. servlet. jspservletwrapper. Service (jspservletwrapper. Java: 319)
At org. Apache. Jasper. servlet. jspservlet. servicejspfile (jspservlet. Java: 314)
At org. Apache. Jasper. servlet. jspservlet. Service (jspservlet. Java: 264)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 802)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 252)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 173)
At org. Apache. Catalina. Core. standardwrappervalve. Invoke (standardwrappervalve. Java: 213)
At org. Apache. Catalina. Core. standardcontextvalve. Invoke (standardcontextvalve. Java: 178)
At org. Apache. Catalina. Core. standardhostvalve. Invoke (standardhostvalve. Java: 126)
At org. Apache. Catalina. Valves. errorreportvalve. Invoke (errorreportvalve. Java: 105)
At org. Apache. Catalina. Core. standardenginevalve. Invoke (standardenginevalve. Java: 107)
At org. Apache. Catalina. connector. coyoteadapter. Service (coyoteadapter. Java: 148)
At org. Apache. Coyote. http11.http11processor. Process (http11processor. Java: 868)
At org. Apache. Coyote. http11.http11baseprotocol $ http11connectionhandler. processconnection (http11baseprotocol. Java: 663)
At org.apache.tomcat.util.net. pooltcpendpoint. processsocket (pooltcpendpoint. Java: 527)
At org.apache.tomcat.util.net. leaderfollowerworkerthread. Runit (leaderfollowerworkerthread. Java: 80)
At org. Apache. tomcat. util. threads. threadpool $ controlrunnable. Run (threadpool. Java: 684)
At java. Lang. thread. Run (thread. Java: 595)

At the beginning, I thought it was really a type conversion exception, followed by a sentence to print the type before conversion
System. Out. println (Rs. getblob (1). getclasss ());
The printed result is Oracle. SQL. Blob,

The driver package of the original class12.jar is replaced with the driver package ojdbc14.jar of oracle10.2.0.1,
The problem has not been solved.

Solution:

Finally, I thought the driver package was repeated,
Find the corresponding driver package under the Common/lib directory of Tomcat, and there is a corresponding driver package in the application. You can only delete one of the packages,
Because the driver package under the Common/lib/directory is used to create a JNDI data source for Tomcat, You cannot delete it. You can only delete the packages in the application, however, after deletion, the program compilation fails. In this case, external reference is made through the-build path of eclilpse, and the application compilation is passed, however, the ojdbc14.jar driver package will not be introduced to the release directory. Try again and solve the problem.

 

 

This article from: http://blog.javauu.com/2009/03/235.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.