You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application with the JPA enabled and I want to pre-populate the database prior to the web pages becoming active. I added an event listener and within the StartupEvent listener onStart(@observes StartupEvent event) I invoked EntityManager functions. The EntityManager has been Injected. At runtime the startup method is invoked but I get the following exception:
Caused by: javax.enterprise.context.ContextNotActiveException
at org.jboss.protean.arc.RequestContext.get(RequestContext.java:50)
at org.jboss.shamrock.jpa.runtime.TransactionEntityManagers_ClientProxy.delegate(Unknown Source)
at org.jboss.shamrock.jpa.runtime.TransactionEntityManagers_ClientProxy.getEntityManager(Unknown Source)
at org.jboss.shamrock.jpa.runtime.JPAResourceReferenceProvider$1.delegate(JPAResourceReferenceProvider.java:54)
at org.jboss.shamrock.jpa.runtime.entitymanager.ForwardingEntityManager.persist(ForwardingEntityManager.java:43)
I need a way to know that the application is ready, is a startup event that is involved after all the other framework mechanics have completed
The text was updated successfully, but these errors were encountered:
I have an application with the JPA enabled and I want to pre-populate the database prior to the web pages becoming active. I added an event listener and within the StartupEvent listener onStart(@observes StartupEvent event) I invoked EntityManager functions. The EntityManager has been Injected. At runtime the startup method is invoked but I get the following exception:
Caused by: javax.enterprise.context.ContextNotActiveException
at org.jboss.protean.arc.RequestContext.get(RequestContext.java:50)
at org.jboss.shamrock.jpa.runtime.TransactionEntityManagers_ClientProxy.delegate(Unknown Source)
at org.jboss.shamrock.jpa.runtime.TransactionEntityManagers_ClientProxy.getEntityManager(Unknown Source)
at org.jboss.shamrock.jpa.runtime.JPAResourceReferenceProvider$1.delegate(JPAResourceReferenceProvider.java:54)
at org.jboss.shamrock.jpa.runtime.entitymanager.ForwardingEntityManager.persist(ForwardingEntityManager.java:43)
I need a way to know that the application is ready, is a startup event that is involved after all the other framework mechanics have completed
The text was updated successfully, but these errors were encountered: