12 Replies Latest reply on May 26, 2010 4:04 PM by Nicolas Feybesse

    Problem in AbstractBeanDeployer Weld Core 1.0.2 SNAPHOT

    Nicolas Feybesse Newbie

      Hi


      I am using Weld Core 1.0.2 SNAPHOT.


      I thing there is a problem in AbstractBeanDeployer (line 308) :


             


          (hasSimpleWebBeanConstructor(clazz) || InstantiatorFactory.useInstantiators());
      




      InstantiatorFactory.useInstantiators() doesn't check if there is @Inject annotation on constructor.


      All classes are seen as beans when we are using Instatiators.


      Stacktrace :




      org.jboss.weld.exceptions.DefinitionException: WELD-000816 Cannot determine constructor to use for [class] public org.genericsystem.admintree.nodes.UniLinkNodeImpl
              at org.jboss.weld.util.Beans.getBeanConstructor(Beans.java:711)
              at org.jboss.weld.bean.AbstractClassBean.initConstructor(AbstractClassBean.java:598)
              at org.jboss.weld.bean.ManagedBean.<init>(ManagedBean.java:322)
              at org.jboss.weld.bean.ManagedBean.of(ManagedBean.java:288)
              at org.jboss.weld.bootstrap.AbstractBeanDeployer.createManagedBean(AbstractBeanDeployer.java:239)
              at org.jboss.weld.bootstrap.BeanDeployer.createBeans(BeanDeployer.java:114)
              at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:151)
              at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:380)
              at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:171)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
              at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
              at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
              at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
              at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
              at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
              at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
              at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
              at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
              at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
              at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
              at java.lang.Thread.run(Thread.java:619)






      My class UniLinkNodeImpl is not a bean.


      Could you have a look and tell me if i am right


      Thanks in advance
      NF