org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'oracle.jdbc.driver.OracleDriver' for connect URL 'jdbc:Oracle:thin:@192.168.0.112:1521:XXX'
<bean id="oracleDatasource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:Oracle:thin:@192.168.0.112:1521:XXX" />
<property name="username" value="XXXXXX" />
<property name="password" value="XXXXXX" />
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource">
<ref bean="oracleDatasource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle10gDialect
</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
<property name="mappingDirectoryLocations">
<list>
<value>
classpath*:com/zkdd/bean/
</value>
</list>
</property>
</bean>
我使用ojdbc14.jar和ojdbc6,jar都报同样错误。
------解决思路----------------------
'jdbc:Oracle:thin:@192.168.0.112:1521:XXX'
oracle小写
jdbc:oracle:thin:@192.168.0.112:1521:XXX 再试试看