Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2106

@Singleton crashes with no-interface bean

XMLWordPrintable

    • singleton:1.0.0-alpha-11

      In JBoss 6.0.0.M3 I tried the following 2 beans (JAAS is enabled in the enclosing EAR):

      @Singleton
      @Lock(READ)
      @TransactionAttribute(SUPPORTS)
      public class ValidationService {
      private HashMap<Locale, Validator> validators;
      @PostConstruct
      private void init()

      {...}
      public Validator getValidator(Locale locale) {...}

      }

      @Stateless
      public class Kundenverwaltung implements Serializable {
      @PersistenceContext
      private transient EntityManager em;
      @EJB
      private ValidationService validationService;
      @RolesAllowed(...)
      public Kunde createKunde(...)

      { validate(...); ... }

      private void validate(...)

      {...}

      }

      When invoking the method createKunde (see above), then I get this stacktrace:
      2010-06-06 19:47:47,827 SCHWERWIEGEND [javax.enterprise.resource.webcontainer.jsf.application] (http-localhost%2F127.0.0.1-8080-1) javax.ejb.EJBException: java.lang.IllegalArgumentException: ContextID is null: javax.faces.el.EvaluationException: javax.ejb.EJBException: java.lang.IllegalArgumentException: ContextID is null
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:98) [:2.0.3-FCS]
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98) [:2.0.3-FCS]
      at javax.faces.component.UICommand.broadcast(UICommand.java:311) [:2.0.3-FCS]
      at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:329) [:3.3.3.Final]
      at org.ajax4jsf.component.AjaxViewRoot.broadcastEventsForPhase(AjaxViewRoot.java:304) [:3.3.3.Final]
      at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:261) [:3.3.3.Final]
      at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:474) [:3.3.3.Final]
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77) [:2.0.3-FCS]
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) [:2.0.3-FCS]
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) [:2.0.3-FCS]
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308) [:2.0.3-FCS]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:336) [:6.0.0.20100429-M3]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100429-M3]
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206) [:3.3.3.Final]
      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [:3.3.3.Final]
      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) [:3.3.3.Final]
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) [:3.3.3.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.20100429-M3]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100429-M3]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:293) [:6.0.0.20100429-M3]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.20100429-M3]
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183) [:6.0.0.20100429-M3]
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:593) [:6.0.0.20100429-M3]
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95) [:6.0.0.20100429-M3]
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) [:6.0.0.20100429-M3]
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) [:6.0.0.20100429-M3]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.20100429-M3]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.20100429-M3]
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.20100429-M3]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.20100429-M3]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [:6.0.0.20100429-M3]
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:888) [:6.0.0.20100429-M3]
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:599) [:6.0.0.20100429-M3]
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2024) [:6.0.0.20100429-M3]
      at java.lang.Thread.run(Thread.java:619) [:1.6.0_20]
      Caused by: javax.ejb.EJBException: java.lang.IllegalArgumentException: ContextID is null
      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77) [:1.0.2]
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83) [:1.0.0.GA]
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190) [:1.0.0.GA]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.security.RunAsSecurityInterceptorv2.invoke(RunAsSecurityInterceptorv2.java:94) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:180) [:1.3.1]
      at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:101) [:1.3.1]
      at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.invoke(NoInterfaceViewInvocationHandler.java:148) [:1.0.0-alpha-6]
      at org.jboss.ejb3.proxy.javassist.JavassistInvocationHandlerAdapter.invoke(JavassistInvocationHandlerAdapter.java:71) [:1.0.0-alpha-1]
      at de.hska.kundenverwaltung.service.Kundenverwaltung_$$javassist_11.createKunde(Kundenverwaltung$$_javassist_11.java)
      at de.hska.kundenverwaltung.ui.KundenverwaltungMgdBean.createFirmenkunde(KundenverwaltungMgdBean.java:504) [:]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
      at org.apache.el.parser.AstValue.invoke(AstValue.java:196) [:6.0.0.20100429-M3]
      at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [:6.0.0.20100429-M3]
      at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) [:1.1.15]
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:84) [:2.0.3-FCS]
      ... 34 more
      Caused by: java.lang.IllegalArgumentException: ContextID is null
      at org.jboss.security.plugins.javaee.EJBAuthorizationHelper.authorize(EJBAuthorizationHelper.java:76) [:3.0.0.Beta4]
      at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:189) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.singleton.aop.impl.AOPBasedInterceptorRegistry.intercept(AOPBasedInterceptorRegistry.java:107) [:1.0.0-alpha-2]
      at org.jboss.ejb3.singleton.impl.container.SingletonContainer.invoke(SingletonContainer.java:218) [:1.0.0-alpha-2]
      at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.invoke(AOPBasedSingletonContainer.java:392) [:1.0.0-alpha-2]
      at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.invoke(NoInterfaceViewInvocationHandler.java:148) [:1.0.0-alpha-6]
      at org.jboss.ejb3.proxy.javassist.JavassistInvocationHandlerAdapter.invoke(JavassistInvocationHandlerAdapter.java:71) [:1.0.0-alpha-1]
      at de.hska.util.ValidationService_$$javassist_0.getValidator(ValidationService$$_javassist_0.java)
      at de.hska.kundenverwaltung.service.Kundenverwaltung.validate(Kundenverwaltung.java:260) [:]
      at de.hska.kundenverwaltung.service.Kundenverwaltung.createKunde(Kundenverwaltung.java:229) [:]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.interceptors.container.ContainerMethodInvocationWrapper.invokeNext(ContainerMethodInvocationWrapper.java:72) [:1.0.6]
      at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138) [:1.0.6]
      at de.hska.util.LoggingInterceptor.log(LoggingInterceptor.java:68) [:]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
      at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83) [:1.0.6]
      at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:70) [:1.0.6]
      at org.jboss.ejb3.interceptors.container.ContainerMethodInvocationWrapper.invokeNext(ContainerMethodInvocationWrapper.java:62) [:1.0.6]
      at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:76) [:1.0.6]
      at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:62) [:1.0.6]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
      at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72) [:1.0.6]
      at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_25760114.invoke(InvocationContextInterceptor_z_fillMethod_25760114.java)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88) [:1.0.6]
      at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_25760114.invoke(InvocationContextInterceptor_z_setup_25760114.java)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.2]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68) [:1.3.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.0.Final]
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) [:1.0.0.GA]
      ... 68 more

              jaikiran Jaikiran Pai (Inactive)
              juergen.zimmermann Juergen Zimmermann (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: