TomEE
  1. TomEE
  2. TOMEE-33

seam-international-timeanddate fails to deploy

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0-beta-1
    • Fix Version/s: 1.0.0-beta-2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Seam 3.1.0-SNAPSHOT

      Description

      See the attached application and stack trace.

      1. international-timeanddate-u1.war
        1.02 MB
        Jozef Hartinger
      2. international-timeanddate.war
        1.02 MB
        Jozef Hartinger
      3. international.txt
        4 kB
        Jozef Hartinger
      4. config-princess-rescue-u1.war
        691 kB
        Jozef Hartinger
      5. config-princess-rescue.war
        687 kB
        Jozef Hartinger

        Issue Links

          Activity

          Hide
          Jozef Hartinger added a comment -

          Same exceptions with a simple example: config-princess-rescue

          Show
          Jozef Hartinger added a comment - Same exceptions with a simple example: config-princess-rescue
          Hide
          Romain Manni-Bucau added a comment -

          your exception is in fact:

          Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [javax.enterprise.inject.spi.BeanManager] is not found with the qualifiers
          Qualifiers: [@javax.enterprise.inject.Default()]
          for injection into Method Injection Point, method name : beforeBeanDiscovery, Bean Owner : [XmlConfigExtension, Name:null, WebBeans Type:EXTENSION, API Types:[org.jboss.solder.config.xml.bootstrap.XmlConfigExtension,java.lang.Object,javax.enterprise.inject.spi.Extension], Qualifiers:[javax.enterprise.inject.Default]]
          at org.apache.webbeans.util.InjectionExceptionUtils.throwUnsatisfiedResolutionException(InjectionExceptionUtils.java:92)
          at org.apache.webbeans.container.ResolutionUtil.checkResolvedBeans(ResolutionUtil.java:98)
          at org.apache.webbeans.container.InjectionResolver.getInjectionPointBean(InjectionResolver.java:265)
          at org.apache.webbeans.event.ObserverMethodImpl.getMethodArguments(ObserverMethodImpl.java:387)
          at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:203)
          at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:461)
          at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:473)
          at org.apache.openejb.cdi.BeansDeployer.fireBeforeBeanDiscoveryEvent(BeansDeployer.java:146)
          at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
          ... 40 more

          Show
          Romain Manni-Bucau added a comment - your exception is in fact: Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [javax.enterprise.inject.spi.BeanManager] is not found with the qualifiers Qualifiers: [@javax.enterprise.inject.Default()] for injection into Method Injection Point, method name : beforeBeanDiscovery, Bean Owner : [XmlConfigExtension, Name:null, WebBeans Type:EXTENSION, API Types: [org.jboss.solder.config.xml.bootstrap.XmlConfigExtension,java.lang.Object,javax.enterprise.inject.spi.Extension] , Qualifiers: [javax.enterprise.inject.Default] ] at org.apache.webbeans.util.InjectionExceptionUtils.throwUnsatisfiedResolutionException(InjectionExceptionUtils.java:92) at org.apache.webbeans.container.ResolutionUtil.checkResolvedBeans(ResolutionUtil.java:98) at org.apache.webbeans.container.InjectionResolver.getInjectionPointBean(InjectionResolver.java:265) at org.apache.webbeans.event.ObserverMethodImpl.getMethodArguments(ObserverMethodImpl.java:387) at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:203) at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:461) at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:473) at org.apache.openejb.cdi.BeansDeployer.fireBeforeBeanDiscoveryEvent(BeansDeployer.java:146) at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200) ... 40 more
          Hide
          Jozef Hartinger added a comment -

          Thanks. I must have missed that. Which log file did you get the exception from?

          Anyway, that looks like a bug in OpenWebBeans since that injection point is definitely valid.

          Show
          Jozef Hartinger added a comment - Thanks. I must have missed that. Which log file did you get the exception from? Anyway, that looks like a bug in OpenWebBeans since that injection point is definitely valid.
          Hide
          Romain Manni-Bucau added a comment -

          can you try to add a META-INF/beans.xml file (content = <beans/>)?

          Show
          Romain Manni-Bucau added a comment - can you try to add a META-INF/beans.xml file (content = <beans/>)?
          Hide
          Jozef Hartinger added a comment -

          I just tried that and it made no difference.

          Show
          Jozef Hartinger added a comment - I just tried that and it made no difference.
          Hide
          Mark Struberg added a comment -

          I can start this app in tomcat+myfaces+owb standalone, but it subsequently crashes with the following Exception:

          javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: /home.xhtml at line 15 and column 91 action="#

          {gameManager.newGame}": Target Unreachable, identifier 'gameManager' resolved to null
          at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:96)
          Caused by: javax.el.PropertyNotFoundException: /home.xhtml at line 15 and column 91 action="#{gameManager.newGame}

          ": Target Unreachable, identifier 'gameManager' resolved to null
          at org.apache.myfaces.view.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:87)

          Show
          Mark Struberg added a comment - I can start this app in tomcat+myfaces+owb standalone, but it subsequently crashes with the following Exception: javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: /home.xhtml at line 15 and column 91 action="# {gameManager.newGame}": Target Unreachable, identifier 'gameManager' resolved to null at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:96) Caused by: javax.el.PropertyNotFoundException: /home.xhtml at line 15 and column 91 action="#{gameManager.newGame} ": Target Unreachable, identifier 'gameManager' resolved to null at org.apache.myfaces.view.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:87)
          Show
          Jozef Hartinger added a comment - application source code: https://github.com/seam/solder/tree/develop/examples/princess-rescue https://github.com/seam/international/tree/develop/examples/timeanddate
          Hide
          Mark Struberg added a comment -

          came a bit further.

          There are plenty of issues around here (so far none in OWB):

          *) Seam-config adds a @New bean manually, also for non-injection points. This is against the spec

          *) Seam-catch has broken Interceptors:
          org.apache.webbeans.exception.WebBeansConfigurationException: @AroundInvoke annotated method : passExceptionsToSolderCatch in class : org.jboss.solder.exception.control.ExceptionHandledInterceptor must throw Exception
          at org.apache.webbeans.util.WebBeansUtil.checkAroundInvokeAnnotationCriterias(WebBeansUtil.java:1012)

          According to the interceptors spec, any @AroundInvoke method must declare 'throws Exception'

          Show
          Mark Struberg added a comment - came a bit further. There are plenty of issues around here (so far none in OWB): *) Seam-config adds a @New bean manually, also for non-injection points. This is against the spec *) Seam-catch has broken Interceptors: org.apache.webbeans.exception.WebBeansConfigurationException: @AroundInvoke annotated method : passExceptionsToSolderCatch in class : org.jboss.solder.exception.control.ExceptionHandledInterceptor must throw Exception at org.apache.webbeans.util.WebBeansUtil.checkAroundInvokeAnnotationCriterias(WebBeansUtil.java:1012) According to the interceptors spec, any @AroundInvoke method must declare 'throws Exception'
          Hide
          David Blevins added a comment -

          On the 'must throw Exception' note, we should make that check optional. It's totally harmless to not declare the exception.

          Show
          David Blevins added a comment - On the 'must throw Exception' note, we should make that check optional. It's totally harmless to not declare the exception.
          Hide
          Jozef Hartinger added a comment -

          Updated princess-rescue example - fixed interceptor signatures.

          Show
          Jozef Hartinger added a comment - Updated princess-rescue example - fixed interceptor signatures.
          Hide
          Jozef Hartinger added a comment -

          (12:42:13 PM) struberg: seems seam-config adds XMLConfiguredBean dynamially and public <T> void processAnotated(@Observes ProcessAnnotatedType<T> event, BeanManager manager) {
          (12:42:13 PM) struberg: if (event.getAnnotatedType().isAnnotationPresent(XmlConfiguredBean.class))

          { (12:42:13 PM) struberg: return; (12:42:13 PM) struberg: }

          (12:42:29 PM) struberg: will return without vetoing the original bean in owb
          (12:42:37 PM) struberg: seems like a timing issue somewhere

          The original beans do not have the @XmlConfiguredBean annotation. This annotation is only added as a marker to the configured beans. Therefore, the code you quoted seems correct to me.

          Show
          Jozef Hartinger added a comment - (12:42:13 PM) struberg: seems seam-config adds XMLConfiguredBean dynamially and public <T> void processAnotated(@Observes ProcessAnnotatedType<T> event, BeanManager manager) { (12:42:13 PM) struberg: if (event.getAnnotatedType().isAnnotationPresent(XmlConfiguredBean.class)) { (12:42:13 PM) struberg: return; (12:42:13 PM) struberg: } (12:42:29 PM) struberg: will return without vetoing the original bean in owb (12:42:37 PM) struberg: seems like a timing issue somewhere The original beans do not have the @XmlConfiguredBean annotation. This annotation is only added as a marker to the configured beans. Therefore, the code you quoted seems correct to me.
          Hide
          Mark Struberg added a comment -

          David, I've create a OWB-623 and will fix that today.

          Show
          Mark Struberg added a comment - David, I've create a OWB-623 and will fix that today.
          Hide
          Mark Struberg added a comment -

          Jozef, in CDI-1.0 there must only be 1 AnnotatedType per class. If you add an AnnotatedType for a class in BeforeBeanDiscovery, then this AnnotatedType will get used. Of course there is still something fishy in OWB I fear. Will debug through it further.

          Show
          Mark Struberg added a comment - Jozef, in CDI-1.0 there must only be 1 AnnotatedType per class. If you add an AnnotatedType for a class in BeforeBeanDiscovery, then this AnnotatedType will get used. Of course there is still something fishy in OWB I fear. Will debug through it further.
          Hide
          Mark Struberg added a comment -

          I fixed OWB which should now work with your sample. We are currently voting on OWB-1.1.2 which includes this fix.

          Show
          Mark Struberg added a comment - I fixed OWB which should now work with your sample. We are currently voting on OWB-1 .1.2 which includes this fix.
          Hide
          Jozef Hartinger added a comment -
          • "Jozef, in CDI-1.0 there must only be 1 AnnotatedType per class."
            I do not think that the spec says anything like that. I would agree that this is ambiguous in the spec.
          • "I fixed OWB which should now work with your sample. We are currently voting on OWB-1.1.2 which includes this fix."
            Thanks, is there a way to try that out? (e.g. a snapshot build?) I would like to verify also the other Seam 3 modules.
          Show
          Jozef Hartinger added a comment - "Jozef, in CDI-1.0 there must only be 1 AnnotatedType per class." I do not think that the spec says anything like that. I would agree that this is ambiguous in the spec. "I fixed OWB which should now work with your sample. We are currently voting on OWB-1 .1.2 which includes this fix." Thanks, is there a way to try that out? (e.g. a snapshot build?) I would like to verify also the other Seam 3 modules.
          Hide
          Romain Manni-Bucau added a comment -

          found the error, tried to commit a modification (revision 1185190). We still need to validate it agains TCKs.

          Show
          Romain Manni-Bucau added a comment - found the error, tried to commit a modification (revision 1185190). We still need to validate it agains TCKs.

            People

            • Assignee:
              Unassigned
              Reporter:
              Jozef Hartinger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development