You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Tony Weston (JIRA)" <ji...@apache.org> on 2016/06/30 13:35:10 UTC

[jira] [Created] (TOMEE-1854) Hot deploy does not work, if previous deploy failed.

Tony Weston created TOMEE-1854:
----------------------------------

             Summary: Hot deploy does not work, if previous deploy failed.
                 Key: TOMEE-1854
                 URL: https://issues.apache.org/jira/browse/TOMEE-1854
             Project: TomEE
          Issue Type: Bug
            Reporter: Tony Weston
            Priority: Minor


If a project deployed as a war into TOMEE, has a problem starting up,  if this problem is then fixed and hot re-deploy is attempted, it will fail with the following exception:





To reproduce this error, create a simple JavaEE project with a single class that will be executed, but fail on startup.  Build as a war, then drop it into the Webapps directory.   Tomee will fail to deploy this app, as expected.

Then comment out the throw RuntimeException(), and rebuild as a war again.  Attempt to deploy this war into Tomee.

The error below will appear.  
As a workaround, tomee can be restarted, then the application works as expected.


@Singleton
@Startup
public class CrappyStartup {

	@PostConstruct
	public void init(){
		System.out.println("gonna crash...!");
		throw new RuntimeException("Crash!");
	}

}




SEVERE - Error merging Java EE JNDI entries in to war /BadProject: Exception: null
java.lang.NullPointerException
        at org.apache.catalina.core.NamingContextListener.createSubcontexts(NamingContextListener.java:1291)
        at org.apache.catalina.core.NamingContextListener.addEnvironment(NamingContextListener.java:875)
        at org.apache.catalina.core.NamingContextListener.processGlobalResourcesChange(NamingContextListener.java:548)
        at org.apache.catalina.core.NamingContextListener.propertyChange(NamingContextListener.java:498)
        at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
        at org.apache.catalina.deploy.NamingResourcesImpl.addEnvironment(NamingResourcesImpl.java:276)
        at org.apache.tomee.catalina.OpenEJBNamingResource.addEnvironment(OpenEJBNamingResource.java:78)
        at org.apache.tomee.catalina.TomcatJndiBuilder.mergeRef(TomcatJndiBuilder.java:400)
        at org.apache.tomee.catalina.TomcatJndiBuilder.mergeJndi(TomcatJndiBuilder.java:126)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1343)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1115)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5076)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
javax.naming.NameNotFoundException: Name [comp] is not bound in this Context. Unable to find [comp].
        at org.apache.naming.NamingContext.lookup(NamingContext.java:817)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:174)
        at org.apache.tomee.catalina.TomcatJndiBuilder.mergeJava(TomcatJndiBuilder.java:263)
        at org.apache.tomee.catalina.TomcatJavaJndiBinder.lifecycleEvent(TomcatJavaJndiBinder.java:31)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5076)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)