4 Replies Latest reply on Aug 30, 2004 3:13 PM by lithous2

    Can't get jbosscmp-jdbc to be used instead of jaws

    lithous2 Newbie

      No matter what I try. I am using JBoss 3.0.8 on WinXP (for development) and jaws.xml must be deployed or I get many errors. It seems to totally ignore jbosscmp-jdbc.xml. The errors are the same whether I have neither jaws.xml nor jbosscmp-jdbc.xml as it is if I only include jbosscmp-jdbc.xml.

      I'm using MySQL... Do I need to configure something in mysql-service.xml?

      I've read many places that 3.0.x and up jaws isn't necessary anymore because of jbosscmp-jdbc, is that true?

      thanks.

        • 1. Re: Can't get jbosscmp-jdbc to be used instead of jaws
          Heiko Rupp Master

          You probably put the wrong DTD in jbosscmp-jdbc.xml
          I don't remember the details.
          Make sure you have
          <!DOCTYPE jbosscmp-jdbc PUBLIC
          "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN"
          "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">

          (or its 3_0 equivalent).

          • 2. Re: Can't get jbosscmp-jdbc to be used instead of jaws
            Markku Luotamo Newbie

            I still have the same problem as lithous2 - also JBoss 3.2.5 seems to ignore the EJB's own DS directives, even with dtd:s updated to 3.2 (at least in jboss.xml and jbosscmp-jdbc.xml). Even the JNDI tree shows that the EJB properly links to MySqlDS, and the DS itself was deployed OK.

            My workaround is indeed to change
            java:/DefaultDS
            <datasource-mapping>Hypersonic SQL</datasource-mapping>

            in standardjaws.xml and standardjbosscmp-jdbc.xml to MySqlDS and mySQL .

            There must be a better way due to the points (pilhuhn) mentioned, but googling shows that many use the same workaround...


            • 3. Re: Can't get jbosscmp-jdbc to be used instead of jaws
              Heiko Rupp Master

              Perhaps this is helpful for you:


              When JBoss deploys an EJB jar file, the DOCTYPE of the ejb jar.xml deployment descriptor is used to determine the version of the EJB jar. If the public identifier of the DOCTYPE is " //Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN", JBoss will use the JBossCMP persistence engine, otherwise the old JAWS CMP 1.1 persistence engine will be used.


              • 4. Re: Can't get jbosscmp-jdbc to be used instead of jaws
                lithous2 Newbie

                Upgrading my CMP version in the ejb-jar.xml was necessary. Not sure if that was all. I changed the CMP version and tried to deploy but it still appeared not to read in the jbosscmp-jdbc. Then I cleaned house on all the files to make sure all the CMP 2.0 necessary tags were there and changed my finder method declarations to query tags, etc. Deleted old files to make sure all would be fresh and then I got past that - the jbosscmp-jdbc.xml appears to be read in now.

                Now my problem is with bcel. I have looked at the solutions on this forum and they don't seem to help me get past the bcel problem. I started another topic because it looks like different symptoms of the bcel problem. Though, I could be wrong.

                Thanks for steering me in the right direction for CMP 2.x!