With "OSGi bundles headers" do U mean my pom.xml? it is the standard one generated by the mvn archetype with the few changes I wrote in my initial message... In any case ( http://www.nabble.com/file/p23822127/test-wsdl-first-osgi.tgz test-wsdl-first-osgi.tgz )
my POM.XML <extensions>true</extensions> <configuration> <instructions> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName> <Import-Package> javax.jws, javax.wsdl, javax.xml.bind, javax.xml.bind.annotation, javax.xml.namespace, javax.xml.ws, META-INF.cxf, META-INF.cxf.osgi, org.apache.cxf.bus, org.apache.cxf.bus.spring, org.apache.cxf.bus.resource, org.apache.cxf.configuration.spring, org.apache.cxf.resource, org.apache.cxf.jaxws, org.apache.servicemix.cxf.transport.http_osgi, org.springframework.beans.factory.config, org.springframework.jdbc.datasource, com.mysql.jdbc, * </Import-Package> <!-- Update Private Package tag with appropriate package name --> <Private-Package> org.apache.servicemix.samples.wsdl_first, org.apache.servicemix.samples.wsdl_first.types </Private-Package> <Require-Bundle>org.apache.cxf.cxf-bundle</Require-Bundle> <DynamicImport-Package>*</DynamicImport-Package> </instructions> </configuration> Other infos s...@root:/> features/list|grep -i cxf [uninstalled] [ 4.0.0] examples-cxf-camel-nmr [uninstalled] [ 4.0.0] examples-cxf-nmr [installed ] [ 2.1.4] cxf [installed ] [ 2009.01] servicemix-cxf-bc [installed ] [ 2009.01] servicemix-cxf-se [installed ] [ 1.6.0] camel-cxf [uninstalled] [ 4.0.0] cxf-nmr [uninstalled] [ 4.0.0] examples-cxf-osgi [installed ] [ 4.0.0] cxf-osgi s...@root:/> osgi/list| grep -i jdbc [ 164] [Active ] [ ] [ 60] camel-jdbc (1.6.0) [ 181] [Active ] [ ] [ 60] Spring JDBC (2.5.6) s...@root:/> osgi/list| grep -i sql [ 182] [Active ] [ ] [ 60] camel-sql (1.6.0) [ 200] [Active ] [ ] [ 60] Apache ServiceMix Bundles: ibatis-sqlmap-2.3.4.726 (2.3.4.726_1) [ 272] [Active ] [ ] [ 60] mvn:mysql/mysql-connector-java/5.0.8 s...@root:/> osgi/list| grep -i cxf [ 111] [Active ] [ ] [ 60] Apache CXF Bundle Jar (2.1.4) [ 113] [Active ] [Started] [ 60] ServiceMix :: CXF Binding Component (2009.01) [ 129] [Active ] [ ] [ 60] Apache CXF Runtime JBI Binding (2.1.4) [ 130] [Active ] [ ] [ 60] Apache CXF Runtime JBI Transport (2.1.4) [ 131] [Active ] [Started] [ 60] ServiceMix :: CXF Service Engine (2009.01) [ 217] [Active ] [ ] [ 60] camel-cxf (1.6.0) [ 259] [Active ] [Started] [ 60] Apache ServiceMix CXF Transport for OSGi (4.0.0) [ 297] [Installed ] [ ] [ 60] A CXF WSDL First OSGi Project (1.0.0.SNAPSHOT) my LOG/D 21:37:01,431 | INFO | Timer-1 | FileMonitor | x.kernel.filemonitor.FileMonitor 394 | Undeploying: /usr/local/apache-servicemix-4.0.0/deploy/test-wsdl-first-osgi-1.0-SNAPSHOT.jar 21:37:05,720 | INFO | localShell | CommandLineExecutorImpl | om.shell.CommandLineExecutorImpl 64 | Executing (String): log/d 21:37:05,721 | INFO | localShell | CommandLineExecutorImpl | om.shell.CommandLineExecutorImpl 104 | Executing (log/d): [] 21:38:16,934 | INFO | Timer-1 | FileMonitor | x.kernel.filemonitor.FileMonitor 374 | Deploying: /usr/local/apache-servicemix-4.0.0/deploy/test-wsdl-first-osgi-1.0-SNAPSHOT.jar 21:38:16,987 | WARN | Timer-1 | FileMonitor | x.kernel.filemonitor.FileMonitor 552 | Failed to start bundle: test-wsdl-first-osgi [297]. Reason: org.osgi.framework.BundleException: Unresolved constraint in bundle 297: package; (package=com.mysql.jdbc) org.osgi.framework.BundleException: Unresolved constraint in bundle 297: package; (package=com.mysql.jdbc) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3059) at org.apache.felix.framework.Felix.startBundle(Felix.java:1439) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:770) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:751) at org.apache.servicemix.kernel.filemonitor.FileMonitor.refreshPackagesAndStartOrUpdateBundles(FileMonitor.java:549) at org.apache.servicemix.kernel.filemonitor.FileMonitor.onFilesChanged(FileMonitor.java:299) at org.apache.servicemix.kernel.filemonitor.FileMonitor$1.filesChanged(FileMonitor.java:151) at org.apache.servicemix.kernel.filemonitor.Scanner.reportBulkChanges(Scanner.java:431) at org.apache.servicemix.kernel.filemonitor.Scanner.reportDifferences(Scanner.java:327) at org.apache.servicemix.kernel.filemonitor.Scanner.scan(Scanner.java:261) at org.apache.servicemix.kernel.filemonitor.Scanner$1.run(Scanner.java:221) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Jean-Baptiste Onofré wrote: > > Hi Matteo, > > could you send the OSGi bundles headers to check the dependencies ? > > Thanks > JB > > Matteo Redaelli wrote: >> Hello >> >> In smx4 I'm tring to convert the JBI example cxf-wsdl-first-jdbc >> (http://matteoredaelli.wordpress.com/2009/05/30/connecting-to-a-database-with-a-webservice-cxf-deployed-jbi-in-servicemix/) >> with a similar OSGI project. >> >> I created a project using >> >> mvn archetype:create \ >> -DarchetypeGroupId=org.apache.servicemix.tooling \ >> -DarchetypeArtifactId=servicemix-osgi-cxf-wsdl-first-archetype \ >> -DarchetypeVersion=2008.01-SNAPSHOT \ >> -DgroupId=com.yourcompany \ >> -DartifactId=test-wsdl-first-osgi \ >> -Dversion=1.0-SNAPSHOT \ >> >> -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/ >> >> Than I added osgi wraps for spring-jdnc and mysql with >> >> osgi/install wrap mvn:org.springframework/spring-jdbc/2.5.6 >> osgi/install wrap mvn:mysql/mysql-connector-java/5.0.8 >> >> [ 181] [Active ] [ ] [ 60] Spring JDBC (2.5.6) >> [ 272] [Active ] [ ] [ 60] >> mvn:mysql/mysql-connector-java/5.0.8 >> >> MY changes in pom.xml are: >> >> <dependency> >> <groupId>mysql</groupId> >> <artifactId>mysql-connector-java</artifactId> >> <version>5.0.8</version> >> </dependency> >> <dependency> >> <groupId>org.springframework</groupId> >> <artifactId>spring-jdbc</artifactId> >> <version>2.5.6</version> >> </dependency> >> ... >> <Import-Package> >> ... >> org.springframework.jdbc.datasource, >> com.mysql.jdbc, * >> </Import-Package> >> ... >> <DynamicImport-Package>*</DynamicImport-Package> >> >> MY beans.xml >> ... >> <bean id="moodleDB" >> >> class="org.springframework.jdbc.datasource.DriverManagerDataSource"> >> <property name="driverClassName" >> value="com.mysql.jdbc.Driver" /> >> <property name="url" >> value="jdbc:mysql://localhost:3306/moodle" /> >> <property name="username" value="root" /> >> <property name="password" value="" /> >> </bean> >> ... >> >> >> Questions: >> >> 1) how can load properly mysql jar in smx? >> >> I have the error >> >> s...@root:/> osgi/start 292 >> ERROR CommandLineExecutionFailed: >> org.apache.geronimo.gshell.command.CommandException: >> org.osgi.framework.BundleException: Unresolved constraint in bundle 292: >> package; (package=com.mysql.jdbc) >> >> In a camel tutorial I found >> >> <feature name="jdbc-driver"> >> ... >> >> <bundle>mvn:com.mysql.jdbc/com.springsource.com.mysql.jdbc/5.1.6</bundle> >> </feature> >> >> but osgi/install wrap >> mvn:com.mysql.jdbc/com.springsource.com.mysql.jdbc/5.1.6 doesn't work >> >> >> 2) the file beans.xml generated by maven archetype is quite different >> from >> the one of cxf-wsdl-first. where/how can I add the "property datasource" >> ? >> >> I see >> >> <jaxws:endpoint id="HTTPEndpoint" >> implementor="org.apache.servicemix.samples.wsdl_first.PersonImpl" >> address="/PersonService" >> wsdlLocation="wsdl/person.wsdl" >> endpointName="e:soap" >> serviceName="s:PersonService" >> xmlns:e="http://servicemix.apache.org/samples/wsdl-first" >> xmlns:s="http://servicemix.apache.org/samples/wsdl-first"/> >> >> Thanks in advance >> Matteo > > -- > Jean-Baptiste Onofré (Nanthrax) > BuildProcess/AutoDeploy Project Leader > http://buildprocess.sourceforge.net > j...@nanthrax.net > PGP : 17D4F086 > > -- View this message in context: http://www.nabble.com/sample-cxf-wsdl-first-jdbc-as-OSGI-package-tp23820077p23822127.html Sent from the ServiceMix - User mailing list archive at Nabble.com.