2 Replies Latest reply on Jan 10, 2005 11:48 PM by Kobye

    how can I add mysql jdbc driver to ejb?

    Ramazan Pekin Newbie

      it is giving this error:

      "java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.Driver"

      How can I add myqsl jdbc driver to my ejb project? I am using myeclipse.

        • 1. Re: how can I add mysql jdbc driver to ejb?
          Hari Velappan Newbie

          Please add the datasouce (xml) file in the deploy directory of your server.
          <?xml version="1.0" encoding="UTF-8" ?>

          This is a sample xml file for mysql
          - <!-- =====================================================================
          -->
          - <!--
          -->
          - <!-- JBoss Server Configuration
          -->
          - <!--
          -->
          - <!-- =====================================================================
          -->
          - <!-- ====================================================================
          -->
          - <!-- Datasource config for MySQL using 2.0.11 driver
          -->
          - <!-- ====================================================================
          -->
          -
          - <local-tx-datasource>
          <jndi-name>jdbc/mysql</jndi-name>
          <connection-url>jdbc:mysql://localhost:3306/mysql</connection-url>
          <driver-class>com.mysql.jdbc.Driver</driver-class>
          <user-name>root</user-name>

          </local-tx-datasource>



          • 2. Re: how can I add mysql jdbc driver to ejb?
            Kobye Novice

            you can put the mysql-driver at /jboss/server/default/lib.
            Or put it /jboss/lib
            .