Problem undeploying Glassfish3.1.1 web application cleanly

#1

objectdb-2.3.7_18

When I undeploy a Glassfish3.1.1 web application when using @PersistenceContext EntityManager injection, using the undeploy feature under the Glassfish server node  of Netbeans7.1, I get the following otherwise harmless error:

java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [java.util.NoSuchElementException], because it has not yet been started, or was already stopped
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1411)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1369)
at com.objectdb.o.ERR.f(ERR.java:62)
at com.objectdb.o.OST.onObjectDBError(OST.java:581)
at com.objectdb.o.OMF.close(OMF.java:904)
at org.glassfish.persistence.jpa.JPADeployer.closeEMFs(JPADeployer.java:405)
at org.glassfish.persistence.jpa.JPADeployer.event(JPADeployer.java:396)
at org.glassfish.kernel.event.EventsImpl$1.run(EventsImpl.java:120)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

This was when using ObjectDB in embedded mode.

What is the correct procedure for undeploying such a web application that prevents this error.

#2

Integration of ObjectDB with Glassfish, especially in embedded mode, requires some improvements.

Is it possible to get this exception with the simple tutorial GuestBook example (which also uses @PersistenceContext EntityManager injection)?

ObjectDB Support
#3

> Is it possible to get this exception with the simple tutorial GuestBook example (which also uses @PersistenceContext EntityManager injection)?

Could not build GuestBook example from Maven, but I could create a new Netbeans web application and copy example source and persistence.xml into it and run it ok as JSP web application in Glassfish3.1.1. Undeploy did not exhibit the same problem on Guestbook.

#4

This strange exception is thrown when GlassFish tries to close ObjectDB's EntityManagers, and somehow basic classes are not found (probably class loading issue). Apparently build 2.3.7_22 that catches and ignores that specific exception enables clean undeployment.

Please try it.

ObjectDB Support

Reply