在 ORACLE 作为数据库的情况下,在 SPRING-Hibernate 应用程序的情况下使用 BLOB 给出“java.lang.ClassNotFoundException: oracle.sql.BLOB”!
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2324729/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Use of BLOB giving "java.lang.ClassNotFoundException: oracle.sql.BLOB" in case of SPRING-Hibernate application in case of ORACLE as a database!
提问by Abhishek Dhote
I am using BLOBs in my SPRING-Hibernate application its, giving "java.lang.ClassNotFoundException: oracle.sql.BLOB" in case of ORACLE as a database!
我在我的 SPRING-Hibernate 应用程序中使用 BLOB,在 ORACLE 作为数据库的情况下给出“java.lang.ClassNotFoundException:oracle.sql.BLOB”!
Exactly I am getting following:
正是我得到以下内容:
Caused by:
org.springframework.dao.InvalidDataAccessApiUsageException: Couldn't initialize OracleLobHandler because Oracle driver classes are not available. Note that OracleLobHandler requires Oracle JDBC driver 9i or higher!
nested exception is java.lang.ClassNotFoundException: oracle.sql.BLOB
采纳答案by Hans Westerbeek
Maybe your OSGI manifest does not export the right packages?
也许您的 OSGI 清单没有导出正确的包?
回答by Bozho
You need ojdbc.jar
(or similar) on your classpath (this is the Oracle JDBC driver)
您需要ojdbc.jar
(或类似)您的类路径(这是 Oracle JDBC 驱动程序)
Here is a list of drivers, pick the one that suits your environment.