You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Christian Nuesa (Created) (JIRA)" <ji...@apache.org> on 2012/03/29 02:21:25 UTC

[jira] [Created] (OWB-659) An annotated interface class is being seen as a manage bean.

An annotated interface class is being seen as a manage bean.
------------------------------------------------------------

                 Key: OWB-659
                 URL: https://issues.apache.org/jira/browse/OWB-659
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Injection and Lookup
    Affects Versions: 1.1.3
         Environment: Linux
            Reporter: Christian Nuesa
            Assignee: Gurkan Erdogdu


I have an interface class generated by Apache CXF 2.4.3 in my project which comes out to have @WebService annotation in it.  This interface causes a runtime exception coming from WebBeansUtil.checkManagedBeanCondition(..) which states "ManagedBean implementation class : <class> may not defined as interface".

This exception tells me that during the scanning of classes this interface is being mistaken as a managed bean, but it is not, hence the exception.  I investigated the code and narrowed my problem with BeansDeployer.java and surely enough its method called defineManagedBean(..) fails to validate if the class is an interface first before processing (so leading to the exception).

This method must check if the incoming class is an interface so then must return a false value.  This way, any interface like this is avoided as managed bean.

Here is the exception:

org.apache.webbeans.exception.WebBeansConfigurationException: ManagedBean implementation class : com.mgmmirage.playersclub.definitions.PlayersClubPlayerPortType may not defined as interface
        at org.apache.webbeans.util.WebBeansUtil.checkManagedBeanCondition(WebBeansUtil.java:3042)
        at org.apache.webbeans.component.creation.ManagedBeanCreatorImpl.checkCreateConditions(ManagedBeanCreatorImpl.java:65)
        at org.apache.webbeans.util.WebBeansUtil.defineManagedBean(WebBeansUtil.java:2894)
        at org.apache.webbeans.container.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1143)
        at org.apache.webbeans.util.WebBeansUtil.fireProcessInjectionTargetEventForJavaEeComponents(WebBeansUtil.java:2173)
        at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
        at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
        at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
        at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
        at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:494)
        at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:166)
        at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:127)
        at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:88)
        at org.apache.webbeans.servlet.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:85)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OWB-659) An annotated interface class is being seen as a manage bean.

Posted by "Mark Struberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241271#comment-13241271 ] 

Mark Struberg commented on OWB-659:
-----------------------------------

txs 4 the report! I'll dig into this in the next few days. In any case before our upcoming 1.1.4 release.
                
> An annotated interface class is being seen as a manage bean.
> ------------------------------------------------------------
>
>                 Key: OWB-659
>                 URL: https://issues.apache.org/jira/browse/OWB-659
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Injection and Lookup
>    Affects Versions: 1.1.3
>         Environment: Linux
>            Reporter: Christian Nuesa
>            Assignee: Mark Struberg
>              Labels: annotation, exception, interface, managedbeans, validation
>
> I have an interface class generated by Apache CXF 2.4.3 in my project which comes out to have @WebService annotation in it.  This interface causes a runtime exception coming from WebBeansUtil.checkManagedBeanCondition(..) which states "ManagedBean implementation class : <class> may not defined as interface".
> This exception tells me that during the scanning of classes this interface is being mistaken as a managed bean, but it is not, hence the exception.  I investigated the code and narrowed my problem with BeansDeployer.java and surely enough its method called defineManagedBean(..) fails to validate if the class is an interface first before processing (so leading to the exception).
> This method must check if the incoming class is an interface so then must return a false value.  This way, any interface like this is avoided as managed bean.
> Here is the exception:
> org.apache.webbeans.exception.WebBeansConfigurationException: ManagedBean implementation class : com.mgmmirage.playersclub.definitions.PlayersClubPlayerPortType may not defined as interface
>         at org.apache.webbeans.util.WebBeansUtil.checkManagedBeanCondition(WebBeansUtil.java:3042)
>         at org.apache.webbeans.component.creation.ManagedBeanCreatorImpl.checkCreateConditions(ManagedBeanCreatorImpl.java:65)
>         at org.apache.webbeans.util.WebBeansUtil.defineManagedBean(WebBeansUtil.java:2894)
>         at org.apache.webbeans.container.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1143)
>         at org.apache.webbeans.util.WebBeansUtil.fireProcessInjectionTargetEventForJavaEeComponents(WebBeansUtil.java:2173)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:494)
>         at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:166)
>         at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:127)
>         at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:88)
>         at org.apache.webbeans.servlet.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:85)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
>         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
>         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OWB-659) An annotated interface class is being seen as a manage bean.

