之前的war包都运行的好好的,可最近忽然weblogic报出这样的错误:
org.springframework.dao.DataAccessResourceFailureException: Could not create Oracle LOB; nested exception is 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.NullPointerException
at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLobHandler.java:368)
at
......
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.NullPointerException
at org.springframework.jdbc.support.lob.OracleLobHandler.initOracleDriverClasses(OracleLobHandler.java:164)
at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLobHandler.java:339)
spring配置文件都有配置:
<!-- 支持对clob的支持 add by yangbo 0601-->
class="org.springframework.jdbc.support.lob.OracleLobHandler"
lazy-init="true">
class="org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor"
lazy-init="true" />
weblogic的jdb选的驱动是oracle 9i的 Oracle's Driver(Thin)Versions:0.0.1,9.2.0,10
怎么样才能解决这个问题呀?急死我了!都好几天了
[quote]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.NullPointerException [/quote]
栈里边告诉你了错误的根源:
driver class得不到,驱动加载有问题啊。
你再检查一下,是否驱动被换过?
是只在WEBLOGIC才报错?还是在TOMCAT等中间件也会报错
dao包里与数据库交互的地方出了问题,你看看是不是从数据库中取东西,还是添加东西时出错了,与驱动没关系的
org.springframework.dao.DataAccessResourceFailureException: Could not create Oracle LOB; nested exception is 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.NullPointerException
at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLobHandler.java:368)
at
驱动加载失败了,你看看你的连接是否有误注意(IP、端口、防火墙)