0 Replies Latest reply on Jul 28, 2006 5:13 PM by sateesh kumar

    Cannot Deploy the JBoss Seam Examples ( getting Deployment E

    sateesh kumar Newbie

      Hi All,

      I installed JBoss4.0.4 and Started working on Seam Examples and i was able to deploy and test the examples initially..

      I developed a Sample app (under /examples/remoting)and when i tried deploying it i am getting the following Exception

      16:52:16,279 ERROR [MainDeployer] Could not create deployment: file:/D:/Projects/Sample/Jboss4.0.4/server/default/tmp/deplo
      y/tmp12863jboss-seam-registration.ear-contents/jboss-seam.jar-contents/booking-ds.xml
      org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,nam
      e=bookingDatasource
       at org.jboss.system.ServiceCreator.install(ServiceCreator.java:103)
       at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
       at org.jboss.system.ServiceController.install(ServiceController.java:226)
       at sun.reflect.GeneratedMethodAccessor15.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 $Proxy4.install(Unknown Source)
       at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
       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.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 $Proxy25.create(Unknown Source)
       at org.jboss.deployment.XSLSubDeployer.create(XSLSubDeployer.java:192)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor14.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:634)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:26
      3)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
      
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      



      The Sample App i tried is using a Slider Control with remoting capabilities.


      Here is the sample.xhtml i am using


      <body>
      
       <script type="text/javascript" src="seam/remoting/resource/remote.js">
       <!--
       // This space intentionally left blank
       //-->
       </script>
      
       <script type="text/javascript" src="seam/remoting/interface.js?dpaRemoteSlider">
       <!--
       // This space intentionally left blank
       //-->
       </script>
       <script type='text/javascript' src='scripts/slider.js'></script>
       <link rel="stylesheet" type="text/css" href="style/slider.css" />
      
       <script type="text/javascript">
       //<![CDATA[
      
       Seam.Remoting.setDebug(true);
      
       function sendData() {
       value = document.getElementById("channelRedYellowGreen").value;
       Seam.Component.getInstance("dpaRemoteSlider").getMessage(value, sliderCallback);
       }
       function sliderCallback(result) {
       alert(result);
       }
       function mouseUpDone(){
       // TODO : Write the Logic to connect to the Server if you need
       //alert("Here in mouseUpDone "+document.currentSlider.valueX);
       sendData();
       return;
       }
       // ]]>
       </script>
       Welcome to Digital Preservation Archives.
      
       <input id="channelRedYellowGreen" name="channelRedYellowGreen" class="slider" type="text" value="0" />
       <div id="datalog" style="border: 1px solid black;"></div>
      
       </body>
      


      My application.xml is listed below
      <application>
       <display-name>Seam Remoting Sample</display-name>
       <module>
       <web>
       <web-uri>seam-sample.war</web-uri>
       <context-root>/seam-sample</context-root>
       </web>
       </module>
       <module>
       <ejb>seam-sample.jar</ejb>
       </module>
       <module>
       <java>jboss-seam.jar</java>
       </module>
      </application>
      
      


      jboss-app.xml :

      <jboss-app>
       <loader-repository>
       seam.jboss.org:loader=seam-dpa
       </loader-repository>
      </jboss-app>
      


      I am using the Session Bean
      
      package com.test..simple.remote.slider;
      
      import javax.ejb.Stateless;
      import javax.interceptor.Interceptors;
      
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.ejb.SeamInterceptor;
      
      @Stateless
      @Name("sampleRemoteSlider")
      @Interceptors(SeamInterceptor.class)
      public class SampleRemoteSlider implements SampleRemoteSliderLocal {
      
       public String getMessage(String strValue) {
       return "Selected the Value " + strValue;
       }
      }
      


      My JNDI View is as shown below..
      java: Namespace
      
       +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
       +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
       +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
       +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
       +- comp (class: javax.naming.Context)
       +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
       +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
       +- jaas (class: javax.naming.Context)
       | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
       | +- jmx-console (class: org.jboss.security.plugins.SecurityDomainContext)
       | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
       | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
       +- timedCacheFactory (class: javax.naming.Context)
      Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
       +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
       +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
       +- Mail (class: javax.mail.Session)
       +- comp.ejb3 (class: javax.naming.Context)
       | NonContext: null
       +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
       +- TransactionManager (class: org.jboss.tm.TxManager)
       +- bookingDatasource (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
      
      



      Now i cannot deploy other examples which comes with Seam.

      I tried unregistering ( invoked the destroy() method on name=bookingDatasource,service=LocalTxCM and even after that i am getting the same error..

      Why the booking-ds.xml is placed in the jboss-seam.jar File ??

      Pls let me know hot to resolve this..

      Thanks
      Sateesh