2 Replies Latest reply on Feb 6, 2002 8:42 PM by vyachman

    Problem with deploying "cmp-jaws" example

    vyachman

      Hello,
      I am trying to deploy a "cmp-jaws” example from the manual on jBoss3 using MySQL database.
      I complete following steps:

      1) Changed jaws.xml to look like this:

      sdcDS
      <type-mapping>mySQL</type-mapping>
      - <enterprise-beans>
      -
      <ejb-name>ClassBean</ejb-name>
      <table-name>CLASS</table-name>
      <remove-table>true</remove-table>
      - <cmp-field>
      <field-name>classId</field-name>
      <column-name>ID</column-name>
      </cmp-field>
      - <cmp-field>
      <field-name>teacherName</field-name>
      <column-name>TEACHER</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(100)</sql-type>
      </cmp-field>
      - <cmp-field>
      <field-name>studentCount</field-name>
      <column-name>STUDENTNBR</column-name>
      </cmp-field>
      -
      findBigClasses
      studentCount > {0} AND teacherName = {1}
      studentCount DESC
      <read-ahead>true</read-ahead>


      </enterprise-beans>


      2) I created mysql-service.xml and placed it in a deploy directory. This file looks like this:
      <?xml version="1.0" encoding="UTF-8" ?>
      - <!--
      $Id: mysql-service.xml,v 1.2 2002/01/14 00:16:51 d_jencks Exp $
      -->

      -

      -
      ConnectionURL=jdbc:mysql://localhost/SDClub DriverClass=org.gjt.mm.mysql.Driver userName=root password=root
      sdcDS
      java:/TransactionManager
      <mbean-ref name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter</mbean-ref>
      <mbean-ref name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory</mbean-ref>
      # #Wed Aug 15 16:17:29 EDT 2001 BlockingTimeoutMillis=500000 IdleTimeoutMinutes=30 MaxSize=10 CleanupIntervalMinutes=10 MinSize=0 MaxIdleTimeoutPercent=1.0
      org.jboss.resource.security.ManyToOnePrincipalMapping
      userName=root password=root



      3) Created class.jar and copied it to deploy directory.

      I am getting the following error: Could not deploy file:/D:/jboss/Default/class.jar/, Cause: org.jboss.ejb.DeploymentException: sdcDS not bound.

      Can anyone suggest what steps am I missing? We are in a process of evaluating different application servers. So far I was very impressed with jboss. Any assistance is highly appreciated. Thanks in advance.

        • 1. Re: Problem with deploying "cmp-jaws" example
          davidjencks

          The datasource is not getting started correctly. I think there are errors in the mbean-ref object names: I think they need to start with e.g. JCA: rather than jboss.jca:. Please make sure they are the same as the actual mbean names as found on port 8082.

          • 2. Re: Problem with deploying "cmp-jaws" example
            vyachman

            You were absolutely right! I had to change my mysql-service.xml to look like this:





            ConnectionURL=jdbc:mysql://localhost/SDClub DriverClass=org.gjt.mm.mysql.Driver userName=root password=root
            sdcDS
            java:/TransactionManager
            <mbean-ref name="ResourceAdapterName">JCA:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter</mbean-ref>
            <mbean-ref name="ConnectionManagerFactoryLoaderName">JCA:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory</mbean-ref>
            #
            #Wed Aug 15 16:17:29 EDT 2001
            BlockingTimeoutMillis=500000
            IdleTimeoutMinutes=30
            MaxSize=10
            CleanupIntervalMinutes=10
            MinSize=0
            MaxIdleTimeoutPercent=1.0

            org.jboss.resource.security.ManyToOnePrincipalMapping
            userName=root password=root