Greetings all,
I'm new to servicemix, coming from the apache/mod_perl world, and am trying
to get up to speed. I've been through a lot of the tutorial material, and am
now trying to set a really basic route using blueprint and camel-jdbc which
makes a simple call to a postgres DB. I feel like I'm almost there but can't
quite get it. It builds fine if I include an
<Import-Package>org.postgresql.jdbc</Import-Package>, but when I try to
osgi:start it fails because it can't find "org.postgresql.Driver, though
it's there in the driver jar. Can anyone tip me off to what I'm missing?
Here's my blueprint statement, which is just a modified version of the
camel-blueprint example, (I've change the db server hostname though):
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<cm:property-placeholder persistent-id="org.apache.servicemix.examples">
<cm:default-properties>
<cm:property name="prefix" value="Blueprint-Example"/>
</cm:default-properties>
</cm:property-placeholder>
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="timer://myTimer?fixedRate=true&period=5000" />
<setBody>
<constant>select current_timestamp</constant>
</setBody>
<to uri="jdbc:pgdb" />
<to uri="log:ExampleRouterBlueprint" />
</route>
</camelContext>
<bean id="pgdb"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.postgresql.Driver"/>
<property name="url"
value="jdbc:postgresql://myhost.mycompany.com/smx_test01"/>
<property name="username" value="smx"/>
<property name="password" value="smx"/>
</bean>
<bean id="myTransform"
class="org.apache.servicemix.examples.camel.MyTransform">
<property name="prefix" value="${prefix}" />
</bean>
</blueprint>
and I've added the this to the pom.xml:
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>8.2-504.jdbc3</version>
</dependency>
--
View this message in context:
http://servicemix.396122.n5.nabble.com/Blueprint-postgresql-camel-jdbc-newbie-question-tp4994862p4994862.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.