You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by David M Nayagam <da...@wipro.com> on 2013/10/21 16:00:52 UTC

How do i add third party jars in normal jar deployment

Hi All,

i am creating simple project with oracle DB integration. here i am going to
create simple JAR file (Bundle) and going to deploy in ServiceMix 4.5.2. 

While maven build it is success and creating jar files. When i am going to
deploy in servicemix 4.5.2 it's can not find my Oracle Driver class and
getting error ClassNotFound Exception.

Any ideas for this. how can resolve this dependency issue.


Thanks advance.

Thanks
David



--
View this message in context: http://camel.465427.n5.nabble.com/How-do-i-add-third-party-jars-in-normal-jar-deployment-tp5741987.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: How do i add third party jars in normal jar deployment

Posted by Christian Mueller <ch...@gmail.com>.
Please use the user mailing list as we describe here [1].

[1] http://camel.apache.org/mailing-lists.html

Best,
Christian



--
View this message in context: http://camel.465427.n5.nabble.com/How-do-i-add-third-party-jars-in-normal-jar-deployment-tp5741987p5741995.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: How do i add third party jars in normal jar deployment

Posted by Christian Müller <ch...@gmail.com>.
You have to install your database driver OSGI bundle too and all your
depended OSGI bundles.
For Karaf/ServiceMix it's recommended to use a feature file.

[1]
http://karaf.apache.org/manual/latest-2.2.x/users-guide/provisioning.html

P.S.: And please use the users mailing list in the future for such kind of
questions.

Best,

Christian
-----------------

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Mon, Oct 21, 2013 at 4:00 PM, David M Nayagam <da...@wipro.com>wrote:

> Hi All,
>
> i am creating simple project with oracle DB integration. here i am going to
> create simple JAR file (Bundle) and going to deploy in ServiceMix 4.5.2.
>
> While maven build it is success and creating jar files. When i am going to
> deploy in servicemix 4.5.2 it's can not find my Oracle Driver class and
> getting error ClassNotFound Exception.
>
> Any ideas for this. how can resolve this dependency issue.
>
>
> Thanks advance.
>
> Thanks
> David
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-do-i-add-third-party-jars-in-normal-jar-deployment-tp5741987.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>

Re: How do i add third party jars in normal jar deployment

Posted by contactreji <co...@gmail.com>.
Hi David

Can you tell me how are you initializing the bean to access the oracle
database?

Go with 

 <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
        <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
        <property name="url"
value="jdbc:oracle:thin:@localhost:1521:DBname"/>
        <property name="username" value="scott"/>
        <property name="password" value="tiger"/>
        <property name="poolPreparedStatements" value="true"/>
    </bean>

And please check which Maven dependency is needed for Oracle JDBC. The jars
should contains some classes similar to classes12.jar.
Please refer internet for the dependency.

And anyways add following to your POM too
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-jdbc</artifactId>
    <version>x.x.x</version>
    
</dependency>

Cheers
Reji



--
View this message in context: http://camel.465427.n5.nabble.com/How-do-i-add-third-party-jars-in-normal-jar-deployment-tp5741987p5741989.html
Sent from the Camel Development mailing list archive at Nabble.com.