Skip to main content



      Home
Home » Eclipse Projects » Virgo » Error deploying bundle with embedded jar to Virgo 3.5.0
Error deploying bundle with embedded jar to Virgo 3.5.0 [message #895485] Fri, 13 July 2012 04:58 Go to next message
Eclipse UserFriend
I have a simple OSGi bundle that wraps an Oracle driver jar. I've been deploying the exact same bundle to Felix successfully for a while, but on putting it in the Virgo repository/usr folder I get the following exception:

Caused by: java.lang.NoClassDefFoundError: javax/sql/ConnectionPoolDataSource
	at uk.x.osgi.oracle.jdbc.Activator.start(Activator.java:35)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
	... 20 common frames omitted
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: javax.sql.ConnectionPoolDataSource in KernelBundleClassLoader: [bundle=uk.x.osgi.oracle.jdbc_1.0.2]
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:139)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 24 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.sql.ConnectionPoolDataSource
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:135)
	... 25 common frames omitted


It's failing to find the javax.sql class. At that point my activator is trying to register the data source as a service.

The bundle structure is:

-lib
--ojdbc14.jar
-META-INF
--MANIFEST.MF
-uk
--.... (class files)

and the manifest is:

Manifest-Version: 1.0
Export-Package: oracle.core.lmx,oracle.core.lvf,oracle.jdbc,oracle.jdb
 c.connector,oracle.jdbc.driver,oracle.jdbc.internal,oracle.jdbc.oci,o
 racle.jdbc.oracore,oracle.jdbc.pool,oracle.jdbc.rowset,oracle.jdbc.ut
 il,oracle.jdbc.xa,oracle.jdbc.xa.client,oracle.jpub.runtime,oracle.ne
 t.TNSAddress,oracle.net.ano,oracle.net.aso,oracle.net.jndi,oracle.net
 .nl,oracle.net.nl.mesg,oracle.net.ns,oracle.net.nt,oracle.net.resolve
 r,oracle.security.o3logon,oracle.sql,oracle.sql.converter
Bundle-ClassPath: lib/ojdbc14.jar,.
Bundle-Version: 1.0.2
Bundle-Name: Oracle JDBC
Bundle-Activator: uk.x.osgi.oracle.jdbc.Activator
Bundle-ManifestVersion: 2
Import-Package: org.osgi.framework;version="1.5.0",org.osgi.service.jd
 bc;version="1.0.0"
Bundle-SymbolicName: uk.x.osgi.oracle.jdbc
Bundle-RequiredExecutionEnvironment: JavaSE-1.6



Any ideas why this would work on Felix but fail on Virgo?
Thanks,
Nick

[Updated on: Fri, 13 July 2012 05:15] by Moderator

Re: Error deploying bundle with embedded jar to Virgo 3.5.0 [message #895493 is a reply to message #895485] Fri, 13 July 2012 05:23 Go to previous messageGo to next message
Eclipse UserFriend
Figured it out. The javax.sql package was provided by boot delegation on my Felix container. Adding it to the bundle import fixes the problem for Virgo.

[Updated on: Fri, 13 July 2012 05:23] by Moderator

Re: Error deploying bundle with embedded jar to Virgo 3.5.0 [message #895821 is a reply to message #895493] Mon, 16 July 2012 04:22 Go to previous message
Eclipse UserFriend
Glad you are sorted. Note that you can configure boot delegation packages in Virgo if that's more convenient - see the User Guide.
Previous Topic:Virgo 3.5.0.RELEASE
Next Topic:OSGI + Virgo + Snaps + JSF 2
Goto Forum:
  


Current Time: Wed Jul 02 19:47:33 EDT 2025

Powered by FUDForum. Page generated in 0.05656 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top