You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall" <he...@ungoverned.org> on 2007/06/26 09:44:18 UTC

Re: Class load error with embedded bundle

[I gave this thread a subject...]

The first question I have is, does the bundle work when deployed into a 
non-embedded Felix (i.e., from the Felix shell)?

-> richard

Todd Nist wrote:
> I am having problems with deploying a bundle when embedding Felix. I do
> not believe that it has anything to do with the fact that it is
> embedded.  
>
> I have the following manifest:
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Leica Service Implementation
> Bundle-SymbolicName: com.lggi.esp.serviceimpl
> Bundle-Version: 1.0.0
> Bundle-Localization: plugin
> Bundle-Activator: com.lggi.esp.serviceimpl.ServiceImplBundleActivator
> Export-Package: com.lggi.esp.serviceimpl
> Import-Package: com.lggi.esp.serviceimpl,
>  com.lggi.esp.osgi,
>  com.lggi.esp.osgi.entity,
>  com.lggi.esp.osgi.services,
>  org.osgi.framework;version="1.3.0"
>
> I have validated that the jar file containing the bundle does in fact
> contain the class "com.lggi.esp.serviceimpl.ServiceImplBundleActivator".
>
> When I go to deploy this bundle I get the following exception:
>
> 17:01:46,036 INFO  [STDOUT] ---Starting up Felix OSGi Container 18---
> 17:01:46,192 INFO  [STDOUT] Starting the BaseBundleActivator:
> 17:01:46,302 INFO  [STDOUT] DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
> 17:01:46,302 INFO  [STDOUT] Starting the ESP BaseBundleActivator:
> 17:01:46,302 INFO  [STDOUT] DEBUG: WIRE: 2.0 -> com.lggi.esp.serviceimpl
> -> 2.0
> 17:01:46,302 INFO  [STDOUT] DEBUG: WIRE: 2.0 ->
> com.lggi.esp.osgi.services -> 0
> 17:01:46,302 INFO  [STDOUT] DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
> 17:01:46,302 INFO  [STDOUT] DEBUG: WIRE: 2.0 -> com.lggi.esp.osgi.entity
> -> 0
> 17:01:46,302 INFO  [STDOUT] DEBUG: WIRE: 2.0 -> com.lggi.esp.osgi -> 1.0
> 17:01:46,302 INFO  [STDOUT] WARNING: *** Package
> 'com.lggi.esp.serviceimpl' is i
> mported by bundle 2 from bundle 2, but the exported package from bundle
> 2 does n
> ot contain the requested class
> 'com.lggi.esp.serviceimpl.ServiceImplBundleActiva
> tor'. Please verify that the class name is correct in the importing
> bundle 2 and
> /or that the exported package is correctly bundled in 2. ***
> (java.lang.ClassNot
> FoundException: *** Package 'com.lggi.esp.serviceimpl' is imported by
> bundle 2 f
> rom bundle 2, but the exported package from bundle 2 does not contain
> the reques
> ted class 'com.lggi.esp.serviceimpl.ServiceImplBundleActivator'. Please
> verify t
> hat the class name is correct in the importing bundle 2 and/or that the
> exported
>  package is correctly bundled in 2. ***)
> 17:01:46,302 INFO  [STDOUT] ERROR: Error starting
> file:///D:\development\Brunswi
> ck-Maven\spike\embedded-osgi\Leica-OSGi-ServiceImpl-Bundle\target\osgi-s
> ervice-i
> mpl-1.0.0.jar (org.osgi.framework.BundleException: Not found:
> com.lggi.esp.servi
> ceimpl.ServiceImplBundleActivator)
> 17:01:46,302 ERROR [STDERR] java.lang.ClassNotFoundException:
> com.lggi.esp.servi
> ceimpl.ServiceImplBundleActivator
> 17:01:46,302 ERROR [STDERR]     at
> org.apache.felix.framework.Felix.createBundle
> Activator(Felix.java:3242)
> 17:01:46,302 ERROR [STDERR]     at
> org.apache.felix.framework.Felix._startBundle
> (Felix.java:1304)
> 17:01:46,302 ERROR [STDERR]     at
> org.apache.felix.framework.Felix.startBundle(
> Felix.java:1243)
> 17:01:46,302 ERROR [STDERR]     at
> org.apache.felix.framework.Felix.setFramework
> StartLevel(Felix.java:838)
> 17:01:46,302 ERROR [STDERR]     at
> org.apache.felix.framework.StartLevelImpl.run
> (StartLevelImpl.java:256)
> 17:01:46,302 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:595)
> 17:01:46,317 INFO  [STDOUT] value =
> osgi-server-ear-0.5/OSGiControllerBean/remot
> e
> 17:01:46,317 INFO  [STDOUT] {JNDI NAME =
> osgi-server-ear-0.5/OSGiControllerBean/
> remote }
> 17:01:46,458 INFO  [STDOUT] Total No of Bundles deployed [EJBContainer]:
> [ 3 ]
> 17:01:46,458 INFO  [STDOUT] Bundle Name => org.apache.felix.framework
> state => 3
> 2
> 17:01:46,458 INFO  [STDOUT] Bundle Name => com.lggi.esp.osgi state => 32
> 17:01:46,458 INFO  [STDOUT] Bundle Name => com.lggi.esp.serviceimpl
> state => 4
>
>
> If I crack open the bundle, I can see the class at:
>
>  
> osgi-service-impl-1.0.0.jar\com\lggi\esp\serviceimpl\ServiceImplBundleAc
> tivator.class
>
>
> Any ideas on what is going on here?
>
> Regards,
> Todd
>
>
>