5 Replies Latest reply on Jan 17, 2008 11:16 AM by Pete Muir

    Seam eats exceptions

    Marcus Schmidke Newbie

      Hello all,

      the following problem cost two days of my life ...

      I had an ClassCastException in one of my property getters. Ok, admitted, it was my fault, but it is not very nice that Seam completely eats up this exception. Nothing about it in the logs, absolutely nothing.

      Just useful hints like "don't @Begin in a long running conversation, try join=true" and so on. Of course I know that exceptions can cause totally different followup exceptions, so I am used to ignore exceptions I don't understand, searching for collateral exceptions I understand better. But there were none, just this "use join" thing.

      So I went into deep - how could the conversation context be lost? I stepped through half of Seam. For two days. Then I found my component being inexpectedly "removed" from conversation context.

      This remove was called from RemoveInterceptor.removeIfNecessary, and in that method, I was able to have a look at the root causing exception.

      I could not really figure out why this exception isn't logged at all, but I think it would clearly better if it was ...

      I was able to call printStackTrace in the debugger, so I can give you a strack trace of the original exception. Perhaps it helps:

      11:14:07,021 ERROR [STDERR] java.lang.reflect.InvocationTargetException
      11:14:07,021 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source)
      11:14:07,021 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:14:07,021 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      11:14:07,021 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      11:14:07,021 ERROR [STDERR] at org.jboss.seam.Component.getPropertyValue(Component.java:1753)
      11:14:07,021 ERROR [STDERR] at org.jboss.seam.Component.access$400(Component.java:138)
      11:14:07,021 ERROR [STDERR] at org.jboss.seam.Component$BijectedMethod.get(Component.java:2515)
      11:14:07,021 ERROR [STDERR] at org.jboss.seam.Component$BijectedProperty.get(Component.java:2553)
      11:14:07,021 ERROR [STDERR] at org.jboss.seam.Component.outjectDataModel(Component.java:1519)
      11:14:07,021 ERROR [STDERR] at org.jboss.seam.Component.outjectDataModels(Component.java:1511)
      11:14:07,021 ERROR [STDERR] at org.jboss.seam.Component.outject(Component.java:1463)
      11:14:07,021 ERROR [STDERR] at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:65)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
      11:14:07,053 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
      11:14:07,053 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:14:07,053 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
      11:14:07,053 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
      11:14:07,053 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
      11:14:07,053 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      11:14:07,053 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      11:14:07,053 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      11:14:07,053 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      11:14:07,053 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      11:14:07,053 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      11:14:07,053 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
      11:14:07,053 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      11:14:07,053 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
      11:14:07,053 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
      11:14:07,053 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      11:14:07,053 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
      11:14:07,053 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:100)
      11:14:07,053 ERROR [STDERR] at $Proxy141.getVersion(Unknown Source)
      11:14:07,053 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
      11:14:07,053 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:14:07,053 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
      11:14:07,053 ERROR [STDERR] at org.javassist.tmp.java.lang.Object_$$_javassist_5.getVersion(Object_$$_javassist_5.java)
      11:14:07,053 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
      11:14:07,053 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:14:07,053 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      11:14:07,053 ERROR [STDERR] at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
      11:14:07,053 ERROR [STDERR] at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
      11:14:07,053 ERROR [STDERR] at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
      11:14:07,053 ERROR [STDERR] at org.jboss.el.parser.AstPropertySuffix.getTarget(AstPropertySuffix.java:38)
      11:14:07,053 ERROR [STDERR] at org.jboss.el.parser.AstValue.getTarget(AstValue.java:47)
      11:14:07,053 ERROR [STDERR] at org.jboss.el.parser.AstValue.setValue(AstValue.java:83)
      11:14:07,053 ERROR [STDERR] at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
      11:14:07,053 ERROR [STDERR] at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
      11:14:07,053 ERROR [STDERR] at javax.faces.component.UIInput.updateModel(UIInput.java:765)
      11:14:07,053 ERROR [STDERR] at javax.faces.component.UIInput.processUpdates(UIInput.java:697)
      11:14:07,053 ERROR [STDERR] at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1056)
      11:14:07,053 ERROR [STDERR] at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1056)
      11:14:07,053 ERROR [STDERR] at javax.faces.component.UIForm.processUpdates(UIForm.java:255)
      11:14:07,053 ERROR [STDERR] at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1056)
      11:14:07,053 ERROR [STDERR] at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:706)
      11:14:07,053 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.access$101(AjaxViewRoot.java:57)
      11:14:07,053 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot$2.invokeRoot(AjaxViewRoot.java:291)
      11:14:07,053 ERROR [STDERR] at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
      11:14:07,053 ERROR [STDERR] at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:173)
      11:14:07,053 ERROR [STDERR] at org.ajax4jsf.component.AjaxViewRoot.processUpdates(AjaxViewRoot.java:305)
      11:14:07,053 ERROR [STDERR] at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:101)
      11:14:07,053 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      11:14:07,053 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      11:14:07,053 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      11:14:07,053 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:14:07,053 ERROR [STDERR] at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      11:14:07,053 ERROR [STDERR] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:14:07,053 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      11:14:07,053 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      11:14:07,053 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      11:14:07,053 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      11:14:07,053 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      11:14:07,053 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      11:14:07,053 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      11:14:07,053 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      11:14:07,053 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      11:14:07,053 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
      11:14:07,053 ERROR [STDERR] Caused by: java.lang.ClassCastException: de.prosystemsit.argos3.business.modell.Anwendungsattribute_Allgemein_Uebergreifend
      11:14:07,053 ERROR [STDERR] at de.prosystemsit.argos3.business.modell.Anwendung.getAktuelleAttribute(Anwendung.java:147)
      11:14:07,053 ERROR [STDERR] at de.prosystemsit.argos3.business.modell.Version.getAktuelleAttribute(Version.java:231)
      11:14:07,053 ERROR [STDERR] at de.prosystemsit.argos3.web.VersionBearbeitenImpl.getAttribute(VersionBearbeitenImpl.java:140)
      11:14:07,053 ERROR [STDERR] at de.prosystemsit.argos3.web.VersionBearbeitenImpl.getEigentuemer(VersionBearbeitenImpl.java:145)
      11:14:07,053 ERROR [STDERR] ... 132 more