11 Replies Latest reply on Jul 5, 2006 6:33 AM by Thomas Heute

    components.properties ignored if placed in war file?

    Ulf Niesar Newbie

      Hi guys,

      I'm trying to set up one of the Seam examples as a project NOT using embedded ejb. Everything works fine if I'm only using components.xml without components.properties. However, if I start to use the combination of components.xml and components.properties as in the examples, I'm getting errors when I deploy the ear file.

      1. working fine:
      components.xml:

      <components>
       <component name="org.jboss.seam.core.init">
       <property name="debug">true</property>
       <property name="myFacesLifecycleBug">false</property>
       <property name="jndiPattern">jboss-seam-booking/#{ejbName}/local</property>
       </component>
       <!-- 120 second conversation timeout -->
       <component name="org.jboss.seam.core.manager">
       <property name="conversationTimeout">120000</property>
       </component>
       <component class="org.jboss.seam.core.Ejb" installed="false"/>
      </components>


      2. not working
      components.xml:
      <components>
       <component name="org.jboss.seam.core.init">
       <property name="debug">true</property>
       <property name="myFacesLifecycleBug">@myFacesLifecycleBug@</property>
       <property name="jndiPattern">@jndiPattern@</property>
       </component>
       <!-- 120 second conversation timeout -->
       <component name="org.jboss.seam.core.manager">
       <property name="conversationTimeout">120000</property>
       </component>
       <component class="org.jboss.seam.core.Ejb" installed="@embeddedEjb@"/>
      </components>

      components.properties:
      myFacesLifecycleBug false
      embeddedEjb false
      jndiPattern jboss-seam-booking/#{ejbName}/local

      location:
      components.xml in war-file/WEB-INF
      components.properties
      in war-file/WEB-INF/classes -> doesn't work
      in war-file/WEB-INF -> doesn't work
      in war-file root directory -> doesn't work

      So no matter where I place components.properties inside the war file, I'm getting the following error
      08:28:45,603 INFO [ServletContextListener] Welcome to Seam 1.0.1.GA
      08:28:45,620 INFO [Initialization] reading components.xml
      08:28:45,666 INFO [Initialization] reading properties from: /seam.properties
      08:28:45,667 INFO [Initialization] reading properties from: /jndi.properties
      08:28:45,672 INFO [Initialization] initializing Seam
      08:28:45,716 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
      08:28:45,722 ERROR [[/seam-booking]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.NullPointerException
       at sun.beans.editors.BoolEditor.setAsText(BoolEditor.java:38)
       at org.jboss.seam.Component.initInitializers(Component.java:314)
       at org.jboss.seam.Component.<init>(Component.java:209)
       at org.jboss.seam.Component.<init>(Component.java:159)
       at org.jboss.seam.Component.<init>(Component.java:154)
       at org.jboss.seam.Component.<init>(Component.java:149)
       at org.jboss.seam.init.Initialization.addComponent(Initialization.java:381)
       at org.jboss.seam.init.Initialization.addComponents(Initialization.java:255)
       at org.jboss.seam.init.Initialization.init(Initialization.java:195)
       at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:32)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
       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.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.apache.catalina.core.StandardContext.init(StandardContext.java:5116)
       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.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
       at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
       at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
       at org.jboss.web.WebModule.startModule(WebModule.java:83)
       at org.jboss.web.WebModule.startService(WebModule.java:61)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy43.start(Unknown Source)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
       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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
       at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy44.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      08:28:45,724 INFO [FacesConfigurator] Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
      08:28:45,798 INFO [FacesConfigurator] Reading config jar:file:/opt/jboss-4.0.4.GA/server/default/tmp/deploy/tmp10388jboss-seam-booking.ear-contents/jboss-seam.jar!/META-INF/faces-config.xml
      08:28:45,840 INFO [FacesConfigurator] Reading config jar:file:/var/srv/jboss-4.0.4/default/tmp/deploy/tmp10388jboss-seam-booking.ear-contents/jboss-seam-booking-exp.war/WEB-INF/lib/jboss-seam-debug.jar!/META-INF/faces-config.xml
      08:28:45,848 INFO [FacesConfigurator] Reading config jar:file:/var/srv/jboss-4.0.4/default/tmp/deploy/tmp10388jboss-seam-booking.ear-contents/jboss-seam-booking-exp.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/faces-config.xml
      08:28:45,884 INFO [FacesConfigurator] Reading config jar:file:/var/srv/jboss-4.0.4/default/tmp/deploy/tmp10388jboss-seam-booking.ear-contents/jboss-seam-booking-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/faces-config.xml
      08:28:45,910 INFO [FacesConfigurator] Reading config /WEB-INF/faces-config.xml
      08:28:45,943 WARN [LocaleUtils] Locale name in faces-config.xml null or empty, setting locale to default locale : en_US
      08:28:46,115 INFO [StartupServletContextListener] ServletContext '/opt/jboss-4.0.4.GA/server/default/./tmp/deploy/tmp10388jboss-seam-booking.ear-contents/jboss-seam-booking-exp.war/' initialized.
      08:28:46,115 ERROR [StandardContext] Error listenerStart
      08:28:46,115 ERROR [StandardContext] Context [/seam-booking] startup failed due to previous errors
      08:28:46,179 WARN [ServiceController] Problem starting service jboss.web.deployment:war=jboss-seam-booking.war,id=-966522822
      org.jboss.deployment.DeploymentException: URL file:/var/srv/jboss-4.0.4/default/tmp/deploy/tmp10388jboss-seam-booking.ear-contents/jboss-seam-booking-exp.war/ deployment failed
       at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:365)
       at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
       at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
       at org.jboss.web.WebModule.startModule(WebModule.java:83)
       at org.jboss.web.WebModule.startService(WebModule.java:61)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy43.start(Unknown Source)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
       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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
       at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy44.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      08:28:46,180 ERROR [MainDeployer] Could not start deployment: file:/opt/jboss-4.0.4.GA/server/default/tmp/deploy/tmp10388jboss-seam-booking.ear-contents/jboss-seam-booking.war
      org.jboss.deployment.DeploymentException: URL file:/var/srv/jboss-4.0.4/default/tmp/deploy/tmp10388jboss-seam-booking.ear-contents/jboss-seam-booking-exp.war/ deployment failed
       at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:365)
       at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
       at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
       at org.jboss.web.WebModule.startModule(WebModule.java:83)
       at org.jboss.web.WebModule.startService(WebModule.java:61)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy43.start(Unknown Source)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
       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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
       at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy44.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

      The question is, is there anything which needs to be configured if I want to use the components.xml/components.properties combination or if this working with embedded ejb only right now?

        • 1. Re: components.properties ignored if placed in war file?
          Ulf Niesar Newbie

          Hmmm,

          in http://docs.jboss.com/seam/1.0.0.GA/reference/en/html/concepts.html#d0e2443 I found

          Seam let's you place wildcards of the form @wildcard@ in the components.xml file which can be replaced either by your Ant build script (at deployment time) or by providing a file named components.properties in the classpath (at development time). You'll see this approach used in the Seam examples.


          Since this is intended to be an example case for a Wiki, I would like to use the components.xml/components.properties combination. Am I mistaken that the right locations for the files should be:
          war-file.war/WEB-INF/components.xml
          war-file.war/WEB-INF/classes/components.properties

          From my understanding both files should be in the same war-file since it's possible that the ear-file contains more than one war-file. And WEB-INF/classes is the default classpath of the war-file, isn't it? So what am I doing wrong???

          • 2. Re: components.properties ignored if placed in war file?
            Gavin King Master

            I don't deploy components.properties into the ear. All i do is use the Ant task to replace any @foobar@ stuff. I really think you should follow this approach.

            • 3. Re: components.properties ignored if placed in war file?
              Ulf Niesar Newbie

              Gavin,

              finally I understand why there is a components.properties file in the Seam examples: it's there to confuse people like me ;)

              But seriously, if the contents of components.properties is supposed to be included automatically (according to the Seam reference), and you do it in an Ant task instead although components.properties exists in the Seam examples, that sounds like a known bug to me.

              I didn't see that issue in the JIRA yet. Was my research too bad or should I file a bug?


              BTW, using Ant is no option in my case. I rather let the Wiki reader edit components.xml or provide a corrected file myself, don't know yet. You know, this is supposed to become a simple example project for Eclipse without the embedded ejb and microcontainer stuff. Kind of get what you really need for Seam, JSF, facelets - run packaging within Eclipse - deploy - enjoy.

              • 4. Re: components.properties ignored if placed in war file?
                Gavin King Master

                components.properties is used when you run the tests from eclipse (ie. there is no chance for ant to replace values).

                of course I *could* use components.properties when I deploy to an EAR, but then I would need three different components.properties files for every example app (testng, jboss, tomcat), and then some complex crap in Ant to pick the one I want for a particular deplyment, and I really CBF having all those shitty files.

                So I just use Ant replace.

                You don't need components.properties at all if all you want to do is deploy to an appserver.

                • 5. Re: components.properties ignored if placed in war file?
                  Ulf Niesar Newbie

                  Gavin,

                  don't take my remark too seriously, I actually tried to make a joke since I needed to laugh about myself when you wrote you do the replacements within the Ant job. So never mind...

                  But I just realized that it's a huge advantage to be able to read properly :(
                  In the text I cited from the Seam reference before, it says "...by providing a file named components.properties in the classpath (at development time)."

                  Although I don't catch how I could magically get a "filled" components.xml for deployment if I have components.properties somewhere in my classpath at development time ;) But that's not the point. I actually missed "(at development time)" and rather thought like "(at deployment time)". That's why I deployed it in the ear file. Sorry, my mistake!

                  • 6. Re: components.properties ignored if placed in war file?
                    Gavin King Master

                    I wasn't offended, just trying to explain...

                    • 7. Re: components.properties ignored if placed in war file?
                      Ulf Niesar Newbie

                      Thank's, Gavin, I appreciate your help!

                      • 8. Re: components.properties ignored if placed in war file?
                        David Bernstein Newbie

                        Ulf,

                        The build.xml attachment to the SeamEclipseHowTo page http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamEclipseHowto does editing of components.xml as part of the "war" target (in the copy/filterset part) and the components.properties file isn't copied into deployment but rather used by Ant. (No claim to authorship here, it was generally lifted from the Seam examples.)

                        Best regards,
                        Dave

                        • 9. Re: components.properties ignored if placed in war file?
                          Ulf Niesar Newbie

                          Thanks, Dave!

                          You know, some weeks ago I read something about these components.xml/components.properties files and got it wrong somehow. But at that time I used components.xml with everything included by hand only. So when I started this wiki stuff I came back to the issue with components.properties. But since I had it wrong in my mind I rather messed around. Took a little bit too long, but meanwhile I got it ;)

                          BTW, congratulations to your Wiki! I think it's very helpful. A few days ago I thought you are already done with it and edited a little bit after I saw a few minor issues. Sorry, didn't want to interfere.

                          Meanwhile I was successful to solve the issue on which I wote the little comment in your wiki. It turned out that the main problem was the kind of JNDI used in the examples. That one is only knowing local names and you are running into issues if you try to deploy it on the JBoss AS without taking special care. Anyway, meanwhile I wrote another http://wiki.jboss.org/wiki/Wiki.jsp?page=EclipseSeamProject on how to setup a Seam project (booking example). It was a kind of 50.001 to 49.999 decision to do it, but finally I thought there my be other users interested to have an Eclipse project with much fewer library files and less configuration. However, I left out the TestNG stuff since it's done nicely in your wiki. I'm not sure yet how to do it, but I think I will add a comment like get that library and take a look at dbatcn's wiki. Something like that...

                          • 10. Re: components.properties ignored if placed in war file?
                            Thomas Heute Master

                            When you write new Wiki pages, don't forget to link them from the front Wiki page: http://www.jboss.com/wiki/Wiki.jsp?page=JBossSeam

                            Otherwise nobody will notice those new pages

                            Thanks for your contribution !

                            • 11. Re: components.properties ignored if placed in war file?
                              Thomas Heute Master

                              Oups the links are there sorry ;)

                              Thanks again. I am just changing the beginning (installation of Seam) to point to a unique page so that we don't have to change the instructions for installation in multiple places.