Posted by "Mark Struberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244692#comment-13244692 ] 

Mark Struberg commented on OWB-659:
-----------------------------------

I've now deployed the latest owb snapshot to our apache.snapshots repo.
If you are using maven, then just configure a <repositories> section and add a <repository> with the following <url>
https://repository.apache.org/content/repositories/snapshots/
                
> An annotated interface class is being seen as a manage bean.
> ------------------------------------------------------------
>
>                 Key: OWB-659
>                 URL: https://issues.apache.org/jira/browse/OWB-659
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Injection and Lookup
>    Affects Versions: 1.1.3
>         Environment: Linux
>            Reporter: Christian Nuesa
>            Assignee: Mark Struberg
>              Labels: annotation, exception, interface, managedbeans, validation
>             Fix For: 1.1.4
>
>
> I have an interface class generated by Apache CXF 2.4.3 in my project which comes out to have @WebService annotation in it.  This interface causes a runtime exception coming from WebBeansUtil.checkManagedBeanCondition(..) which states "ManagedBean implementation class : <class> may not defined as interface".
> This exception tells me that during the scanning of classes this interface is being mistaken as a managed bean, but it is not, hence the exception.  I investigated the code and narrowed my problem with BeansDeployer.java and surely enough its method called defineManagedBean(..) fails to validate if the class is an interface first before processing (so leading to the exception).
> This method must check if the incoming class is an interface so then must return a false value.  This way, any interface like this is avoided as managed bean.
> Here is the exception:
> org.apache.webbeans.exception.WebBeansConfigurationException: ManagedBean implementation class : com.mgmmirage.playersclub.definitions.PlayersClubPlayerPortType may not defined as interface
>         at org.apache.webbeans.util.WebBeansUtil.checkManagedBeanCondition(WebBeansUtil.java:3042)
>         at org.apache.webbeans.component.creation.ManagedBeanCreatorImpl.checkCreateConditions(ManagedBeanCreatorImpl.java:65)
>         at org.apache.webbeans.util.WebBeansUtil.defineManagedBean(WebBeansUtil.java:2894)
>         at org.apache.webbeans.container.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1143)
>         at org.apache.webbeans.util.WebBeansUtil.fireProcessInjectionTargetEventForJavaEeComponents(WebBeansUtil.java:2173)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:494)
>         at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:166)
>         at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:127)
>         at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:88)
>         at org.apache.webbeans.servlet.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:85)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
>         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
>         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OWB-659) An annotated interface class is being seen as a manage bean.

Posted by "Mark Struberg (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated OWB-659:
------------------------------

    Fix Version/s: 1.1.4
    
