I'm working on a simple application with Glassfish and OSGI. I found this tutorial: http://blogs.oracle.com/arungupta/entry/totd_154_dynamic_osgi_services I modified the example. You can find my customized example file: http://uploading.com/files/cf1ffd63/test.zip/ I created EAR package with web module and EJB module. I created a session bean which calls the OSGI bundle. I successfully compiled the project. The problem is that when i uploaded the packages into Glassfish application server and tried to open the simple applet into the web module this error message appears:
HTTP Status 500 -
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.ClassCastException: Cannot cast org.glassfish.web.loader.WebappClassLoader to org.osgi.framework.BundleReference
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1.1 logs.
GlassFish Server Open Source Edition 3.1.1
Maybe the problem is missing dependency. I can't find the problem? Do you have any idea what may be the problem?