In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
An exception occurs when using native jdbc to save large field clob or blob:
ERROR [pool-12-thread-1] PartitionConsumerThread.run (128C) | java.lang.AbstractMethodError: Method oraclebc/driver/T4CPreparedStatement.setCharacterStream (ILjava/io/Reader;J) V is abstract
Analyze the reasons:
The exception means that the T4CPreparedStatement class calls an abstract method, meaning that it does not implement jdbc's setCharacterStream itself. The database driver used in our framework uses oracle.sql.class12. After storing an exception in a large field, I went to see the source code of T4CPreparedStatement. He inherited the implementation of setCharacterStream,setClob and setBlob methods in OraclePreparedStatement. There are implementations of setCharacterStream,setClob and setBlob methods in OraclePreparedStatement, but the parameter types of jdbc's setCharacterStream,setClob and setBlob methods are different. You can take a look at the source code, meaning that neither OraclePreparedStatement nor T4CPreparedStatement implements the setCharacterStream,setClob and setBlob methods of jdbc. It only inherits the abstract method, so we will report the previous exception when we call it. The solution: change the oracle driver, and then I change the driver to odjbc6. I also looked at the source code and found that OraclePreparedStatement has an implementation of jdbc's PrepareStatement method to deal with large fields, which perfectly solves the problem.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.