[
https://jira.jboss.org/jira/browse/JBAS-5917?page=com.atlassian.jira.plug...
]
Adrian Brock commented on JBAS-5917:
------------------------------------
The answer to your question depends upon what the "error" is.
In general in JBoss5 we have "all or nothing" deployment.
However there are cases where it allows the deployment to stay in the incomplete state,
this is mainly for missing dependencies where deploying the missing dependency
(a seperate deployment) will allow the deployment to complete without having to redeploy
it.
In that case, the incomplete state is not a problem because the application is not
usable/accessible
until the dependency exists.
For an unrecoverable error like this example, the deployment should be removed,
since it is unusable and unfixable without a redeployment.
Here, you can see that the deployment has been removed, but there
is still something lying around within Tomcat.
It shows up as being able issue requests to the broken webapp
which fails because the classloader no longer exists:
15:56:31,165 ERROR [CoyoteAdapter] An exception or error occurred in the container during
the request processing
java.lang.IllegalStateException:
BaseClassLoader@26154b{vfszip:/home/ejort/jboss-head/testsuite/output/lib/test-jpa-weblibs.war}
classLoader is not connected to a domain (probably undeployed?) for class
org.jboss.security.plugins.JBossSecurityContext
at
org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:725)
at
org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:374)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.jboss.security.SecurityContextFactory.getContextClass(SecurityContextFactory.java:142)
at
org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:68)
at
org.jboss.web.tomcat.security.SecurityAssociationActions$4.run(SecurityAssociationActions.java:231)
at java.security.AccessController.doPrivileged(Native Method)
at
org.jboss.web.tomcat.security.SecurityAssociationActions.createSecurityContext(SecurityAssociationActions.java:227)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:81)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:325)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Error during deployment means cannot redeploy
---------------------------------------------
Key: JBAS-5917
URL:
https://jira.jboss.org/jira/browse/JBAS-5917
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Web (Tomcat) service
Reporter: Adrian Brock
Assignee: Remy Maucherat
Fix For: JBossAS-5.0.0.CR2
While writing a test for JBAS-5912 I found a bug in Tomcat deployment.
Basically, it fails to deploy because the persistence context is "missing":
Caused by: java.lang.IllegalArgumentException: Can't find a persistence unit named
'test' in
AbstractVFSDeploymentContext@29881315{vfszip:/home/ejort/jboss-head/testsuite/output/lib/test-jpa-weblibs.war}
at
org.jboss.jpa.resolvers.DefaultPersistenceUnitDependencyResolver.resolvePersistenceUnitSupplier(DefaultPersistenceUnitDependencyResolver.java:141)
at
org.jboss.web.tomcat.service.TomcatInjectionContainer.resolvePersistenceUnitSupplier(TomcatInjectionContainer.java:652)
at
org.jboss.injection.PersistenceUnitHandler.addPUDependency(PersistenceUnitHandler.java:124)
at
org.jboss.injection.PersistenceContextHandler.loadXml(PersistenceContextHandler.java:76)
at
org.jboss.web.tomcat.service.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:515)
at org.jboss.web.tomcat.service.WebCtxLoader.start(WebCtxLoader.java:158)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4251)
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:354)
It then becomes impossible to fix because something is not undeployed properly.
Subsequent redeployments get the message:
org.jboss.deployers.spi.DeploymentException: Web mapping already exists for deployment
URL
file:/home/ejort/jboss-head/build/output/jboss-5.0.0.CR2/server/default/tmp/deploy/test-jpa-weblibs23565-exp.war/
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:185)
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:140)
at
org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:459)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:96)
--
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