Felix,

Thanks for the response.  Unfortunately, the class is public:

package com.lggi.esp.serviceimpl;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;

import com.lggi.esp.osgi.BaseBundleActivator;

import com.lggi.esp.osgi.services.UserManager;
/**
 * Activator class for the plugin.
 * @author admin
 */
public class ServiceImplBundleActivator extends BaseBundleActivator {
....
}

As for the wiring, I believe that it is correct.  The com.lggi.esp.osgi
bundle only contains one class, BaseBundleActivator, which the
ServiceImplBundleActivator extends.  The com.lggi.esp.osgi bundle has no
references to any other bundles other then the org.osgi.framework
bundle.  The com.lggi.esp.serviceimpl bundle does reference both the
com.lggi.esp.osgi.service bundle and the com.lggi.esp.osgi.entity
bundle, which are deployed inside of JBoss, but are accessible by adding
the packages to the org.osgi.framework.system.packages property in the
embedded instance:

    configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES,
        "org.osgi.framework; version=1.3.0,"
        + "org.osgi.service.packageadmin; version=1.2.0,"
        + "org.osgi.service.startlevel; version=1.0.0,"
        + "org.osgi.service.url; version=1.0.0,"
        + "com.lggi.esp.osgi.services; version=1.0.0,"
        + "com.lggi.esp.osgi.entity; version=1.0.0");

If I remove the dependency on the com.lggi.esp.osgi bundle by not
extending the BaseBundleActivator class, the bundle deploys
successfully. 

Any other thoughts as to what my be going on here?

Regards,
Todd

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Felix
Meschberger
Sent: Tuesday, June 26, 2007 1:26 AM
To: [email protected]
Subject: Re: Problem deploying Bundle

Hi Todd,

Just a wild guess: Is the class public ?

Also, is it correct for the com.lggi.esp.osgi bundle to wire to bundle 1
while the entity and services subpackages wire to bundle 0 ? Could it be
that the constructor references a class in the entity or services
subpackage
which in turn references a class in the com.lggi.esp.osgi bundle, which
is
of course different for the activator's bundle, than the subpackages
which I
assume are located outside of the framework.

Regards
Felix

On 6/25/07, Todd Nist <[EMAIL PROTECTED]> wrote:
>
> Sorry for the duplicate post, but I forgot to give it a subject.
>
> -----Original Message-----
> From: Todd Nist [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 25, 2007 5:14 PM
> To: [EMAIL PROTECTED]
> Subject:
>
> 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
>
>
>

Reply via email to