Re: PrettyFaces, CDI and the case of the missing ?cid=xxx…

Splash Forums PrettyFaces Users PrettyFaces, CDI and the case of the missing ?cid=xxx… Re: PrettyFaces, CDI and the case of the missing ?cid=xxx…

#22070

Tony Herstell
Participant

Once you get the project and get it running.

Go to “manage users” and then click [Done]

You will get a stack trace as [Done] is trying to close a conversation that does not exist.

04:53:21,799 INFO  [com.entermyevents.userManagement.UserManagementController] (http--127.0.0.1-8080-3) +++CONVERSATION END for conversation:null
04:53:21,802 INFO [org.jboss.as.ejb3] (http--127.0.0.1-8080-3) JBAS014101: Failed to find {[0, 60, 48, -124, 1, -102, 72, 53, -100, -48, 98, 47, 55, -32, 14, -27]} in cache
04:53:21,803 ERROR [org.jboss.ejb3.invocation] (http--127.0.0.1-8080-3) JBAS014134: EJB Invocation failed on component UserManagementController for method public java.lang.String com.entermyevents.userManagement.UserManagementController.finished(): javax.ejb.EJBException: org.jboss.weld.exceptions.IllegalStateException: WELD-000215 Attempt to call end() on a transient conversation
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:166) [jboss-as-ejb3-7.1.0.CR1b.jar:7.1.0.CR1b]

You can see the Conversation was started in the logs.

I can manually “fix” this by looking in the logs for the conversation starting log.info:

04:49:51,576 INFO  [com.entermyevents.userManagement.UserManagementController] (http--127.0.0.1-8080-1) +++CONVERSATION START
04:49:51,577 INFO [com.entermyevents.userManagement.UserManagementController] (http--127.0.0.1-8080-1) conversation:1

and append onto the URL the test:

?cid=1

and re-fresh the page.

Now I can mess around on the page and all is well as the conversation is maintained… finally hitting [Done] will close the conversation without a stack trace.

It seems that between CDI and PrettyFaces the initial

?cid=xxx

is being stripped off.

Hopefully it’s a simple fix to stop this being stripped.