Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to get read of closed entityManager after each redeployment?(Each time I redeploy on save my web app I have error: java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManagerFactory.)
How to get read of closed entityManager after each redeployment? [message #994777] Fri, 28 December 2012 03:38
volodia levytskyi is currently offline volodia levytskyi
Messages: 3
Registered: May 2012
Junior Member
Hello!

I decided to move to Eclipse Juno because it can redeploy my web maven project quickly on save. And it is working well.
Unfortunately there is one bad thing:
Eclipse redeploys my webapp and error with EntityManager arises
- NullPointerException - because it was not injected.
Then I try to remove the error click to save and as a result I always have the error:
Caused by: java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManagerFactory.
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.verifyOpen(EntityManagerFactoryDelegate.java:305)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:276)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:279)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.zeroturnaround.jrebel.integration.eclipselink.EntityManagerFactoryMethodHandler.invokeInternal(EntityManagerFactoryMethodHandler.java:117)
	at org.zeroturnaround.jrebel.integration.eclipselink.EntityManagerFactoryMethodHandler.invokeCreateEntityManager(EntityManagerFactoryMethodHandler.java:103)
	at org.zeroturnaround.jrebel.integration.eclipselink.EntityManagerFactoryMethodHandler.invoke(EntityManagerFactoryMethodHandler.java:77)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl_$$_javassist_1.createEntityManager(EntityManagerFactoryImpl_$$_javassist_1.java)
	at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:208)
	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.getCriteriaBuilder(EntityManagerWrapper.java:895)
	at com.javahelp.util.StartBean.fillForumFirstWordMap(StartBean.java:54)
	at com.javahelp.util.StartBean.init(StartBean.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)

I found on the Internet that this is a bug of eclipse juno.
I use the latest version 1.5.1.20120917.

Is there any workaround for this?

Thank you!

[Updated on: Sat, 29 December 2012 04:20]

Report message to a moderator

Previous Topic:Eclipse Juno error
Next Topic:Undo/Redo mechanism
Goto Forum:
  


Current Time: Sat Apr 19 16:14:46 EDT 2014

Powered by FUDForum. Page generated in 0.01497 seconds