[JBoss Seam] - Re: Name of @In Parameters
by chane
thanks, that would make sense about the name. My next problem then is how is that component null. What I didn't show is that this is part of a pageflow and the first step in the pageflow setups the ICheckoutAction which I include below.
I'm pretty sure that an exception was not thrown prior to the one above (I have a custom filter than emails me all exceptions). In fact, as part of the exception email, I dump the contents of the Seam contexts and found this component (first in list below) in the conversation context just like I expected it to be there:
| Conversation Context
| key[shop.cart.checkout] value[CheckoutAction:3j001-cgob78-euao51bl-1-eublwqzu-53]
| key[businessProcess] value[org.jboss.seam.core.BusinessProcess@1e04a34]
| key[shop.login] value[LoginAction:3j001-cgob78-euao51bl-1-eublwqzv-54]
| key[shop.register] value[RegisterAction:3j001-cgob78-euao51bl-1-eublwsh5-55]
| key[processRepository] value[com.itsolut.core.component.ProcessRepository@27b78e]
| key[em] value[ManagedPersistenceContext(java:/shopEntityManagerFactory)]
| key[shop.cart.checkout.verify] value[VerifyCartAction:3j001-cgob78-euao51bl-1-eubm2zea-5g]
| key[pageflow] value[Pageflow(default_2)]
| key[facesMessages] value[org.jboss.seam.core.FacesMessages@183d805]
| key[shop.cart.checkout.paymethod] value[PaymethodAction:3j001-cgob78-euao51bl-1-eublzabt-5b]
| key[billingAddresses] value[org.jboss.seam.jsf.ListDataModel@108e9aa]
| key[shop.cart.checkout.shipTo] value[ShipToAction:3j001-cgob78-euao51bl-1-eubm2ze4-5f]
| key[redirect] value[org.jboss.seam.core.Redirect@db5d26]
| key[conversation] value[org.jboss.seam.core.Conversation@1c0726f]
| key[shop.cart.checkout.billing.address] value[BillingAddressAction:3j001-cgob78-euao51bl-1-eubm209x-5e]
| key[shop.cart.checkout.authorize] value[AuthorizeCartAction:3j001-cgob78-euao51bl-1-eubm3srp-5h]
|
So, if the component (first on the in the list), is in the conversation context, why is it not found?
Thanks,
Chris....
|
| @Stateful
| @Name("shop.cart.checkout")
| @Scope(ScopeType.CONVERSATION)
| @LoggedIn
| @HandleException
| public class CheckoutAction implements ICheckoutAction {
|
| @In(create = true)
| protected EntityManager em;
|
| @In(value="shop.login", create=true)
| private ILoginAction login;
|
| private Cart cart;
|
| @In(value="loggedInUser", scope=ScopeType.SESSION, required=false)
| private User user;
|
| @Begin(pageflow="checkout1")
| @SkipLoginCheck
| public String start(){
|
| AppUtils.LOG.fatal("======================================");
| AppUtils.LOG.fatal("========= STARTING ===================");
| AppUtils.LOG.fatal("======================================");
|
| AppUtils.LOG.fatal("=== start ==========");
| if(getCart().getCompany().isCheckoutSecure()){
| Contexts.getConversationContext().set("shop.checkout.secure.protocol", "TRUE");
| }
| return login.isLoggedIn() ? "loggedIn" : "loginRequired";
| }
|
| <snip code that I think is not relevant />
|
| @Destroy
| @Remove
| public void destroy() {
| AppUtils.LOG.fatal("=== destroy CheckoutAction =========");
| }
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984747#3984747
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984747
19Â years, 6Â months
[JBoss Seam] - seam-gen head startup issue: ClassCastException: org.jboss.s
by stu2
I've been working with seam head (pre beta2). Built the seam jars, then created ran seam-gen "new-project". I've tried a number of variations, and each time I end up with the following exception. I saw someone else on the list had seen this, and thought it'd be worth posting (next person will find the answer via google :-)
Anyway, I've since found James' excellent instructions, and will go through the process again using these - and switch to Seam 1.0.1GA if that doesn't work. But if anyone knows what I'm doing wrong here (newbie error I'm sure) I'm definitely curious.
03:29:14,637 ERROR [PhaseListenerManager] Exception in PhaseListener RESTORE_VIEW(1) afterPhase
javax.ejb.EJBTransactionRolledbackException: java.lang.ClassCastException: org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$ba08a277
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:201)
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)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
at $Proxy100.begin(Unknown Source)
at org.jboss.seam.example.pageflow.SimpleFlow$$FastClassByCGLIB$$9639c07e.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:68)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984721#3984721
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984721
19Â years, 6Â months