3 Replies Latest reply on Jul 21, 2002 11:27 PM by Raymond Wee

    mysql datasource in JBoss3.0.0 ?

    Farooq Newbie

      Hi guys!

      Can anyone tell how to configure mysql database on JBoss3.0.0. It's hell of a differenvce between 2.4.4. and 3.0.0.
      Thanks in advance!

      Thanks,
      Farooq Hameed

        • 1. Re: mysql datasource in JBoss3.0.0 ?
          Tung Dang Novice

          You need a serveice.xml file for mysql. You can download from this site:

          http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/example-config/
          There's one called mysql-service.xml.

          You need to change some properties in the file and then copy it into %JBOSS_INST%\server\default\deploy. Be sure that you have a jdbc driver for mysql. The actual jdbc driver is under http://www.mysql.com. Copy this jdbc driver into JBOSS_INST%\server\default\lib.

          I hope it will help.

          Enjoy

          Regards.

          • 2. Re: mysql datasource in JBoss3.0.0 ?
            Raymond Wee Newbie

            Hi!

            I had more or less the same problem. I already copied the mysql jar file into the server\default\lib folder and the mysql-service.xml file is already in the server\default\deploy directory. I was actually trying to follow the example made by Tim Chartrand in http://iris.cs.byu.edu/tim/462/tutorial/tutorial.html

            However upon running "ant client" I had a class not found error on the Logger class. how do I fix this?

            Here is the contents of my CLASSPATH:

            c:\tomcat\jakarta-tomcat-4.0.3\common\lib\servlet.jar;c:\tomcat\jboss-3.0.0\server\default\lib\jboss-j2ee.jar;c:\tomcat\jboss-3.0.0\server\default\lib\ejb.jar;c:\tomcat\jboss-3.0.0\client;c:\tomcat\jboss-3.0.0\server\default\lib\postgresql.jar;c:\tomcat\jakarta-tomcat-4.0.3\common\lib\jdbc2_0-stdext.jar

            And here is the contents of my build.xml file:

            <?xml version="1.0" encoding="UTF-8" ?>
            <!-- An Ant build file for the Realtor EJBs -->


            <!--Vars-->








            <!--Contract-->






            <!--Client-->


            <!--XML Files-->







            <!--Contract-->






            <!--Client-->







            <!--Contract-->





























            The deployment was ok. I even saw the creation of the sample database, its the client that didn't work. I hope you can help. Thanks in advance!

            Raymond

            • 3. Re: mysql datasource in JBoss3.0.0 ?
              Raymond Wee Newbie

              Hi!

              I had more or less the same problem. I was trying to try out a sample of Mr. Tim Chartrand in http://iris.cs.byu.edu/tim/462/tutorial/tutorial.html

              I already copied mysql-service.xml to %JBOSS_DIST%\server\default\deploy and mm.mysql-2.0.14-bin.jar to %JBOSS_DIST%\server\default\lib (I'm not sure if my jar file for mysql is correct). At any rate, I was able to deploy the jar file correctly, however, when I run the sample client application (ant client) I got a class definition not found for org/jboss/logging/Logger.

              The errors I got also made mention to java.lang.Class.forName, is there any relation between the logger error and the forName error (I guess this is database error).

              Here are the contents of my classpath:

              c:\tomcat\jakarta-tomcat-4.0.3\common\lib\servlet.jar;c:\tomcat\jboss-3.0.0\server\default\lib\jboss-j2ee.jar;c:\tomcat\jboss-3.0.0\server\default\lib\ejb.jar;c:\tomcat\jboss-3.0.0\client;c:\tomcat\jakarta-tomcat-4.0.3\common\lib\jdbc2_0-stdext.jar

              Content of my build.xml file:

              <?xml version="1.0" encoding="UTF-8" ?>
              <!-- An Ant build file for the Realtor EJBs -->


              <!--Vars-->








              <!--Contract-->






              <!--Client-->


              <!--XML Files-->







              <!--Contract-->






              <!--Client-->







              <!--Contract-->





























              Thanks in advance!

              Raymond

              P.S. I'm not sure if I was able to successfully post a message similar to this one. That is why im re-posting it.