In short, it sounds like you packaged the bundle incorrectly. I would guess that your JAR does not contain the class at all or that it is in the wrong package.

-> richard

jaredmac wrote:
Richard S. Hall wrote:
Well, you shouldn't be importing that package, because no one exports it...it is a private package of the example1 bundle.

The only import should be org.osgi.framework, just like is shown in the web page.


Indeed, that's why I wrote that I wasn't sure it made any sense to do so.
Naturally the first thing I tried was the example verbatim. But you are
correct in that removing "tutorial.example1" from Import-Packages changes
the error I get, and this is the error I should have posted first:

-> start file:/C:\felix-temp\example1.jar
DEBUG: WIRE: 4.0 -> org.osgi.framework -> 0
WARNING: *** Class 'tutorial.example1.Activator' was not found. Bundle 4
does no
t import package 'tutorial.example1', nor is the package exported by any
other b
undle or available from the system class loader. ***
(java.lang.ClassNotFoundExc
eption: *** Class 'tutorial.example1.Activator' was not found. Bundle 4 does
not
 import package 'tutorial.example1', nor is the package exported by any
other bu
ndle or available from the system class loader. ***)
org.osgi.framework.BundleException: Not found: tutorial.example1.Activator
        at
org.apache.felix.framework.Felix.createBundleActivator(Felix.java:348
3)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1580)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1519)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:354)
        at
org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl
.java:82)
        at
org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand
(Activator.java:265)
        at
org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.j
ava:167)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: tutorial.example1.Activator
        ... 8 more
java.lang.ClassNotFoundException: tutorial.example1.Activator

I think the "Bundle 4 does not import package tutorial1.example" was also
what compelled me to try putting the package in the Import-Package list.

Thanks,
Jared

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to