4 Replies Latest reply on Jun 26, 2009 11:55 AM by alexanderbell

    beans.xml & NightlyBuild

      Hi,


      I've got a problem with the beans.xml within the WEB-INF directory.
      My beans.xml looks like this:


      <beans>
           <deploy>
                <type>javax.inject.Production</type>
                <type>org.j4fry.webbeans.type.Mock</type>
           </deploy>
      </beans>



      So I defined a new Mock deployment type.
      Unfortunately it doesn't work the the 1.0.0.PREVIEW1. I get the following exception during startup:


      [INFO] Web Beans 1.0.0.PREVIEW1
      [INFO] Transactional services not available.  Transactional observers will be invoked synchronously.
      [INFO] EJB services not available. Session beans will be simple beans, injection into non-contextual EJBs, injection of @EJB in simple beans, injection of Java EE resources and JMS resources will not be available.
      [INFO] JPA services not available. Injection of @PersistenceContext will not occur. Entity beans will be discovered as simple beans.
      17.06.2009 09:26:40 org.apache.catalina.core.StandardContext listenerStart
      SCHWERWIEGEND: Exception sending context initialized event to listener instance of class org.jboss.webbeans.environment.servlet.Listener
      javax.inject.DefinitionException: Could not find 'deploy'
           at org.jboss.webbeans.xml.ParseXmlHelper.loadElementClass(ParseXmlHelper.java:62)
           at org.jboss.webbeans.xml.XmlParser.parseForBeans(XmlParser.java:149)
           at org.jboss.webbeans.xml.XmlParser.parse(XmlParser.java:64)
           at org.jboss.webbeans.bootstrap.WebBeansBootstrap.boot(WebBeansBootstrap.java:195)
           at org.jboss.webbeans.environment.servlet.Listener.contextInitialized(Listener.java:132)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
           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:525)
           at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
           at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
           at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
           at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
           at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
           at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
           at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
           at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
           at org.apache.catalina.core.StandardService.start(StandardService.java:516)
           at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
           at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
           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:585)
           at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
           at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: javax.inject.DefinitionException: deploy not a Java type
           ... 29 more
      17.06.2009 09:26:40 org.apache.catalina.core.StandardContext start



      I've read the proposed final draft of the spec. and section 2.5.5 says


      <type>javax.enterprise.injex.deployment.Production</type>



      So of course it isn't implemented yet in 1.0.0.PREVIEW1.
      But is there a way to declare some custom deployment types in 1.0.0.PREVIEW1?


      I tried to test this with a nightly build from webbeans.
      Unfortunately this page http://hudson.jboss.org/hudson/job/WebBeans-trunk-standalone/lastStableBuild/ doesn't provide a link to download the snapshot (like seam on that site: http://hudson.jboss.org/hudson/job/Seam-2.1.X-nightly/lastSuccessfulBuild/
      Is there a way to download a snapshot version of WebBeans?


      Alex