[jboss-user] [JBoss Seam] - Re: selectItems exception
damatrix
do-not-reply at jboss.com
Wed Jan 24 11:17:04 EST 2007
I have tried taking out the A4J tags and removed the name from si:selectitems configuration but to no avail.
I think the problem is from the seam managed persistence context. During startup seam loads it up as a component as shown below
| 00:08:02,125 INFO [Component] Component: em, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.ManagedPersistenceContext
|
|
The selectitems documentation stated that i needed to make sure that my enties were managed by a seam managed persistence context, and since i'd been using "em" to represent my entity manager, i just configured a seam managed persistence context with the same "em" name for my entity manager in my EJBs.
However i still get the following exception when i try to inject it using the @In notation, unless i set create to true, i.e @In(create=true).
| javax.ejb.EJBTransactionRolledbackException: org.jboss.seam.RequiredException: In attribute requires value for component: pavilionListing.em
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
|
Added to that, although the selectOneMenu DOES fill up with the list of objects i want selected, my save method is not called when i click it(it uses h:commandButton) i.e. nothing happens . When i change it to use s:button the method on the EJB does get called but i find that the outjected object that was to be populated with the data i specified is null.
Do you think declaring a separate seam managed persistenc context to be used by select items will solve the problem and if so how do i do that?
Hope that this level of detail is enough to help you determine what is wrong. Thanx for the effort.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005858#4005858
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005858
More information about the jboss-user
mailing list