> An annotated interface class is being seen as a manage bean.
> ------------------------------------------------------------
>
>                 Key: OWB-659
>                 URL: https://issues.apache.org/jira/browse/OWB-659
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Injection and Lookup
>    Affects Versions: 1.1.3
>         Environment: Linux
>            Reporter: Christian Nuesa
>            Assignee: Mark Struberg
>              Labels: annotation, exception, interface, managedbeans, validation
>             Fix For: 1.1.4
>
>
> I have an interface class generated by Apache CXF 2.4.3 in my project which comes out to have @WebService annotation in it.  This interface causes a runtime exception coming from WebBeansUtil.checkManagedBeanCondition(..) which states "ManagedBean implementation class : <class> may not defined as interface".
> This exception tells me that during the scanning of classes this interface is being mistaken as a managed bean, but it is not, hence the exception.  I investigated the code and narrowed my problem with BeansDeployer.java and surely enough its method called defineManagedBean(..) fails to validate if the class is an interface first before processing (so leading to the exception).
> This method must check if the incoming class is an interface so then must return a false value.  This way, any interface like this is avoided as managed bean.
> Here is the exception:
> org.apache.webbeans.exception.WebBeansConfigurationException: ManagedBean implementation class : com.mgmmirage.playersclub.definitions.PlayersClubPlayerPortType may not defined as interface
>         at org.apache.webbeans.util.WebBeansUtil.checkManagedBeanCondition(WebBeansUtil.java:3042)
>         at org.apache.webbeans.component.creation.ManagedBeanCreatorImpl.checkCreateConditions(ManagedBeanCreatorImpl.java:65)
>         at org.apache.webbeans.util.WebBeansUtil.defineManagedBean(WebBeansUtil.java:2894)
>         at org.apache.webbeans.container.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1143)
>         at org.apache.webbeans.util.WebBeansUtil.fireProcessInjectionTargetEventForJavaEeComponents(WebBeansUtil.java:2173)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:494)
>         at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:166)
>         at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:127)
>         at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:88)
>         at org.apache.webbeans.servlet.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:85)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
>         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
>         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (OWB-659) An annotated interface class is being seen as a manage bean.

Posted by "Mark Struberg (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved OWB-659.
-------------------------------

    Resolution: Fixed

Christian, can you please try with the latest owb-snapshot? Should be fixed as we now ignore annotations, interfaces and enums as being subject to injection.
                
> An annotated interface class is being seen as a manage bean.
> ------------------------------------------------------------
>
>                 Key: OWB-659
>                 URL: https://issues.apache.org/jira/browse/OWB-659
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Injection and Lookup
>    Affects Versions: 1.1.3
>         Environment: Linux
>            Reporter: Christian Nuesa
>            Assignee: Mark Struberg
>              Labels: annotation, exception, interface, managedbeans, validation
>             Fix For: 1.1.4
>
>
> I have an interface class generated by Apache CXF 2.4.3 in my project which comes out to have @WebService annotation in it.  This interface causes a runtime exception coming from WebBeansUtil.checkManagedBeanCondition(..) which states "ManagedBean implementation class : <class> may not defined as interface".
> This exception tells me that during the scanning of classes this interface is being mistaken as a managed bean, but it is not, hence the exception.  I investigated the code and narrowed my problem with BeansDeployer.java and surely enough its method called defineManagedBean(..) fails to validate if the class is an interface first before processing (so leading to the exception).
> This method must check if the incoming class is an interface so then must return a false value.  This way, any interface like this is avoided as managed bean.
> Here is the exception:
> org.apache.webbeans.exception.WebBeansConfigurationException: ManagedBean implementation class : com.mgmmirage.playersclub.definitions.PlayersClubPlayerPortType may not defined as interface
>         at org.apache.webbeans.util.WebBeansUtil.checkManagedBeanCondition(WebBeansUtil.java:3042)
>         at org.apache.webbeans.component.creation.ManagedBeanCreatorImpl.checkCreateConditions(ManagedBeanCreatorImpl.java:65)
>         at org.apache.webbeans.util.WebBeansUtil.defineManagedBean(WebBeansUtil.java:2894)
>         at org.apache.webbeans.container.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1143)
>         at org.apache.webbeans.util.WebBeansUtil.fireProcessInjectionTargetEventForJavaEeComponents(WebBeansUtil.java:2173)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:494)
>         at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:166)
>         at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:127)
>         at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:88)
>         at org.apache.webbeans.servlet.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:85)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
>         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
>         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OWB-659) An annotated interface class is being seen as a manage bean.

Posted by "Christian Nuesa (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244656#comment-13244656 ] 

Christian Nuesa commented on OWB-659:
-------------------------------------

Mark, where do I download the owb-snapshot?
                
