I am trying to cretae a JDBC connection through datasource object with DriverManagerDatasorce.each time i run my appllication am getting
Caused by: 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] exception i have added ojdbc6 jar to my classpath eventhough am getting this exception
...Any suggests what i have missed.
I also tried with basicDataSource and still got same...Is that i need to arrange any configuration in server in order to get connection.
Caused by: 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]
Here Is My configuration :
<bean id="datasource"class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"></property>
<property name="url" value="jdbc:oracle:thin:localhost:1521:orcl"></property> <property name="username" value="SCOTT"></property>
<property name="password" value="34268"></property>
</bean>
oracle.jdbc.OracleDriver, and that is assuming you actually have the driver on the class path. - Mark Rotteveel