2 Replies Latest reply on May 25, 2007 1:40 PM by Sen

    Problem when using cloudscape on JBoss 3.2.3

    Sen Newbie

      Hi All,

      I try to run Petstore 1.3.2 on JBoss 3.2.3. I used a patch for Petstore 1.3.2 to run on JBoss 3.0.1 RC1. The patch works on 3.0.1 well. Using database cloudscape, provided by j2eesdk 1.3.1. But doesnt work in 3.2.3.
      link to the patch and doc:
      http://docs.huihoo.com/jboss/petstore.html

      I changed two things of JBoss 3.2.3:

      First, I changed "C:\jboss-3.2.3\server\default\conf\login-config.xml"
      add following lines into it:
      -----------------------------------------------------------------------------------

      <application-policy name = "CloudscapeDbRealm">
       <authentication>
       <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
       <module-option name = "principal"></module-option>
       <module-option name = "userName">estoreuser</module-option>
       <module-option name = "password">estore</module-option>
       <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=EstoreDataSource</module-option>
       </login-module>
       </authentication>
       </application-policy>
      
       <application-policy name = "CloudscapeDbRealmInventory">
       <authentication>
       <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
       <module-option name = "principal"></module-option>
       <module-option name = "userName">estoreuser</module-option>
       <module-option name = "password">estore</module-option>
       <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=InventoryDataSource</module-option>
       </login-module>
       </authentication>
       </application-policy>

      --------------------------------------------------------------------


      Second, I copy a file called "client-deployer-service.xml" into "C:\jboss-3.2.3\server\default\deploy"
      The content of this file:
      ---------------------------------------------------------------------------------
      <server>
      
       <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=EstoreDataSource">
      
       <attribute name="SecurityDomainJndiName">CloudscapeDbRealm</attribute>
      
      
       <depends optional-attribute-name="ManagedConnectionFactoryName">
       <!--embedded mbean-->
       <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=EstoreDataSource"> <!--DS-->
      
      
       <attribute name="JndiName">EstoreDB</attribute>
      
       <attribute name="ManagedConnectionFactoryProperties">
       <properties>
       <config-property name="ConnectionURL" type="java.lang.String">jdbc:rmi://localhost:1099/jdbc:cloudscape:EstoreDB;create=true</config-property>
       <config-property name="DriverClass" type="java.lang.String">COM.cloudscape.core.RmiJdbcDriver</config-property>
       <!--set these only if you want only default logins, not through JAAS -->
       <config-property name="UserName" type="java.lang.String">estoreuser</config-property>
       <config-property name="Password" type="java.lang.String">estore</config-property>
       </properties>
       </attribute>
       <!--hack-->
       <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
       </mbean>
       </depends>
      
      
       <depends optional-attribute-name="ManagedConnectionPool">
       <!--embedded mbean-->
       <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=EstoreDataSource">
      
       <attribute name="MinSize">0</attribute>
       <attribute name="MaxSize">50</attribute>
       <attribute name="BlockingTimeoutMillis">5000</attribute>
       <attribute name="IdleTimeoutMinutes">15</attribute>
       <attribute name="Criteria">ByContainer</attribute>
       </mbean>
       </depends>
       <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
      
       <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
      
       <attribute name="TransactionManager">java:/TransactionManager</attribute>
       <!--make the rar deploy! hack till better deployment-->
       <depends>jboss.jca:service=RARDeployer</depends>
      
       </mbean>
      
      
       <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=InventoryDataSource">
      
       <!--uncomment out this line if you are using the Informix DbRealm above -->
       <attribute name="SecurityDomainJndiName">CloudscapeDbRealmInventory</attribute>
      
      
       <depends optional-attribute-name="ManagedConnectionFactoryName">
       <!--embedded mbean-->
       <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=InventoryDataSource"> <!--DS-->
      
       <attribute name="JndiName">InventoryDB</attribute>
      
       <attribute name="ManagedConnectionFactoryProperties">
       <properties>
       <config-property name="ConnectionURL" type="java.lang.String">jdbc:rmi://localhost:1099/jdbc:cloudscape:EstoreDB;create=true</config-property>
       <config-property name="DriverClass" type="java.lang.String">COM.cloudscape.core.RmiJdbcDriver</config-property>
       <!--set these only if you want only default logins, not through JAAS -->
       <config-property name="UserName" type="java.lang.String">estoreuser</config-property>
       <config-property name="Password" type="java.lang.String">estore</config-property>
       </properties>
       </attribute>
       <!--hack-->
       <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
       </mbean>
       </depends>
      
      
       <depends optional-attribute-name="ManagedConnectionPool">
       <!--embedded mbean-->
       <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=InventoryDataSource">
      
       <attribute name="MinSize">0</attribute>
       <attribute name="MaxSize">50</attribute>
       <attribute name="BlockingTimeoutMillis">5000</attribute>
       <attribute name="IdleTimeoutMinutes">15</attribute>
       <attribute name="Criteria">ByContainer</attribute>
       </mbean>
       </depends>
       <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
      
       <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
      
       <attribute name="TransactionManager">java:/TransactionManager</attribute>
       <!--make the rar deploy! hack till better deployment-->
       <depends>jboss.jca:service=RARDeployer</depends>
      
       </mbean>
      
      </server>
      

      ---------------------------------------------------------------------------------

      (I started cloudscape.)

      JBoss 3.2.3 seems has no problem with the modification of "login-config.xml".

      However, JBoss 3.2.3 can't deploy "cloudscape-service.xml". It shows error msg when I start it:
      --------------------------------------------------------------------------------
      12:22:18,140 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.jca:service=LocalTxCM,name=EstoreDataSource
      state: FAILED
      I Depend On: jboss.jca:service=LocalTxDS,name=EstoreDataSource

      Depends On Me: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=ManagedConnectionFactoryName value=jboss.
      jca:service=LocalTxDS,name=EstoreDataSource on mbean jboss.jca:service=LocalTxCM,name=EstoreDataSource; - nested throwable: (javax.management.AttributeNotFoundException: Writable attribute 'ManagedConnectionFactoryName' not found), ObjectName: jboss.jca:service=LocalTxDS,name=EstoreDataSource
      state: FAILED
      I Depend On:
      Depends On Me: jboss.jca:service=LocalTxCM,name=EstoreDataSource
      org.jboss.deployment.DeploymentException: No Attribute found with name: JndiName, ObjectName:
      jboss.jca:service=LocalTxCM,name=InventoryDataSource
      state: FAILED
      I Depend On: jboss.jca:service=LocalTxDS,name=InventoryDataSource

      Depends On Me: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=ManagedConnectionFactoryName value=jboss.
      jca:service=LocalTxDS,name=InventoryDataSource on mbean jboss.jca:service=LocalTxCM,name=InventoryDataSource; - nested
      throwable: (javax.management.AttributeNotFoundException: Writable attribute 'ManagedConnectionFactoryName' not found), ObjectName: jboss.jca:service=LocalTxDS,name=InventoryDataSource
      state: FAILED
      I Depend On:
      Depends On Me: jboss.jca:service=LocalTxCM,name=InventoryDataSource
      org.jboss.deployment.DeploymentException: No Attribute found with name: JndiName
      ]
      -------------------------------------------------------------------------------

      The Petstore still can run, but shows "Unable to Connect to Database
      Database Connection is closed: Confirm that you have started your database."

      Could anyone kindly help with this problem, please?

      Thank you very much!