异常是java.lang.IllegalStateException:无法加载JDBC驱动程序类 [英] exception is java.lang.IllegalStateException: Could not load JDBC driver class
本文介绍了异常是java.lang.IllegalStateException:无法加载JDBC驱动程序类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有使用Oracle数据库的代码spring + hibernate.我已经设置了配置,但是仍然出现错误:
I have code spring+hibernate using oracle database. I have setting the configuration but i still get an error like :
cannot Deploy Spring3HibernateApp
deploy is failing=Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [oracle.jdbc.driver.OracleDriver]. Please see server.log for more details.
我已经创建了像这样的database.properties:
i have create database.properties like this:
database.driver=oracle.jdbc.driver.OracleDriver
database.url=jdbc:oracle:thin:@xxx:1521:xxx
database.user=xxxx
database.password=welcome1
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
hibernate.show_sql=true
hibernate.hbm2ddl.auto=update
当我尝试使用ADF时,程序正在运行.
When i try in ADF, the program is running.
我该如何解决?
推荐答案
您需要从此链接下载oracl JDBC驱动程序:
you need to downloar oracl JDBC Driver from this link :
http://www.oracle.com/technetwork/apps- tech/jdbc101040-094982.html
接受许可,然后选择
ojdbc14.jar
下载后,复制jar文件,然后将其粘贴到您的classpath/lib文件夹中
after download, copy the jar file and then past it in your classpath/lib folder
这篇关于异常是java.lang.IllegalStateException:无法加载JDBC驱动程序类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文