[seam-issues] [JBoss JIRA] Commented: (SEAMPERSIST-53) Injected EntityManager can not be invoked in java se
Benjamin Wirtz (JIRA)
jira-events at lists.jboss.org
Mon Jun 6 06:43:59 EDT 2011
[ https://issues.jboss.org/browse/SEAMPERSIST-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606549#comment-12606549 ]
Benjamin Wirtz commented on SEAMPERSIST-53:
-------------------------------------------
Hi,
I got the same error after I've written a test which do exact the same as described in the documentation.
I think that the @RequestScoped - Annotation in the class EntityTransaction is incorrect.
If I test it without that annotation the test works fine.
Regards,
bennixview
> Injected EntityManager can not be invoked in java se
> -----------------------------------------------------
>
> Key: SEAMPERSIST-53
> URL: https://issues.jboss.org/browse/SEAMPERSIST-53
> Project: Seam Persistence
> Issue Type: Bug
> Affects Versions: 3.0.0.Final
> Environment: weld-se-1.1.1,seam-persistence 3.0.0 and 3.0.1-SNAPSHOT
> Reporter: Liu Jianhong
>
> When call entityManager.toString(), entityManager.persist() addn so on ,it produces WELD-001303 error:
> Exception in thread "main" org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped
> at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:664)
> at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:77)
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
> at org.jboss.seam.transaction.org$jboss$weld$bean-classpath-ManagedBean-org$jboss$seam$transaction$EntityTransaction$@javax$enterprise$context$RequestScoped()@org$jboss$seam$config$xml$core$XmlConfiguredBean()@org$jboss$seam$transaction$DefaultTransaction()${org$jboss$seam$transaction$EntityTransaction$entityManager$@javax$inject$Inject()$$org$jboss$seam$transaction$EntityTransaction$persistenceProvider$@javax$inject$Inject()$$org$jboss$seam$transaction$EntityTransaction$init$@javax$inject$Inject()$(org$jboss$seam$transaction$Synchronizations)$}_$$_WeldClientProxy.isActive(org$jboss$weld$bean-classpath-ManagedBean-org$jboss$seam$transaction$EntityTransaction$@javax$enterprise$context$RequestScoped()@org$jboss$seam$config$xml$core$XmlConfiguredBean()@org$jboss$seam$transaction$DefaultTransaction()${org$jboss$seam$transaction$EntityTransaction$entityManager$@javax$inject$Inject()$$org$jboss$seam$transaction$EntityTransaction$persistenceProvider$@javax$inject$Inject()$$org$jboss$seam$transaction$EntityTransaction$init$@javax$inject$Inject()$(org$jboss$seam$transaction$Synchronizations)$}_$$_WeldClientProxy.java)
> at org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.joinTransaction(ManagedPersistenceContextProxyHandler.java:126)
> at org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.invoke(ManagedPersistenceContextProxyHandler.java:114)
> at $Proxy36.toString(Unknown Source)
> at java.lang.String.valueOf(String.java:2826)
> at java.io.PrintStream.println(PrintStream.java:771)
> at test.UserFacet.save(UserFacet.java:27)
> at test.Main.main(Main.java:17)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list