exception is java.lang.IllegalStateException: Could not load JDBC driver class

独自空忆成欢 提交于 2020-01-07 02:11:06

问题


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.

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

When i try in ADF, the program is running.

How can i fix it?


回答1:


you need to downloar oracl JDBC Driver from this link :

http://www.oracle.com/technetwork/apps-tech/jdbc101040-094982.html

accept License and then choose

ojdbc14.jar 

after download, copy the jar file and then past it in your classpath/lib folder



来源:https://stackoverflow.com/questions/36613686/exception-is-java-lang-illegalstateexception-could-not-load-jdbc-driver-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!