> An annotated interface class is being seen as a manage bean.
> ------------------------------------------------------------
>
>                 Key: OWB-659
>                 URL: https://issues.apache.org/jira/browse/OWB-659
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Injection and Lookup
>    Affects Versions: 1.1.3
>         Environment: Linux
>            Reporter: Christian Nuesa
>            Assignee: Mark Struberg
>              Labels: annotation, exception, interface, managedbeans, validation
>             Fix For: 1.1.4
>
>
> I have an interface class generated by Apache CXF 2.4.3 in my project which comes out to have @WebService annotation in it.  This interface causes a runtime exception coming from WebBeansUtil.checkManagedBeanCondition(..) which states "ManagedBean implementation class : <class> may not defined as interface".
> This exception tells me that during the scanning of classes this interface is being mistaken as a managed bean, but it is not, hence the exception.  I investigated the code and narrowed my problem with BeansDeployer.java and surely enough its method called defineManagedBean(..) fails to validate if the class is an interface first before processing (so leading to the exception).
> This method must check if the incoming class is an interface so then must return a false value.  This way, any interface like this is avoided as managed bean.
> Here is the exception:
> org.apache.webbeans.exception.WebBeansConfigurationException: ManagedBean implementation class : com.mgmmirage.playersclub.definitions.PlayersClubPlayerPortType may not defined as interface
>         at org.apache.webbeans.util.WebBeansUtil.checkManagedBeanCondition(WebBeansUtil.java:3042)
>         at org.apache.webbeans.component.creation.ManagedBeanCreatorImpl.checkCreateConditions(ManagedBeanCreatorImpl.java:65)
>         at org.apache.webbeans.util.WebBeansUtil.defineManagedBean(WebBeansUtil.java:2894)
>         at org.apache.webbeans.container.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1143)
>         at org.apache.webbeans.util.WebBeansUtil.fireProcessInjectionTargetEventForJavaEeComponents(WebBeansUtil.java:2173)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:494)
>         at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:166)
>         at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:127)
>         at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:88)
>         at org.apache.webbeans.servlet.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:85)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
>         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
>         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (OWB-659) An annotated interface class is being seen as a manage bean.

Posted by "Mark Struberg (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg reassigned OWB-659:
---------------------------------

    Assignee: Mark Struberg  (was: Gurkan Erdogdu)
    
> An annotated interface class is being seen as a manage bean.
> ------------------------------------------------------------
>
>                 Key: OWB-659
>                 URL: https://issues.apache.org/jira/browse/OWB-659
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Injection and Lookup
>    Affects Versions: 1.1.3
>         Environment: Linux
>            Reporter: Christian Nuesa
>            Assignee: Mark Struberg
>              Labels: annotation, exception, interface, managedbeans, validation
>
> I have an interface class generated by Apache CXF 2.4.3 in my project which comes out to have @WebService annotation in it.  This interface causes a runtime exception coming from WebBeansUtil.checkManagedBeanCondition(..) which states "ManagedBean implementation class : <class> may not defined as interface".
> This exception tells me that during the scanning of classes this interface is being mistaken as a managed bean, but it is not, hence the exception.  I investigated the code and narrowed my problem with BeansDeployer.java and surely enough its method called defineManagedBean(..) fails to validate if the class is an interface first before processing (so leading to the exception).
> This method must check if the incoming class is an interface so then must return a false value.  This way, any interface like this is avoided as managed bean.
> Here is the exception:
> org.apache.webbeans.exception.WebBeansConfigurationException: ManagedBean implementation class : com.mgmmirage.playersclub.definitions.PlayersClubPlayerPortType may not defined as interface
>         at org.apache.webbeans.util.WebBeansUtil.checkManagedBeanCondition(WebBeansUtil.java:3042)
>         at org.apache.webbeans.component.creation.ManagedBeanCreatorImpl.checkCreateConditions(ManagedBeanCreatorImpl.java:65)
>         at org.apache.webbeans.util.WebBeansUtil.defineManagedBean(WebBeansUtil.java:2894)
>         at org.apache.webbeans.container.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1143)
>         at org.apache.webbeans.util.WebBeansUtil.fireProcessInjectionTargetEventForJavaEeComponents(WebBeansUtil.java:2173)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:788)
>         at org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:558)
>         at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:494)
>         at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:166)
>         at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:127)
>         at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:88)
>         at org.apache.webbeans.servlet.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:85)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
>         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
>         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira