Why does transaction-type = "JTA" call "a WebBeans context with an area type annotation @RequestScoped does not exist in the current thread"?

In my persistence.xml when I go from

transaction-type="RESOURCE_LOCAL" 

to

 transaction-type="JTA" 

I get this error:

 WebBeans context with scope type annotation @RequestScoped does not exist within current thread viewId=/pages/login.xhtml location=/home/jakub/Projekty/Collv2/build/web/pages/login.xhtml phaseId=RESTORE_VIEW(1) Caused by: javax.enterprise.context.ContextNotActiveException - WebBeans context with scope type annotation @RequestScoped does not exist within current thread at org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:351) 

I am using OpenJPA on a TomEE server

+4
source share

Source: https://habr.com/ru/post/1502629/


All Articles