2 Replies Latest reply on May 5, 2002 2:07 PM by David Jencks

    Cloudscape and Petstore - config/deployment questions

    Grzegorz Newbie


      Hello,

      I am a newcomer to JBoss, and one of the first steps
      was to try to deploy PetStore on it. No success so far. I was
      browsing this mailing list for answers but none of the fixes
      I came across worked. So here is my case:

      On JBoss 3.0.0 RC/tomcat I am getting this:

      2002-05-01 18:02:39,116 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/net/rolaids-home2/glo
      bal/export/proj2/barcelona2/gczaj2/as/jboss-3.0.0RC1_tomcat-4.0.3/server/default/deploy/cloudscapeds-service.xml
      2002-05-01 18:02:39,116 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, create step: url file:/net/rolaids-home2
      /global/export/proj2/barcelona2/gczaj2/as/jboss-3.0.0RC1_tomcat-4.0.3/server/default/deploy/cloudscapeds-service.xml
      2002-05-01 18:02:39,118 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.jca:service=ConnectionFactor
      yLoader,name=CloudscapeDS
      2002-05-01 18:02:39,118 DEBUG [org.jboss.system.ServiceCreator] code: org.jboss.resource.ConnectionFactoryLoader
      2002-05-01 18:02:39,288 DEBUG [org.jboss.system.ServiceCreator] Class not found for mbean: jboss.jca:service=ConnectionF
      actoryLoader,name=CloudscapeDS
      2002-05-01 18:02:39,289 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying cloudscapeds-servic
      e.xml

      and ${JBOSS_HOME}/server/default/deploy/cloudscapeds-service.xml looks like this:





      ConnectionURL=jdbc:rmi://localhost:1098/jdbc:cloudscape:CloudscapeDB
      DriverClass=COM.cloudscape.core.JDBCDriver
      UserName=

      CloudscapeDS
      java:/TransactionManager
      <depends optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
      <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory

      BlockingTimeoutMillis=500000
      IdleTimeoutMinutes=30
      MaxSize=10
      CleanupIntervalMinutes=10
      MinSize=0
      MaxIdleTimeoutPercent=1.0

      org.jboss.resource.security.ManyToOnePrincipalMapping
      UserName=




      Is the problem here a confusion about
      jboss.jca:service=ConnectionFactoryLoader,name=CloudscapeDS
      being a class name? In any case, any help is very much appreciated -
      a cloudscapeds-service.xml which works would hopefully do too.

      Now, for 2.4.4 (JBoss/Tomcat) I integrated jboss.jcml from the petstore
      patch into JBoss's jboss.jcml, and the server booting hangs with such
      a message:

      [INFO,EstoreDB] XA Connection pool EstoreDB bound to java:/EstoreDB

      Any ideas? In both cases (3.0 and 2.4.4) the database is up and running,
      but it seems that the boot does not get to a point where it can actually
      talk to it. I've added jaws.xml to META-INF in petstore, but I guess
      this does not matter as well for these problems.

      Thanks,
      Greg



        • 1. Re: Cloudscape and Petstore - config/deployment questions
          Yin Tse Newbie

          I got the petstore 1.1.2 to work on the jboss 2.44 . I configured it with hsql which comes default with jboss. Here's a copy of the jboss.jcml. The error you mention seems like it might be hanging after encountering a problem with trying to bind the second datasource reference such as InventoryDB. I'm attaching a copy of my jboss.jcml . Everything works fine except that whenever I try to call the InventoryDB datasource, I get an error message. When I try to call EstoreDB datasource, everything works fine. I haven't found anyone complaining about the InventoryDB datasource yet since it's not essential to proper functioning of the petstore. If anyone familiar with this issue (why the InventoryDB doesn't work) please post an update on that. Thanks. Here's my jboss.jcml :

          <!-- ==================================================================== -->
          <!-- JDBC -->
          <!-- ==================================================================== -->


          org.hsqldb.jdbcDriver



          1476
          true
          default
          false





          EstoreDB
          org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
          jdbc:hsqldb:hsql://localhost:1476
          sa
          10


          false
          false
          false
          true
          120000
          1800000
          false
          false
          1.0
          0





          java:/EstoreDB
          java:/InventoryDB




          As for jboss 3.0 , here's my hsqldb-service.xml which works for me :
          <?xml version="1.0" encoding="UTF-8"?>

          <!-- ===================================================================== -->
          <!-- -->
          <!-- JBoss Server Configuration -->
          <!-- -->
          <!-- ===================================================================== -->

          <!-- $Id: hsqldb-service.xml,v 1.2 2002/04/14 04:31:56 d_jencks Exp $ -->



          <!-- ==================================================================== -->
          <!-- New ConnectionManager setup for default hsql dbs -->
          <!-- ==================================================================== -->


          <!--make the rar deploy! hack till better deployment-->
          jboss.jca:service=RARDeployer


          <depends optional-attribute-name="ManagedConnectionFactoryName">
          <!--embedded mbean-->

          <!--hack-->
          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
          jboss:service=Hypersonic

          <!--real attributes-->


          <config-property>
          <config-property-name>ConnectionURL</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>jdbc:hsqldb:hsql://localhost:1476</config-property-value>
          </config-property>
          <config-property>
          <config-property-name>DriverClass</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>org.hsqldb.jdbcDriver</config-property-value>
          </config-property>
          <config-property>
          <config-property-name>UserName</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>sa</config-property-value>
          </config-property>
          <config-property>
          <config-property-name>Password</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value></config-property-value>
          </config-property>


          EstoreDB


          <depends optional-attribute-name="ManagedConnectionPool">
          <!--embedded mbean-->


          0
          50
          5000
          15
          <!--criteria indicates if Subject (from security domain) or app supplied
          parameters (such as from getConnection(user, pw)) are used to distinguish
          connections in the pool. Choices are
          ByContainerAndApplication (use both),
          ByContainer (use Subject),
          ByApplication (use app supplied params only),
          ByNothing (all connections are equivalent, usually if adapter supports
          reauthentication)-->
          ByContainer


          <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
          java:/jaas/HsqlDbRealm
          java:/TransactionManager






          <!-- Moved to end to test anonymous depends -->


          1476
          true
          default
          false




          • 2. Re: Cloudscape and Petstore - config/deployment questions
            David Jencks Master

            1. Please get jboss 3 rc2. Remove your old cloudscape-service.xml (I don't know how you got it, but it is so obsolete you should start over. ConnectionFactoryLoader is not in JBoss any more.). Make a new cloudscape-service.xml by modifying one in docs/examples/jca (from zip distro) or connector/src/etc/example-conf (cvs). I don't know if cloudscape supports xa. If not, I suggest modifying informix-service.xml, if so informix-xa-service.xml.

            Set up security for your new datasource(s) by adding the appropriate section to login-conf.xml, following the instructions in the sample file. I don't know what kind of security setup petstore wants. If only one db user is needed, use ConfiguredIdentityLoginModule as in the samples. If each user gets a different db user account under their application login name, use CallerIdentityLoginModule. These are the only scenarios we provide login modules for at the moment.

            I strongly suggest you write a simple ejb to test whether your connection is working properly, or try to setup and run the testsuite. The datasource can get bound into jndi even if the url is wrong.


            I'd try jetty first, it seems easier to work with than tomcat.

            2. For jboss 2.4.x, hanging at the location you indicate usually means the url is wrong.