Hi,

Did you try use the ServiceMix features[1] to load the camel-jdbc and
the third party bundles?
If so, it must be a bug of SericeMix features the camel-jdbc feature
will take care of it :)

[1]http://servicemix.apache.org/SMX4KNL/66-installing-additional-features.html

Willem


Matteo Redaelli wrote:
> Thanks for answer
> 
> I installed also other features like 
> 
>  [ 161] [Active     ] [       ] [   60] Apache ServiceMix Bundles:
> commons-dbcp-1.2.2 (1.2.2.3)
>  [ 181] [Active     ] [       ] [   60] Spring JDBC (2.5.6)
> 
> but I have the same problem. I'll go on adding something more. But from the
> end user point of view this is quite strange: should the feature
> "camel-jdbc" be responsable of loading all other "low level" necessary
> libraries? 
> 
> In any case, if I can give a suggestion to Camel/smx4 team, it would be nice
> to have an example/wiki page about using camel-jdbc in smx4/osgi. And how to
> share more than one datasource in smx4/kernel
> 
> http://trenaman.blogspot.com/2008/12/how-to-share-single-jdbc-pool-across.html
> http://trenaman.blogspot.com/2008/12/sharing-oracle-jdbc-pool-in-smx4.html
> 
> "Cameling" with databases is quite common, smx doesn't have at the moment a
> jbi servicemix-jdbc component, so camel-jdbc is the way if you do not want
> to write java code...
> 
> Regards
> Matteo
> 
> 
> Claus Ibsen-2 wrote:
>> Hi
>>
>> You need some additional .jars on the classpath. So you need to
>> install more .jars into the OSGi.
>>
>> You should look at the exception:
>>  Cannot
>>> find class [org.apache.commons.dbcp.BasicDataSource] for bean with name
>>> 'xxxxDB"
>> Where it states that it cannot find the class above. Then you need to
>> find the .jar that contains this .class and install it.
>>
>> Some of the .jars can be found here:
>> http://servicemix.apache.org/SMX4/bundles-repository.html
>>
>>
>>
>>
>>
>> On Thu, Apr 23, 2009 at 9:19 PM, Matteo Redaelli
>> <matteo.redae...@libero.it> wrote:
>>> ciao
>>>
>>> I'm trying to port a maven project to the osgi container servicemix4.0. I
>>> created a new project with
>>>
>>> mvn archetype:create    \
>>>        -DarchetypeGroupId=org.springframework.osgi     \
>>>        -DarchetypeArtifactId=spring-osgi-bundle-archetype      \
>>>        -DarchetypeVersion=1.2.0-m2     \
>>>        -DgroupId=pire.upms     \
>>>        -DartifactId=pire-upms-users
>>>        -Dversion=1.0-SNAPSHOT
>>>
>>> I installed all supposed camel features
>>>
>>> s...@root:/> osgi/list|grep camel
>>> [  65] [Active     ] [       ] [   60] camel-core (1.6.0)
>>> [  66] [Active     ] [       ] [   60] camel-osgi (1.6.0)
>>> [  67] [Active     ] [       ] [   60] camel-spring (1.6.0)
>>> [ 159] [Active     ] [       ] [   60] camel-ognl (1.6.0)
>>> [ 160] [Active     ] [       ] [   60] camel-jms (1.6.0)
>>> [ 162] [Active     ] [       ] [   60] camel-quartz (1.6.0)
>>> [ 164] [Active     ] [       ] [   60] camel-jdbc (1.6.0)
>>> [ 170] [Active     ] [       ] [   60] camel-velocity (1.6.0)
>>> [ 172] [Active     ] [       ] [   60] camel-juel (1.6.0)
>>> [ 182] [Active     ] [       ] [   60] camel-sql (1.6.0)
>>> [ 186] [Active     ] [       ] [   60] camel-spring-integration (1.6.0)
>>> [ 195] [Active     ] [       ] [   60] camel-jpa (1.6.0)
>>> [ 201] [Active     ] [       ] [   60] camel-ibatis (1.6.0)
>>>
>>> I also added the same dependences in pom.xml I used in my old camel
>>> project
>>>
>>> but when I deploy my .jar in deploy folder I get
>>>
>>> "Error creating bean with name 'camelContext:beanPostProcessor': Cannot
>>> resolve reference to bean 'camelContext' while setting bean property
>>> 'camelContext'; nested exception is
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'camelContext': Invocation of init method failed; nested
>>> exception
>>> is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
>>> find class [org.apache.commons.dbcp.BasicDataSource] for bean with name
>>> 'xxxxDB"
>>>
>>>
>>> I have a similar error if I switch in my bean definition of datasource
>>>
>>> from
>>>  class="org.apache.commons.dbcp.BasicDataSource"
>>> to
>>>  class="org.springframework.jdbc.datasource.DriverManagerDataSource"
>>>
>>> What's worng? missing features/bundles?
>>>
>>> Regards
>>> Matteo Redaelli
>>> http://www.redaelli.org/matteo/
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/porting-camel-routers-%28camel-jdbc%29-to-servicemix4.0-tp23197888p23197888.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> -- 
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>> Apache Camel Reference Card:
>> http://refcardz.dzone.com/refcardz/enterprise-integration
>>
>>
> 

Reply via email to