On 10/7/10 6:02, Felix Schmidt wrote:
Thanks for this hint, I moved packageXY to another bundle. The next
problem is that my implementation and the interface could not be cast
into each other.
ERROR: EventDispatcher: Error during dispatch.
(java.lang.ClassCastException: implementationXY cannot be cast to
serviceInterfaceXY)
If your implementation is in the host, then yes, that won't work. Just
like the doc I pointed you to mentions, if you need to communicate
between the host and the bundles, then you likely will have to put your
shared API on the class path, unless you want to use reflection.
-> richard
Thank you
felix
Am 10/7/2010 8:29 AM, schrieb Michael Hess:
Hi Felix,
just an idea, but I think you should move packageXY into another bundle,
as this might actually be a very good opportunity to get a "feel" for
how the wiring of the classpath's between bundles works.
Just my .02
Michael
thank you very much.
It works :)
Am 10/6/2010 11:52 PM, schrieb Richard S. Hall:
On 10/6/10 17:44, Felix Schmidt wrote:
I wrote a simple host application. This host application embedds
the
felix framework. If I run it and deploy a external bundle which
should
implement a service I get the following exception
DEBUG: No viable candidates
(org.apache.felix.framework.resolver.ResolveException: Unable to
resolve
1.0: missing requirement [1.0] package; (package=packageXY))
ERROR: Error starting file:filename.jar
(org.osgi.framework.BundleException: Unresolved constraint in
bundle
bundleName [1]: Unable to resolve 1.0: missing requirement [1.0]
package; (package=packageXY))
org.osgi.framework.BundleException: Unresolved constraint in bundle
bundleName [1]: Unable to resolve 1.0: missing requirement [1.0]
package; (package=packageXY)
at
org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
at
org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1143)
at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:717)
Could any body helps me?
Is there another bundle installed in the framework that exports
pacakgeXY?
Yes. The host application has the package included and a Activator.
Maybe here is the problem with the embedded felix and the exported
package.
If you want to export a package from the host, you need to add it to
the
org.osgi.framework.system.packages.extra property...read this:
http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
-> richard
Thank you
Felix
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
The information included in this e-mail and any files transmitted with it is
strictly confidential and may be privileged or otherwise protected from
disclosure. If you are not the intended recipient, please notify the sender
immediately by e-mail and delete this e-mail as well as any attachment from
your system. If you are not the intended recipient you are not authorized to
use and/or copy this message and/or attachment and/or disclose the contents to
any other person.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]