1 Reply Latest reply on Apr 11, 2002 1:41 PM by Thomas Lauerbach

    mySQL JBoss3: cannot disable AUTO_COMMIT

    Thomas Lauerbach Newbie

      Hi,
      It seems just like a small problem.
      - I installed the jdbc driver (mm.mysql.jdbc1.2) into the lib directory of jboss.
      - dropped the mysql-service.xml to the deploy directory

      deployment worked fine.

      After starting my test ejb i get the error:

      12:05:59,076 ERROR [mySQL] Unable to create ManagedConnection:
      javax.resource.ResourceException: Unable to create DB connection for url: jdbc:m
      ysql://localhost/jboss, user: , exception: java.sql.SQLException: Cannot disable
      AUTO_COMMIT
      at org.jboss.resource.adapter.jdbc.local.JDBCManagedConnectionFactory.cr
      eateManagedConnection(JDBCManagedConnectionFactory.java:392)
      at org.jboss.resource.connectionmanager.ManagedConnectionPoolFactory.cre
      ateObject(ManagedConnectionPoolFactory.java:97)
      at org.jboss.pool.ObjectPool.createNewObject(ObjectPool.java:1013)
      at org.jboss.pool.ObjectPool.getObject(ObjectPool.java:672)
      at org.jboss.resource.connectionmanager.SharedLocalConnectionManager.all



      Here is the small sample code:

      Context ctx = new InitialContext();
      DataSource ds= (DataSource)ctx.lookup("java:/mySQL");
      Connection con = ds.getConnection("thomas", "thom4j");
      Statement sql= con.createStatement();
      ResultSet rs= sql.executeQuery("select * from tltmp");
      while (rs.next()) {
      System.out.println(" " rs.getString(1) "" rs.getString(2));
      }
      rs.close();
      sql.close();
      con.close();