Problem deploying the same app in different directories more than 2 times
My env is CentOS6.2 64 bits + GF126.96.36.199 + JDK1.7.09 64 bits.
I have a webapp made with NetBeans7.2 + JSF2.1 + CDI/WELD + CODI + RichFaces + JTA + Hibernate.
Then, I put the same webapp in many directories, changing web.xml, persistence.xml (to point to right database pool). My server runs one webapp per client of my enterprise.
The problem is that when I try to deploy a webapp after the second or third, GF arises this error:
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.glassfish.webservices.WSServletContextListener. Please see server.log for more details.
But there isn't more helpful information in server.log. If I stop/start GF, sometimes I got to deploy until 3 webapps, not more than that. But I would like to put 7 same webapps running here.
The strange is that sometimes the error is not this above. The error is this, for the same attempt to deploy:
[#|2012-10-23T15:01:56.476-0200|INFO|glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=254;_ThreadName=Thread-2;|No timers to be deleted for id: 88539854347632640|#]
[#|2012-10-23T15:01:56.484-0200|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=254;_ThreadName=Thread-2;|Exception while shutting down application container : java.lang.NullPointerException|#]