Hi,

I am having SMX4 at ubuntu, facing a problem with JDBC.

First let me explain what I am trying to achieve here.

1. I am reading from a queue (ActiveMQ) and Parsing data
2. Calling a JDBC Bean from parser to insert into postgres database.

Both of these components are installed in SMX using maven

Problem -
It always gives me a "java.lang.ClassNotFoundException:
org.postgresql.Driver" this exception is generated at the point where i have
following code -

                try {
                        Class.forName("org.postgresql.Driver");
                } catch (Exception e) {
                        result += "Exception 1 : " + e.toString()+"\r\n";
                        return result;
                }

My Classpath and jar present in the folder are - 

# echo $CLASSPATH
.:/usr/local/apache-servicemix-4.0.0/lib:/usr/local/apache-servicemix-4.0.0/lib/htmlconverter.jar:/usr/local/apache-servicemix-4.0.0/lib/jconsole.jar:/usr/local/apache-servicemix-4.0.0/lib/postgresql-8.4-701.jdbc4.jar:/usr/local/apache-servicemix-4.0.0/lib/sa-jdi.jar:/usr/local/apache-servicemix-4.0.0/lib/servicemix.jar:/usr/local/apache-servicemix-4.0.0/lib/servicemix-client.jar:/usr/local/apache-servicemix-4.0.0/lib/servicemix-jaas-boot.jar:/usr/local/apache-servicemix-4.0.0/lib/servicemix-version.jar:/usr/local/apache-servicemix-4.0.0/lib/tools.jar

However to check if I have postgres driver, I have written a piece of code
to pull database datetime and print, using very simple java code, which
works as expected.

I am not sure if I am missing any feature installed on SMX or any other
basic. 

Please help me identifying the problem and any possible solution - 

Many Thanks
Pawan
-- 
View this message in context: 
http://old.nabble.com/JDBC-tp27789540p27789540.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to