[jboss-osgi-issues] [JBoss JIRA] (JBOSGI-563) ClassCastException - AbstractResource cannot be cast to AbstractBundleRevision

Rico Neubauer (JIRA) jira-events at lists.jboss.org
Fri May 25 05:43:17 EDT 2012


     [ https://issues.jboss.org/browse/JBOSGI-563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rico Neubauer updated JBOSGI-563:
---------------------------------

    Git Pull Request: https://github.com/jbosgi/jbosgi-framework/pull/4

    
> ClassCastException - AbstractResource cannot be cast to AbstractBundleRevision
> ------------------------------------------------------------------------------
>
>                 Key: JBOSGI-563
>                 URL: https://issues.jboss.org/browse/JBOSGI-563
>             Project: JBoss OSGi
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Core Framework
>    Affects Versions: JBossOSGi 1.3.0
>            Reporter: Rico Neubauer
>            Assignee: Thomas Diesler
>              Labels: osgi
>
> Occurs with JBoss 7.1.2.Final (EAP) running with jbosgi-framework 1.3.0.Final
> Unfortunately not sure about the conditions - a vanilla JBoss does not show the symptom, I assume it depends on how bundle dependencies are defined, or on capability usages. Will try to find out more, but the following presents an issue anyway:
> Accessing bundles may throw a ClassCastException in:
> - org.jboss.osgi.framework.internal.HostBundleState#getDependentBundles()
> - org.jboss.osgi.framework.internal.PackageAdminPlugin.ExportedPackageImpl#getImportingBundles()
> - There are other places of unchecked casts to AbstractBundleRevision, but they may be OK.
> The following occurs when accessing the problematic bundles via felix web-console:
> {noformat}
> org.apache.felix.http.jetty	 WARN	 	 	 	 	 /system/console/bundles/0: java.lang.ClassCastException: org.jboss.osgi.resolver.spi.AbstractResource cannot be cast to org.jboss.osgi.framework.internal.AbstractBundleRevision
> 	at org.jboss.osgi.framework.internal.PackageAdminPlugin$ExportedPackageImpl.getImportingBundles(PackageAdminPlugin.java:536)
> 	at org.apache.felix.webconsole.internal.core.BundlesServlet.listImportExport(BundlesServlet.java:813)
> 	at org.apache.felix.webconsole.internal.core.BundlesServlet.bundleDetails(BundlesServlet.java:750)
> 	at org.apache.felix.webconsole.internal.core.BundlesServlet.bundleInfo(BundlesServlet.java:673)
> 	at org.apache.felix.webconsole.internal.core.BundlesServlet.writeJSON(BundlesServlet.java:568)
> 	at org.apache.felix.webconsole.internal.core.BundlesServlet.writeJSON(BundlesServlet.java:500)
> 	at org.apache.felix.webconsole.internal.core.BundlesServlet.renderContent(BundlesServlet.java:474)
> 	at org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:147)
> 	at org.apache.felix.webconsole.internal.core.BundlesServlet.doGet(BundlesServlet.java:246)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> 	at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:437)
> 	at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:384)
> 	at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
> 	at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
> 	at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
> 	at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
> 	at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
> 	at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
> 	at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
> 	at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> {noformat}
> Will attach a fix for those two locations.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-osgi-issues mailing list