You need to compile it with JDK 5, not JDK 6. On Mon, Mar 23, 2009 at 09:27, cmoulliard <[email protected]> wrote: > > Hi Guillaume, > > I try to compile the bundle but I receive the following error : > > [INFO] Compilation failure > D:\Dvlpt\Java\workspace-ganymede\apache-smx4-source\bundles\commons-dbcp-1.2.2\src\main\java\org\apache\commons\dbcp\BasicDataSource.java:[44,7] > org.apache.commons.dbcp.B > asicDataSource is not abstract and does not override abstract method > isWrapperFor(java.lang.Class) in java.sql.Wrapper > > Regards, > > D:\Dvlpt\Java\workspace-ganymede\apache-smx4-source\bundles\commons-dbcp-1.2.2\src\main\java\org\apache\commons\dbcp\BasicDataSource.java:[44,7] > org.apache.commons.dbcp.B > asicDataSource is not abstract and does not override abstract method > isWrapperFor(java.lang.Class) in java.sql.Wrapper > > > > gnodet wrote: >> >> Done, see http://svn.apache.org/viewvc?view=rev&revision=756753 >> You can give a try with this new bundle if you want. >> >> On Fri, Mar 20, 2009 at 21:31, Guillaume Nodet <[email protected]> wrote: >>> The code pointer below refers to trunk, but commons-dbcp 1.2.2 does >>> not default to using the TCCL. >>> The patch has only been included recently (see >>> https://issues.apache.org/jira/browse/DBCP-214). >>> However, i've decompiled the spring provided bundle and they have >>> included this patch on 1.2.2. >>> >>> However, using our latest bundle, the code works (but it fails when >>> using the first bundle we released). >>> >>> Actually, I'm tempted to include the patch to fix DBCP-214 in our bundle >>> too. >>> >>> 2009/3/20 Guillaume Nodet <[email protected]>: >>>> Looking at the code for commons-dbcp at >>>> http://svn.apache.org/repos/asf/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java >>>> the createConnectionFactory() will try to use Class.forName() then >>>> default to the use of the thread context classloader. In both cases, >>>> our bundle should work fine. >>>> >>>> On Fri, Mar 20, 2009 at 17:36, cmoulliard <[email protected]> wrote: >>>>> >>>>> Would you like that I create a ticket about this issue ? >>>>> >>>>> >>>>> gnodet wrote: >>>>>> >>>>>> Not sure, they may have hacked the code itself as I don't see any >>>>>> dynamic imports, so the code should fail to load the driver. >>>>>> >>>>>> On Fri, Mar 20, 2009 at 16:14, cmoulliard <[email protected]> >>>>>> wrote: >>>>>>> >>>>>>> I don't know why but I don't have this error using the >>>>>>> commons-dbcp-1.2.2.osgi.jar coming from the petclinic example of >>>>>>> Spring >>>>>>> DM >>>>>>> >>>>>>> This is strange because I don't understand. >>>>>>> >>>>>>> Here are the headers of both bundles : >>>>>>> >>>>>>> Apache ServiceMix Bundles: commons-dbcp-1.2.2 (129) >>>>>>> --------------------------------------------------- >>>>>>> Tool = Bnd-0.0.255 >>>>>>> Bundle-DocURL = http://www.apache.org/ >>>>>>> Bundle-Description = This bundle simply wraps commons-dbcp-1.2.2.jar. >>>>>>> Export-Package = >>>>>>> org.apache.commons.pool.impl;uses:="org.apache.commons.pool";version="1.2.2",org.apache.commons.jocl;uses:="org.xml.sax,org.xml.sax.helpers";version="1.2 >>>>>>> .2",org.apache.commons.dbcp.datasources;uses:="javax.naming,org.apache.commons.pool.impl,org.apache.commons.pool,javax.naming.spi,javax.sql,org.apache.commons.dbcp";versi >>>>>>> on="1.2.2",org.apache.commons.dbcp.cpdsadapter;uses:="javax.naming,org.apache.commons.pool.impl,org.apache.commons.pool,javax.naming.spi,org.apache.commons.dbcp,javax.sql >>>>>>> ";version="1.2.2",org.apache.commons.pool;version="1.2.2",org.apache.commons.dbcp;uses:="org.xml.sax,org.apache.commons.pool.impl,org.apache.commons.jocl,javax.naming.spi >>>>>>> ,javax.sql,javax.naming,org.apache.commons.pool";version="1.2.2" >>>>>>> Bundle-Version = 1.2.2.2 >>>>>>> Build-Jdk = 1.5.0_16 >>>>>>> Created-By = Apache Maven Bundle Plugin >>>>>>> Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt >>>>>>> Bundle-ManifestVersion = 2 >>>>>>> Manifest-Version = 1.0 >>>>>>> DynamicImport-Package = * >>>>>>> Bundle-Vendor = The Apache Software Foundation >>>>>>> Bnd-LastModified = 1234185515346 >>>>>>> Bundle-Name = Apache ServiceMix Bundles: commons-dbcp-1.2.2 >>>>>>> Built-By = gert >>>>>>> Import-Package = >>>>>>> javax.naming,javax.naming.spi,javax.sql,org.apache.commons.dbcp;version="1.2.2",org.apache.commons.dbcp.cpdsadapter;version="1.2.2",org.apache.commons.db >>>>>>> cp.datasources;version="1.2.2",org.apache.commons.jocl;version="1.2.2",org.apache.commons.pool;version="1.2.2",org.apache.commons.pool.impl;version="1.2.2",org.xml.sax,or >>>>>>> g.xml.sax.helpers >>>>>>> Bundle-SymbolicName = org.apache.servicemix.bundles.commons-dbcp >>>>>>> s...@root:osgi> headers 128 >>>>>>> >>>>>>> Apache Commons Database Connection Pool (128) >>>>>>> --------------------------------------------- >>>>>>> Manifest-Version = 1.0 >>>>>>> Bundle-Vendor = SpringSource >>>>>>> Maven-Version = 1.1 >>>>>>> Bundle-Name = Apache Commons Database Connection Pool >>>>>>> Ant-Version = Apache Ant 1.6.5 >>>>>>> Built-By = psteitz >>>>>>> Import-Package = >>>>>>> javax.naming,javax.naming.spi,javax.sql,org.apache.commons.pool;version="[1.3.0, >>>>>>> 2.0.0)",org.apache.commons.pool.impl;version="[1.3.0, >>>>>>> 2.0.0)",org.xml.sa >>>>>>> x,org.xml.sax.helpers >>>>>>> Bundle-SymbolicName = com.springsource.org.apache.commons.dbcp >>>>>>> Export-Package = >>>>>>> org.apache.commons.dbcp;version="1.2.2.osgi";uses:="javax.naming,javax.sql,org.apache.commons.pool",org.apache.commons.dbcp.cpdsadapter;version="1.2.2.os >>>>>>> gi";uses:="javax.naming,javax.sql,org.apache.commons.pool",org.apache.commons.dbcp.datasources;version="1.2.2.osgi";uses:="javax.naming,javax.sql,org.apache.commons.pool" >>>>>>> ,org.apache.commons.jocl;version="1.2.2.osgi";uses:="org.xml.sax" >>>>>>> Bundle-Version = 1.2.2.osgi >>>>>>> Created-By = 1.5.0_13-119 (Apple Inc.) >>>>>>> Bundle-ManifestVersion = 2 >>>>>>> >>>>>>> cmoulliard wrote: >>>>>>>> >>>>>>>> The error is still there even if I use commons-dbcp 1.2.2_2 >>>>>>>> >>>>>>>> Apache ServiceMix Bundles: commons-dbcp-1.2.2 (127) >>>>>>>> --------------------------------------------------- >>>>>>>> Tool = Bnd-0.0.255 >>>>>>>> Bundle-DocURL = http://www.apache.org/ >>>>>>>> Bundle-Description = This bundle simply wraps >>>>>>>> commons-dbcp-1.2.2.jar. >>>>>>>> Export-Package = >>>>>>>> org.apache.commons.pool.impl;uses:="org.apache.commons.pool";version="1.2.2",org.apache.commons.jocl;uses:="org.xml.sax,org.xml.sax.helpers";version="1.2 >>>>>>>> .2",org.apache.commons.dbcp.datasources;uses:="javax.naming,org.apache.commons.pool.impl,org.apache.commons.pool,javax.naming.spi,javax.sql,org.apache.commons.dbcp";versi >>>>>>>> on="1.2.2",org.apache.commons.dbcp.cpdsadapter;uses:="javax.naming,org.apache.commons.pool.impl,org.apache.commons.pool,javax.naming.spi,org.apache.commons.dbcp,javax.sql >>>>>>>> ";version="1.2.2",org.apache.commons.pool;version="1.2.2",org.apache.commons.dbcp;uses:="org.xml.sax,org.apache.commons.pool.impl,org.apache.commons.jocl,javax.naming.spi >>>>>>>> ,javax.sql,javax.naming,org.apache.commons.pool";version="1.2.2" >>>>>>>> Bundle-Version = 1.2.2.2 >>>>>>>> Build-Jdk = 1.5.0_16 >>>>>>>> Created-By = Apache Maven Bundle Plugin >>>>>>>> Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt >>>>>>>> Bundle-ManifestVersion = 2 >>>>>>>> Manifest-Version = 1.0 >>>>>>>> DynamicImport-Package = * >>>>>>>> Bundle-Vendor = The Apache Software Foundation >>>>>>>> Bnd-LastModified = 1234185515346 >>>>>>>> Bundle-Name = Apache ServiceMix Bundles: commons-dbcp-1.2.2 >>>>>>>> Built-By = gert >>>>>>>> Import-Package = >>>>>>>> javax.naming,javax.naming.spi,javax.sql,org.apache.commons.dbcp;version="1.2.2",org.apache.commons.dbcp.cpdsadapter;version="1.2.2",org.apache.commons.db >>>>>>>> cp.datasources;version="1.2.2",org.apache.commons.jocl;version="1.2.2",org.apache.commons.pool;version="1.2.2",org.apache.commons.pool.impl;version="1.2.2",org.xml.sax,or >>>>>>>> g.xml.sax.helpers >>>>>>>> Bundle-SymbolicName = org.apache.servicemix.bundles.commons-dbcp >>>>>>>> s...@root:osgi> headers 115 >>>>>>>> >>>>>>>> Report Incident Persistence Bundle (115) >>>>>>>> ---------------------------------------- >>>>>>>> Tool = Bnd-0.0.255 >>>>>>>> Export-Package = >>>>>>>> org.apache.camel.example.reportincident.dao;uses:="org.apache.camel.example.reportincident.model" >>>>>>>> Bundle-Version = 1.0.0.SNAPSHOT >>>>>>>> Build-Jdk = 1.6.0_12 >>>>>>>> Created-By = Apache Maven Bundle Plugin >>>>>>>> Bundle-ManifestVersion = 2 >>>>>>>> Manifest-Version = 1.0 >>>>>>>> Bnd-LastModified = 1237559108726 >>>>>>>> Private-Package = org.apache.camel.example.reportincident.dao.impl >>>>>>>> Bundle-Name = Report Incident Persistence Bundle >>>>>>>> Built-By = Charlesm >>>>>>>> Import-Package = >>>>>>>> META-INF.org.apache.camel.example.reportincident.model.Incident.hbm.xml,com.mysql.jdbc,net.sf.ehcache,org.apache.camel.example.reportincident.dao,org.apa >>>>>>>> che.camel.example.reportincident.model,org.apache.commons.dbcp,org.hibernate,org.hibernate.cfg,org.hibernate.classic,org.springframework.jdbc.support;version="2.5",org.sp >>>>>>>> ringframework.jdbc.support.lob;version="2.5",org.springframework.orm;version="2.5",org.springframework.orm.hibernate3;version="2.5",org.springframework.transaction;versio >>>>>>>> n="2.5" >>>>>>>> Bundle-SymbolicName = reportincident.persistence >>>>>>>> >>>>>>>> >>>>>>>> gnodet wrote: >>>>>>>>> >>>>>>>>> The first version of commons-dbcp bundle was missing the dynamic >>>>>>>>> import >>>>>>>>> package. >>>>>>>>> The most recent version should work: >>>>>>>>> >>>>>>>>> http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.commons-dbcp/1.2.2_2/ >>>>>>>>> >>>>>>>>> On Fri, Mar 20, 2009 at 15:16, cmoulliard <[email protected]> >>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>> I have created a osgi bundles including the spring config file >>>>>>>>>> posted >>>>>>>>>> in >>>>>>>>>> this >>>>>>>>>> message. The jdbc driver of Mysql has been deployed as a bundle. >>>>>>>>>> Here >>>>>>>>>> is >>>>>>>>>> the >>>>>>>>>> headers of MySql: >>>>>>>>>> >>>>>>>>>> MySQL AB's JDBC Driver for MySQL (126) >>>>>>>>>> -------------------------------------- >>>>>>>>>> Manifest-Version = 1.0 >>>>>>>>>> Bundle-Vendor = SpringSource >>>>>>>>>> Bundle-Name = MySQL AB's JDBC Driver for MySQL >>>>>>>>>> Ant-Version = Apache Ant 1.6.5 >>>>>>>>>> Built-By = mysqldev >>>>>>>>>> Import-Package = com.mchange.v2.c3p0;version="[0.9.1.2, >>>>>>>>>> 1.0.0)";resolution:=optional,javax.naming,javax.naming.spi,javax.net,javax.net.ssl,javax.sql,javax.transaction.xa; >>>>>>>>>> version="[1.0.1, >>>>>>>>>> 2.0.0)";resolution:=optional,javax.xml.parsers,javax.xml.stream;version="[1.0.1, >>>>>>>>>> 2.0.0)";resolution:=optional,javax.xml.transform,javax.xml.transform.dom >>>>>>>>>> ,javax.xml.transform.sax,javax.xml.transform.stax;resolution:=optional,javax.xml.transform.stream,org.apache.commons.logging;version="[1.1.1,2.0.0)",org.apache.log4j;vers >>>>>>>>>> ion="[1.2.15, >>>>>>>>>> 2.0.0)";resolution:=optional,org.jboss.resource.adapter.jdbc;resolution:=optional,org.jboss.resource.adapter.jdbc.vendor;resolution:=optional,org.w3c.dom,or >>>>>>>>>> g.xml.sax,org.xml.sax.helpers >>>>>>>>>> Bundle-SymbolicName = com.springsource.com.mysql.jdbc >>>>>>>>>> Export-Package = >>>>>>>>>> com.mysql.jdbc;version="5.1.6";uses:="com.mysql.jdbc.log,javax.naming,javax.net.ssl,javax.xml.transform,org.xml.sax",com.mysql.jdbc.configs;version="5.1. >>>>>>>>>> 6",com.mysql.jdbc.exceptions;version="5.1.6",com.mysql.jdbc.exceptions.jdbc4;version="5.1.6";uses:="com.mysql.jdbc",com.mysql.jdbc.integration.c3p0;version="5.1.6",com.my >>>>>>>>>> sql.jdbc.integration.jboss;version="5.1.6",com.mysql.jdbc.interceptors;version="5.1.6";uses:="com.mysql.jdbc",com.mysql.jdbc.jdbc2.optional;version="5.1.6";uses:="com.mys >>>>>>>>>> ql.jdbc,com.mysql.jdbc.log,javax.naming,javax.sql,javax.transaction.xa",com.mysql.jdbc.log;version="5.1.6",com.mysql.jdbc.profiler;version="5.1.6";uses:="com.mysql.jdbc", >>>>>>>>>> com.mysql.jdbc.util;version="5.1.6";uses:="com.mysql.jdbc.log",org.gjt.mm.mysql;version="5.1.6" >>>>>>>>>> Bundle-Classpath = . >>>>>>>>>> Bundle-Version = 5.1.6 >>>>>>>>>> Created-By = 1.4.2-b28 (Sun Microsystems Inc.) >>>>>>>>>> Bundle-ManifestVersion = 2 >>>>>>>>>> >>>>>>>>>> and those of my bundle >>>>>>>>>> >>>>>>>>>> Report Incident Persistence Bundle (115) >>>>>>>>>> ---------------------------------------- >>>>>>>>>> Tool = Bnd-0.0.255 >>>>>>>>>> Export-Package = >>>>>>>>>> org.apache.camel.example.reportincident.dao;uses:="org.apache.camel.example.reportincident.model" >>>>>>>>>> Bundle-Version = 1.0.0.SNAPSHOT >>>>>>>>>> Build-Jdk = 1.6.0_12 >>>>>>>>>> Created-By = Apache Maven Bundle Plugin >>>>>>>>>> Bundle-ManifestVersion = 2 >>>>>>>>>> Manifest-Version = 1.0 >>>>>>>>>> Bnd-LastModified = 1237555603991 >>>>>>>>>> Private-Package = org.apache.camel.example.reportincident.dao.impl >>>>>>>>>> Bundle-Name = Report Incident Persistence Bundle >>>>>>>>>> Built-By = Charlesm >>>>>>>>>> Import-Package = >>>>>>>>>> META-INF.org.apache.camel.example.reportincident.model.Incident.hbm.xml,com.mysql.jdbc,net.sf.ehcache,org.apache.camel.example.reportincident.dao,org.apa >>>>>>>>>> che.camel.example.reportincident.model,org.apache.commons.dbcp,org.hibernate,org.hibernate.cfg,org.hibernate.classic,org.springframework.jdbc.support;version="2.5",org.sp >>>>>>>>>> ringframework.jdbc.support.lob;version="2.5",org.springframework.orm;version="2.5",org.springframework.orm.hibernate3;version="2.5",org.springframework.transaction;versio >>>>>>>>>> n="2.5" >>>>>>>>>> Bundle-SymbolicName = reportincident.persistence >>>>>>>>>> >>>>>>>>>> So Is the problem related to commons-dbcp who cannot find this >>>>>>>>>> class >>>>>>>>>> using >>>>>>>>>> its classloader ? >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> gnodet wrote: >>>>>>>>>>> >>>>>>>>>>> Did you package this spring app in a bundle ? >>>>>>>>>>> If yes, you need to make sure your bundle import (statically or >>>>>>>>>>> dynamically, or through a RequiredBundle header) the >>>>>>>>>>> com.mysql.jdbc >>>>>>>>>>> package. >>>>>>>>>>> Spring applications deployed through the deployer have a dynamic >>>>>>>>>>> import package declaration on everything iirc, so it should work >>>>>>>>>>> that >>>>>>>>>>> way. >>>>>>>>>>> >>>>>>>>>>> On Fri, Mar 20, 2009 at 14:57, cmoulliard <[email protected]> >>>>>>>>>>> wrote: >>>>>>>>>>>> >>>>>>>>>>>> Hi, >>>>>>>>>>>> >>>>>>>>>>>> I would like to know if someones has resolved top of SMX4 the >>>>>>>>>>>> issue >>>>>>>>>>>> related >>>>>>>>>>>> with the loading of JDBC driver like MySQL, ... >>>>>>>>>>>> >>>>>>>>>>>> I have created the following Spring configuration >>>>>>>>>>>> >>>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?> >>>>>>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans" >>>>>>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>>>>>>>> >>>>>>>>>>>> xmlns:context="http://www.springframework.org/schema/context" >>>>>>>>>>>> xmlns:osgi="http://www.springframework.org/schema/osgi" >>>>>>>>>>>> xsi:schemaLocation=" >>>>>>>>>>>> http://www.springframework.org/schema/beans >>>>>>>>>>>> >>>>>>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd >>>>>>>>>>>> http://www.springframework.org/schema/context >>>>>>>>>>>> >>>>>>>>>>>> http://www.springframework.org/schema/context/spring-context.xsd >>>>>>>>>>>> http://www.springframework.org/schema/osgi >>>>>>>>>>>> >>>>>>>>>>>> http://www.springframework.org/schema/osgi/spring-osgi.xsd"> >>>>>>>>>>>> >>>>>>>>>>>> <context:annotation-config/> >>>>>>>>>>>> >>>>>>>>>>>> <!-- DB connection and persistence layer --> >>>>>>>>>>>> <!-- DataSource Definition --> >>>>>>>>>>>> <bean id="dataSource" >>>>>>>>>>>> class="org.apache.commons.dbcp.BasicDataSource" >>>>>>>>>>>> destroy-method="close"> >>>>>>>>>>>> <property name="driverClassName" >>>>>>>>>>>> value="com.mysql.jdbc.Driver" /> >>>>>>>>>>>> <property name="url" value="jdbc:mysql:///report" >>>>>>>>>>>> /> >>>>>>>>>>>> <property name="username" value="root" /> >>>>>>>>>>>> <property name="password" value="" /> >>>>>>>>>>>> </bean> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> <!-- Spring Data Access Exception Translator Definition >>>>>>>>>>>> --> >>>>>>>>>>>> <bean id="jdbcExceptionTranslator" >>>>>>>>>>>> class="org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"> >>>>>>>>>>>> <property name="dataSource"> >>>>>>>>>>>> <ref bean="dataSource" /> >>>>>>>>>>>> </property> >>>>>>>>>>>> </bean> >>>>>>>>>>>> >>>>>>>>>>>> <!-- Hibernate SessionFactory Definition --> >>>>>>>>>>>> <bean id="sessionFactory" >>>>>>>>>>>> class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> >>>>>>>>>>>> >>>>>>>>>>>> <!-- Classloading does not work under OSGI >>>>>>>>>>>> <property name="mappingResources"> >>>>>>>>>>>> <list> >>>>>>>>>>>> >>>>>>>>>>>> <value>META-INF/org/apache/camel/example/reportincident/model/Incident.hbm.xml</value> >>>>>>>>>>>> </list> >>>>>>>>>>>> </property> >>>>>>>>>>>> --> >>>>>>>>>>>> >>>>>>>>>>>> <!-- see here >>>>>>>>>>>> >>>>>>>>>>>> http://www.carbonfive.com/community/archives/2007/05/using_classpath.html >>>>>>>>>>>> and >>>>>>>>>>>> >>>>>>>>>>>> http://jira.springframework.org/browse/SPR-3965 >>>>>>>>>>>> for more info about the classloading issue >>>>>>>>>>>> on >>>>>>>>>>>> OSGI >>>>>>>>>>>> --> >>>>>>>>>>>> <property name="mappingLocations"> >>>>>>>>>>>> <list> >>>>>>>>>>>> >>>>>>>>>>>> <value>classpath*:META-INF/org/apache/camel/example/reportincident/model/Incident.hbm.xml</value> >>>>>>>>>>>> </list> >>>>>>>>>>>> </property> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> <property name="hibernateProperties"> >>>>>>>>>>>> <props> >>>>>>>>>>>> <prop >>>>>>>>>>>> key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> >>>>>>>>>>>> <prop >>>>>>>>>>>> key="hibernate.show_sql">false</prop> >>>>>>>>>>>> <prop >>>>>>>>>>>> key="hibernate.format_sql">true</prop> >>>>>>>>>>>> <prop >>>>>>>>>>>> key="hibernate.cglib.use_reflection_optimizer">true</prop> >>>>>>>>>>>> <prop >>>>>>>>>>>> key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop> >>>>>>>>>>>> <prop >>>>>>>>>>>> key="hibernate.jdbc.batch_size">10</prop> >>>>>>>>>>>> </props> >>>>>>>>>>>> </property> >>>>>>>>>>>> <property name="dataSource"> >>>>>>>>>>>> <ref bean="dataSource" /> >>>>>>>>>>>> </property> >>>>>>>>>>>> </bean> >>>>>>>>>>>> >>>>>>>>>>>> <!-- Hibernate Transaction Manager Definition --> >>>>>>>>>>>> <bean id="transactionManager" >>>>>>>>>>>> class="org.springframework.orm.hibernate3.HibernateTransactionManager"> >>>>>>>>>>>> <property name="sessionFactory"> >>>>>>>>>>>> <ref local="sessionFactory" /> >>>>>>>>>>>> </property> >>>>>>>>>>>> </bean> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> <!-- Hibernate Transaction Manager exported as OSGI >>>>>>>>>>>> service >>>>>>>>>>>> because used >>>>>>>>>>>> org.apache.camel.example.reportincident.service --> >>>>>>>>>>>> <osgi:service id="transactionManagerOsgi" >>>>>>>>>>>> ref="transactionManager" >>>>>>>>>>>> >>>>>>>>>>>> interface="org.springframework.transaction.PlatformTransactionManager"/> >>>>>>>>>>>> >>>>>>>>>>>> </beans> >>>>>>>>>>>> >>>>>>>>>>>> but I receive the following error : >>>>>>>>>>>> >>>>>>>>>>>> 14:42:30,382 | WARN | xtenderThread-15 | SQLErrorCodesFactory >>>>>>>>>>>> | >>>>>>>>>>>> dbc.support.SQLErrorCodesFactory 230 | Error while extracting >>>>>>>>>>>> database >>>>>>>>>>>> product name - falling back to empty error codes >>>>>>>>>>>> org.springframework.jdbc.support.MetaDataAccessException: Could >>>>>>>>>>>> not >>>>>>>>>>>> get >>>>>>>>>>>> Connection for extracting meta data; nested exception is >>>>>>>>>>>> org.springframework.jdbc.CannotGetJdbcConnectionException: Could >>>>>>>>>>>> not >>>>>>>>>>>> get >>>>>>>>>>>> JDBC Connection; nested exception is >>>>>>>>>>>> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC >>>>>>>>>>>> driver >>>>>>>>>>>> class >>>>>>>>>>>> 'com.mysql.jdbc.Driver' >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:293) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:320) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.jdbc.support.SQLErrorCodesFactory.getErrorCodes(SQLErrorCodesFactory.java:216) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:140) >>>>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>>>>>>>>>> Method) >>>>>>>>>>>> at >>>>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>>>>>>>>>>> at >>>>>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>>>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:597) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:840) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:651) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1276) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) >>>>>>>>>>>> at java.security.AccessController.doPrivileged(Native >>>>>>>>>>>> Method) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136) >>>>>>>>>>>> at java.lang.Thread.run(Thread.java:619) >>>>>>>>>>>> Caused by: >>>>>>>>>>>> org.springframework.jdbc.CannotGetJdbcConnectionException: >>>>>>>>>>>> Could >>>>>>>>>>>> not get JDBC Connection; nested exception is >>>>>>>>>>>> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC >>>>>>>>>>>> driver >>>>>>>>>>>> class >>>>>>>>>>>> 'com.mysql.jdbc.Driver' >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:280) >>>>>>>>>>>> ... 30 more >>>>>>>>>>>> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot >>>>>>>>>>>> load >>>>>>>>>>>> JDBC >>>>>>>>>>>> driver class 'com.mysql.jdbc.Driver' >>>>>>>>>>>> at >>>>>>>>>>>> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136) >>>>>>>>>>>> at >>>>>>>>>>>> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113) >>>>>>>>>>>> at >>>>>>>>>>>> org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79) >>>>>>>>>>>> ... 31 more >>>>>>>>>>>> Caused by: java.lang.ClassNotFoundException: >>>>>>>>>>>> com.mysql.jdbc.Driver >>>>>>>>>>>> at >>>>>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:558) >>>>>>>>>>>> at >>>>>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:59) >>>>>>>>>>>> at >>>>>>>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1427) >>>>>>>>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252) >>>>>>>>>>>> at >>>>>>>>>>>> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) >>>>>>>>>>>> at java.lang.Class.forName0(Native Method) >>>>>>>>>>>> at java.lang.Class.forName(Class.java:169) >>>>>>>>>>>> at >>>>>>>>>>>> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130) >>>>>>>>>>>> ... 34 more >>>>>>>>>>>> >>>>>>>>>>>> Apparently, this point has been discussed by Spring user : >>>>>>>>>>>> http://forum.springframework.org/showthread.php?t=59588 >>>>>>>>>>>> >>>>>>>>>>>> Regards, >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> ----- >>>>>>>>>>>> Charles Moulliard >>>>>>>>>>>> SOA Architect >>>>>>>>>>>> >>>>>>>>>>>> My Blog : http://cmoulliard.blogspot.com/ >>>>>>>>>>>> http://cmoulliard.blogspot.com/ >>>>>>>>>>>> -- >>>>>>>>>>>> View this message in context: >>>>>>>>>>>> http://www.nabble.com/SMX4-and-classloading-of-JDBC-driver-%28MySQL%2C-...%29---question----tp22620802p22620802.html >>>>>>>>>>>> Sent from the ServiceMix - User mailing list archive at >>>>>>>>>>>> Nabble.com. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Cheers, >>>>>>>>>>> Guillaume Nodet >>>>>>>>>>> ------------------------ >>>>>>>>>>> Blog: http://gnodet.blogspot.com/ >>>>>>>>>>> ------------------------ >>>>>>>>>>> Open Source SOA >>>>>>>>>>> http://fusesource.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ----- >>>>>>>>>> Charles Moulliard >>>>>>>>>> SOA Architect >>>>>>>>>> >>>>>>>>>> My Blog : http://cmoulliard.blogspot.com/ >>>>>>>>>> http://cmoulliard.blogspot.com/ >>>>>>>>>> -- >>>>>>>>>> View this message in context: >>>>>>>>>> http://www.nabble.com/SMX4-and-classloading-of-JDBC-driver-%28MySQL%2C-...%29---question----tp22620802p22621153.html >>>>>>>>>> Sent from the ServiceMix - User mailing list archive at >>>>>>>>>> Nabble.com. >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Cheers, >>>>>>>>> Guillaume Nodet >>>>>>>>> ------------------------ >>>>>>>>> Blog: http://gnodet.blogspot.com/ >>>>>>>>> ------------------------ >>>>>>>>> Open Source SOA >>>>>>>>> http://fusesource.com >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- >>>>>>> Charles Moulliard >>>>>>> SOA Architect >>>>>>> >>>>>>> My Blog : http://cmoulliard.blogspot.com/ >>>>>>> http://cmoulliard.blogspot.com/ >>>>>>> -- >>>>>>> View this message in context: >>>>>>> http://www.nabble.com/SMX4-and-classloading-of-JDBC-driver-%28MySQL%2C-...%29---question----tp22620802p22621770.html >>>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com. >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Cheers, >>>>>> Guillaume Nodet >>>>>> ------------------------ >>>>>> Blog: http://gnodet.blogspot.com/ >>>>>> ------------------------ >>>>>> Open Source SOA >>>>>> http://fusesource.com >>>>>> >>>>>> >>>>> >>>>> >>>>> ----- >>>>> Charles Moulliard >>>>> SOA Architect >>>>> >>>>> My Blog : http://cmoulliard.blogspot.com/ >>>>> http://cmoulliard.blogspot.com/ >>>>> -- >>>>> View this message in context: >>>>> http://www.nabble.com/SMX4-and-classloading-of-JDBC-driver-%28MySQL%2C-...%29---question----tp22620802p22623554.html >>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com. >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Cheers, >>>> Guillaume Nodet >>>> ------------------------ >>>> Blog: http://gnodet.blogspot.com/ >>>> ------------------------ >>>> Open Source SOA >>>> http://fusesource.com >>>> >>> >>> >>> >>> -- >>> Cheers, >>> Guillaume Nodet >>> ------------------------ >>> Blog: http://gnodet.blogspot.com/ >>> ------------------------ >>> Open Source SOA >>> http://fusesource.com >>> >> >> >> >> -- >> Cheers, >> Guillaume Nodet >> ------------------------ >> Blog: http://gnodet.blogspot.com/ >> ------------------------ >> Open Source SOA >> http://fusesource.com >> >> > > > ----- > Charles Moulliard > SOA Architect > > My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ > -- > View this message in context: > http://www.nabble.com/SMX4-and-classloading-of-JDBC-driver-%28MySQL%2C-...%29---question----tp22620802p22655909.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. > >
-- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com
