[jboss-jira] [JBoss JIRA] Moved: (JBAS-7625) Thrown Errors while Context-Start are not logged
Remy Maucherat (JIRA)
jira-events at lists.jboss.org
Fri Jan 15 07:50:36 EST 2010
[ https://jira.jboss.org/jira/browse/JBAS-7625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Remy Maucherat moved JBWEB-158 to JBAS-7625:
--------------------------------------------
Project: JBoss Application Server (was: JBoss Web)
Key: JBAS-7625 (was: JBWEB-158)
Affects Version/s: JBossAS-5.1.0.GA
(was: JBossWeb-2.1.2.GA )
> Thrown Errors while Context-Start are not logged
> ------------------------------------------------
>
> Key: JBAS-7625
> URL: https://jira.jboss.org/jira/browse/JBAS-7625
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: JBossAS-5.1.0.GA
> Environment: JBoss 5.1.0.GA
> Reporter: Frank Stolle
> Assignee: Remy Maucherat
>
> I always got the following exception while deploying an application:
> 15:24:00,910 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=XXXXXXXXX/management state=Create mode=Manual requiredState=Installed
> org.jboss.deployers.spi.DeploymentException: URL file:/opt/jboss-5.1.0.GA/server/default/tmp/aaaa-44jwh6-g4fmqmf8-1-g4fmsf9j-9w/XXXXXXXX.war/ deployment failed
> at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)
> at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
> at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
> at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
> at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
> 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:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
> at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
> at $Proxy38.start(Unknown Source)
> at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
> at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
> ...
> No other error was logged. The reason was the following error, because a duplicate xml-api was in my classpath (my fault). I wrote a Context-listener which catched all Exceptions and Errors during initialization of Seam and so I got:
> java.lang.LinkageError: loader constraints violated when linking org/xml/sax/EntityResolver class
> at org.jboss.seam.util.XML.getRootElement(XML.java:22)
> at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:227)
> at org.jboss.seam.init.Initialization.create(Initialization.java:134)
> at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35)
> at my.ContextListener.contextInitialized(ContextListener.java:151)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
> at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
> at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
> ...
> I think TomcatDeployer should not only catch Exceptions, but also Errors and log them. In TomcatDeployment.java line 310ff:
> try
> {
> // Start it
> context.start();
> // Build the ENC
> }
> catch (Exception e)
> {
> context.destroy();
> DeploymentException.rethrowAsDeploymentException("URL " + warUrlStr + " deployment failed", e);
> }
> finally
> {
> RunAsListener.metaDataLocal.set(null);
> JBossContextConfig.metaDataLocal.set(null);
> JBossContextConfig.metaDataShared.set(null);
> JBossContextConfig.deployerConfig.set(null);
> JBossContextConfig.kernelLocal.set(null);
> JBossContextConfig.deploymentUnitLocal.set(null);
> }
> if (context.getState() != 1)
> {
> context.destroy();
> throw new DeploymentException("URL " + warUrlStr + " deployment failed");
> }
> we should add
> catch (Error e)
> {
> context.destroy();
> DeploymentException.rethrowAsDeploymentException("URL " + warUrlStr + " deployment failed", e);
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list