[jira] Closed: (NANO-38) integrationkit.LifecycleContainerBuilder no longer deals with null parent containers
jira-yCVjj/[email protected] Mon, 9 Feb 2004 18:15:12 -0500 (EST)
| Newsgroups | gmane.comp.java.nanocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Message:
The following issue has been closed.
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=NANO-38
Here is an overview of the issue:
---------------------------------------------------------------------
Key: NANO-38
Summary: integrationkit.LifecycleContainerBuilder no longer deals with null parent containers
Type: Bug
Status: Closed
Priority: Critical
Resolution: FIXED
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: NanoContainer
Components:
Core
Fix Fors:
1.0-alpha-1
Versions:
1.0-alpha-1
Assignee:
Reporter: Jacob Kjome
Created: Sun, 8 Feb 2004 10:51 PM
Updated: Mon, 9 Feb 2004 6:14 PM
Description:
With the new refactoring has come at least one bug. ServletContainerListener contains the following call on line 52...
containerBuilder.buildContainer(containerRef, null, context);
That ends up in a call to org.nanocontainer.integrationkit.LifecycleContainerBuilder where it takes the "null" parameter as the parentContainerRef and tries to do...
PicoContainer parentContainer = (PicoContainer) parentContainerRef.get();
Of course, that ends up in a null pointer exception, the stacktrace of which can be seen below. The code used to deal with a null parentContainerRef but now assumes it to be non-null. Either the call to buildContainer from ServletContainerListener needs to pass a non-null container reference or this code needs to handle nulls again. Maybe a clarification in the javadoc (or actually adding some javadoc) would help? Either way, until this is fixed, the servlet stuff will fail with the exception below.
Jake
2004-02-08 21:18:24 StandardContext[/picoservlet]Exception sending context initialized event to listener instance of class org.nanocontainer.servlet.ServletContainerListener
java.lang.NullPointerException
at org.nanocontainer.integrationkit.LifecycleContainerBuilder.buildContainer(LifecycleContainerBuilder.java:24)
at org.nanocontainer.servlet.ServletContainerListener.contextInitialized(ServletContainerListener.java:52)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3775)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4269)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:840)
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:324)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:123)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:520)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:906)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:527)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
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:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira