InvocationTargetException when invoking Stateless SessionBean -------------------------------------------------------------
Key: OWB-362 URL: https://issues.apache.org/jira/browse/OWB-362 Project: OpenWebBeans Issue Type: Bug Components: Java EE Integration Affects Versions: 1.0.0 Reporter: Matthias Weßendorf Assignee: Gurkan Erdogdu I am getting an InvocationTargetException exception on invoking an EJB sessionbean. I used Tomcat 6.x and OpenEJB (trunk) plus this patch from Gurkan: https://issues.apache.org/jira/browse/OPENEJB-1257 I deployed and installed the "openejb.war" to Tomcat. Now I ported the "OpenEJB JSF sample" to JSF2, see this patch: https://issues.apache.org/jira/browse/OPENEJB-1264 Invoking the embedded @EJB works fine with a bean annotated with these two JSF annotations: @ManagedBean/RequestScope. Now I slightly changed the example to use JSR299/330 via OWB. I changed the bean to use @Named("...")/@RequestScoped (from CDI). The @EJB I changed to @Inject and when I click the button which underneath invokes the SessionBean, I am seeing this exception: SEVERE: An exception occurred javax.faces.el.EvaluationException: javax.el.ELException: /calculator.xhtml at line 39 and column 64 action="#{calculator.add}": java.lang.reflect.InvocationTargetException at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:96) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:100) at javax.faces.component.UICommand.broadcast(UICommand.java:120) at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:890) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:234) at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1202) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:623) at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:35) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:143) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:93) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.openejb.tomcat.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: javax.el.ELException: /calculator.xhtml at line 39 and column 64 action="#{calculator.add}": java.lang.reflect.InvocationTargetException at org.apache.myfaces.view.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:95) at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:88) ... 23 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.webbeans.ejb.common.proxy.EjbBeanProxyHandler.invoke(EjbBeanProxyHandler.java:151) at org.superbiz.jsf.Calculator_$$_javassist_16.add(Calculator_$$_javassist_16.java) at org.superbiz.jsf.CalculatorBean.add(CalculatorBean.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.webbeans.intercept.InterceptorHandler.invoke(InterceptorHandler.java:265) at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:78) at org.superbiz.jsf.CalculatorBean_$$_javassist_15.add(CalculatorBean_$$_javassist_15.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.el.parser.AstValue.invoke(AstValue.java:131) at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) at org.apache.myfaces.view.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:83) ... 24 more Caused by: java.lang.NullPointerException at $Proxy62.add(Unknown Source) ... 45 more Apr 26, 2010 9:51:42 PM org.apache.webbeans.ejb.common.proxy.EjbBeanProxyHandler hashCode WARNING: Calling method on proxy is restricted except Object.toString(), but current method is Object.hashCode Apr 26, 2010 9:51:42 PM org.apache.webbeans.ejb.common.proxy.EjbBeanProxyHandler hashCode WARNING: Calling method on proxy is restricted except Object.toString(), but current method is Object.hashCode Apr 26, 2010 9:51:42 PM org.apache.webbeans.ejb.common.proxy.EjbBeanProxyHandler hashCode WARNING: Calling method on proxy is restricted except Object.toString(), but current method is Object.hashCode -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.