conn maybe null if any of the parameters is invalid, right?

If everything alright with below configuration for MS SQL Server?
<bean id="testdb"
class="org.springframework.jdbc.datasource.SimpleDriverDataSource"> 
        <property name="driverClass"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/> 
        <property name="url"
value="jdbc:microsoft:sqlserver://hostname:1433;DatabaseName=testdb"/> 
        <property name="username" value="test"/> 
        <property name="password" value="test"/> 
</bean>

Also, if I understand the flow correctly, JDBC Producer class calls conn =
dataSource.getConnection() which is handled by SimpleDriverDataSource
class's getConnectionFromDriver method given all parameters (driverClass,
url, username, password) are set. Here all the arguments defined in Spring
configuration file are String but SimpleDriverDataSource class has one
method setDriver(Driver) which is expecting java.sql.Driver. Though i doubt
it but if this conversion is not happening properly? - Just a wild guess.

Also, since i am using camel core and camel jdbc 2.2.0 jars, if there is any
fixed version of spring jdbc jar has to be used. Currently, i downloaded
2.5.6 version of spring jdbc jar. Any compatibility issue?

Thanks
Shiv



--
View this message in context: 
http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750872.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to