Finally i got the root cause of issue and fixed it. It was not actually
related to classpath but it was caused due to wrong DB connection string.
It was defined as property name=quot;urlquot;
value=quot;jdbc:microsoft:sqlserver://lt;hostname:1433;DatabaseName=testdb/
as per info from Fuse ESB
As Fuse ESB is an OSGI platform, the jar file should be deployed as bundles
using osgi:install command on karaf (
http://karaf.apache.org/manual/latest-2.3.x/commands/osgi-install.html). A
feature file exist to deploy the camel bundles so normally you should use
features:install camel-jdbc or
You jar must be deployed as a bundle on Karaf. If this jar is not a bundle,
then you should use wrap protocol to generate OSGI metadata required
toexport/import packages
https://ops4j1.jira.com/wiki/display/paxurl/Wrap+Protocol
http://fusesource.com/docs/esb/4.2/deploy_osgi/DeployJar-Wrap.html
Also, if I remove sqljdbc jar from lib folder, I am getting below exception.
Seems if the jar is present it is able to pick the class and if it is not
present it fails:
INFO | jvm 1| 2014/05/07 11:04:54 | ERROR: java.lang.RuntimeException:
Failed to execute start task. Reason:
Since I am using Fuse ESB 5.3.0, I have copied sqljdbc.jar,
org.springframework.jdbc-2.5.6.jar and camel-jdbc-2.2.0.jar to FUSE HOME/lib
folder.
Is this is not the right location or do we need more jars?
Thanks
Shiv
--
View this message in context:
May 2014 4:52 AM
To: users@camel.apache.org
Subject: Re: java.lang.NullPointerException in Camel JDBC component for
Select statement
That means that Spring JDBC has not been able to load your MSQL Driver
Class. I recommend that you have a look to the classpath.
On Mon, May 5, 2014 at 8:00
: java.lang.NullPointerException in Camel JDBC component for
Select statement
That means that Spring JDBC has not been able to load your MSQL Driver
Class. I recommend that you have a look to the classpath.
On Mon, May 5, 2014 at 8:00 PM, Shiv shiv.dixit@gmail.com wrote:
I do not see any log
IF you read the message, it tells you that it will create the connection
(not that the connection has been created). So Spring logs the message
before to call
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/
Can you verify that in your log Spring has reported that the Driver has
been loaded correctly ?
https://github.com/spring-projects/spring-framework/blob/master/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java#L133
On Mon, May 5, 2014 at 4:46 PM, Shiv
I do not see any log statement from DriverManagerDataSource class in my log
file :(.
Thanks
Shiv
--
View this message in context:
http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750881.html
Sent from the Camel - Users
That means that Spring JDBC has not been able to load your MSQL Driver
Class. I recommend that you have a look to the classpath.
On Mon, May 5, 2014 at 8:00 PM, Shiv shiv.dixit@gmail.com wrote:
I do not see any log statement from DriverManagerDataSource class in my log
file :(.
Thanks
4:52 AM
To: users@camel.apache.org
Subject: Re: java.lang.NullPointerException in Camel JDBC component for Select
statement
That means that Spring JDBC has not been able to load your MSQL Driver Class. I
recommend that you have a look to the classpath.
On Mon, May 5, 2014 at 8:00 PM, Shiv
As per your suggestion, I changed the logging level of the package and got
below line in log:
2014-05-05 10:53:46,007 | DEBUG | Creating new JDBC Driver Connection to
[jdbc:microsoft:sqlserver://host name:1433;DatabaseName=TESTDB] |
org.springframework.jdbc.datasource.SimpleDriverDataSource
Does
Hi all,
I am using Camel JDBC component for first time and I need to query a table
in MS SQL Server 2008 R2 and push the results to an ActiveMQ queue. I used
the details on http://camel.apache.org/jdbc.html page and tried to get the
setup. Once my route define in Spring configuration file is
You get this error because the Connection object is null (
https://github.com/apache/camel/blob/camel-2.2.0/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java#L67).
So I suspect that a problem occurred during creation of the DataSource
object
On Fri, May 2,
You could try to increase debug level for this package
org/springframework/jdbc/datasource/ to see if Spring reports this message
: logger.debug(Creating new JDBC Driver Connection to [ + url + ]);
On Fri, May 2, 2014 at 1:50 PM, Shiv shiv.dixit@gmail.com wrote:
I am however able to
17 matches
Mail list logo