Skip to main content


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 08:38
volodia levytskyi is currently offline volodia levytskyiFriend
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 09:20]

Report message to a moderator

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


Current Time: Thu Apr 18 23:35:39 GMT 2024

Powered by FUDForum. Page generated in 0.02943 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top