Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337543 - The RuntimeArtifactModel produces and swallows an NPE when getting requests for the faux KernelRegionBundle
Summary: The RuntimeArtifactModel produces and swallows an NPE when getting requests f...
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: 3.0.0.M01   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 3.0.0.M02   Edit
Assignee: Chris Frost CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-18 05:19 EST by Chris Frost CLA
Modified: 2011-02-21 08:54 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Frost CLA 2011-02-18 05:19:10 EST
When accessing bundles in the RuntimeArtifactModel (RAM) that have dependencies that cross in to the Kernel region a faux bundle is provided that represents the Kernel region. The RAM then tries to gather information on this fake bundle which causes a stacktrace in the logs, no exception is given out over the JMX interface.

To Reproduce:
Start up Virgo then use JConsole (or vsh or the admin console) to view a bundle with deps in the kernel region. Then go a browse the main log file and you will find the following stack trace.

[2011-02-18 09:53:58.483] http-8080-4                  o.e.virgo.kernel.shell.model.helper.StandardRamAccessorHelper     Unexpected error while trying to read the Runtime Artifact Model MBeans java.lang.reflect.UndeclaredThrowableException: null
	at $Proxy165.getState(Unknown Source)
	at org.eclipse.virgo.kernel.shell.model.helper.StandardRamAccessorHelper.buildArtifactAccessorPointer(StandardRamAccessorHelper.java:233)
	at org.eclipse.virgo.kernel.shell.model.helper.StandardRamAccessorHelper.getArtifact(StandardRamAccessorHelper.java:205)
	at org.eclipse.virgo.apps.admin.web.ArtifactController.data(ArtifactController.java:229)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710)
	at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167)
	at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)
	at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.eclipse.virgo.web.tomcat.ApplicationNameTrackingValve.invoke(ApplicationNameTrackingValve.java:29)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:680)
Caused by: javax.management.InstanceNotFoundException: org.eclipse.virgo.kernel:type=Model,artifact-type=bundle,name=org.eclipse.virgo.kernel,version=3.0.0.M01
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:662)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
	at com.sun.jmx.mbeanserver.MXBeanProxy$GetHandler.invoke(MXBeanProxy.java:106)
	at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:148)
	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:248)
	... 33 common frames omitted

Extra handling is needed for the new faux KernelRegionBundle.
Comment 1 Chris Frost CLA 2011-02-21 08:54:45 EST
Fixed with some extra code to handle this special case.