[jboss-user] [JBoss Seam] - Problems with injection of persistence context.
adamkoprowski
do-not-reply at jboss.com
Mon Jan 29 17:39:08 EST 2007
Hello,
I'm running into problems with injection for persistence context. If in a session bean I do:
@PersistenceContext private EntityManager em
everything is fine, however if in the Seam component I do:
@In(create=true) EntityManager em
the application breaks up and I get:
| Caused by: org.jboss.seam.RequiredException: In attribute requires value for component: newAuction.em
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1882)
| at org.jboss.seam.Component.injectFields(Component.java:1348)
| at org.jboss.seam.Component.inject(Component.java:1118)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectNonreentrantComponent(BijectionInterceptor.java:76)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectComponent(BijectionInterceptor.java:58)
| ...
|
Any ideas what may be wrong? I was thinking that maybe it's because I'm using Trinidad and according to the documentation I had to turn off the Seam view handler in web.xml (http://wiki.apache.org/myfaces/Facelets_with_Trinidad)
<view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
|
When I keep it indeed I get a Trinidad error:
| java.lang.IllegalStateException: No RenderingContext
| at org.apache.myfaces.trinidad.render.CoreRenderer.encodeBegin(CoreRenderer.java:159)
| at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeBegin(UIXComponentBase.java:667)
|
Can it has something to do with that? Any help appreciated!
Cheers,
Adam Koprowski
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008046#4008046
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008046
More information about the jboss-user
mailing list