4 Replies Latest reply on Oct 31, 2001 5:10 AM by matthias

    cmp-cd-Example with sapdb

    matthias

      Hi
      i have Problems with the cd-Example from JBoss.
      I try to connect it to sapdb.

      I have changed the file jboss.jcml as follows:

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

      org.hsqldb.jdbcDriver,com.sap.dbtech.jdbc.DriverSapDB




      DefaultDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      jdbc:sapdb://localhost/tst
      DOMAIN
      DOMAIN


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

      and i have copied the file sapdbc.jar to lib\ext

      When i copy cd.jar to the deploy-directory i see the following message reported by JBoss:

      -------------------------------------------------
      [Verifier] Verifying file:/D:/JBoss/JBoss-2.4.3/tmp/deploy/Default/cd.jar/ejb1001.jar
      [Container factory] Deploying CDBean
      [Container factory] Deploying CDCollectionBean
      [Container factory] com.sap.dbtech.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: No Catalogs in SAP DBTech
      [Container factory] at com.sap.dbtech.jdbc.ConnectionSapDB.getCatalog(ConnectionSapDB.java:354)
      [Container factory] at org.jboss.pool.jdbc.xa.wrapper.XAClientConnection.getCatalog(XAClientConnection.java:307)
      [Container factory] at org.jboss.ejb.plugins.jaws.jdbc.JDBCInitCommand.execute(JDBCInitCommand.java:102)
      [Container factory] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.init(JAWSPersistenceManager.java:103)
      [Container factory] at org.jboss.ejb.plugins.CMPPersistenceManager.init(CMPPersistenceManager.java:110)
      [Container factory] at org.jboss.ejb.EntityContainer.init(EntityContainer.java:291)
      [Container factory] at org.jboss.ejb.Application.init(Application.java:202)
      [Container factory] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:372)
      [Container factory] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:304)
      [Container factory] at java.lang.reflect.Method.invoke(Native Method)
      [Container factory] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      ...
      -------------------------------------------------

      Which catalogs are missing, do i have to change more ?

      Another question is, when i change name and Pool-Name from DefaultDS to SapDB i see the message:

      -------------------------------------------------
      [Verifier] Verifying file:/D:/JBoss/JBoss-2.4.3/tmp/deploy/Default/cd.jar/ejb1001.jar
      [Container factory] Deploying CDBean
      [Container factory] Deploying CDCollectionBean
      [Container factory] org.jboss.ejb.DeploymentException: DefaultDS not bound
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.JawsApplicationMetaData.init(JawsApplicationMetaData.java:120)
      [Container factory] at org.jboss.ejb.plugins.jaws.metadata.JawsXmlFileLoader.load(JawsXmlFileLoader.java:75)
      [Container factory] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory.(JDBCCommandFactory.java:133)
      -------------------------------------------------

      Where is the reference to DefaultDS defined ?

      Many thx in Advance

      Matthias

        • 1. Re: cmp-cd-Example with sapdb
          erik777

          I don't know anything about your database, but my guess is that you need to specify the catalog as a parameter to your connection string.

          With MySQL you need to specify which database to use. There are several ways of doing this. One way is to provide it as a property:

          DatabaseName=mydata

          You might need something similar where you specify a catalog.

          As for the JAWS datasource, the default is defined as DefaultDS, which is bound in standardjaws.xml. If you want to bind another data source, include a jaws.xml with your deployment, and include the following:


          java:/SapDB


          You use jaws.xml to override default settings.

          Hope this helps.

          • 2. Re: cmp-cd-Example with sapdb
            jonathanli888

            Erik,

            For the CD example, I have been trying to config the jaws.xml but failed. My intention is to create my own finders. Could you tell me which jaws.xml I can use or just create a new one? I put the following section to ejb-jar.xml and also tried to create my own jaws.xml. Still can not make it go.


            findJL
            id IS NOT NULL



            Regards,

            Jonathan

            • 3. Re: cmp-cd-Example with sapdb
              matthias

              Thank you Erik,

              the Problem with DefaultDS is solved on using jaws.xml.

              The Catalog-Problem is not solved. I have Tested the Connection with Adabas-D and here everything runs correct.

              In standardjaws.xml there is a type-Mapping for sapdb.
              Does this mean that there are experiences in this way ?

              regards Matthias

              • 4. Re: cmp-cd-Example with sapdb
                matthias

                The Problem is solved,

                the Reason was the jdbc-Driver. I have downloaded the newest version and now it works fine !

                Thanks for all
                Matthias