users@glassfish.java.net

java.lang.ClassCastException in glassfish

From: <forums_at_java.net>
Date: Thu, 12 Jan 2012 05:26:41 -0600 (CST)

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 [1] I
modified the example. You can find my customized example file:
http://uploading.com/files/cf1ffd63/test.zip/ [2] 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

 

 


[1] http://blogs.oracle.com/arungupta/entry/totd_154_dynamic_osgi_services
[2] http://uploading.com/files/cf1ffd63/test.zip/

--
[Message sent by forum member 'rcbandit']
View Post: http://forums.java.net/node/882669