10 Replies Latest reply on Feb 15, 2002 12:04 AM by Tim Batchelor

    error on startup with mySQL as DataSource

    Dan Harfleet Newbie

      Hi,

      I am trying to set up DataSources, in this case to use with CMP, but I may want to use it with BMP in the future.

      I am using the example .jcml entries from the manual at:

      http://www.jboss.org/online-manual/HTML/ch04s11.html

      I am using:
      jboss 2.2.2 with tomcat 3.2.2 (bundled)
      mySQL 3.23.30 for windows
      mysql_uncomp.jar is in jboss/lib/ext
      os = windows me 4.90.3000 (unfortunately ;-) )

      I have successfully used a jdbc connection from a standalone client and from a servlet in Tomcat.
      I am now getting an error when starting jboss. I read in the forum that someone using linux had a proble such that they needed to include the domain in the database url. Maybe this is why I have a problem ??
      The relevant parts of my server.log file are:

      [JDBC provider] Initializing
      [JDBC provider] Loaded JDBC-driver:org.gjt.mm.mysql.Driver
      [JDBC provider] Loaded JDBC-driver:org.hsql.jdbcDriver
      [JDBC provider] Loaded JDBC-driver:org.enhydra.instantdb.jdbc.idbDriver
      [JDBC provider] Initialized
      .
      .
      .
      [InstantDB] Started
      [DefaultDS] Starting
      [DefaultDS] XA Connection pool DefaultDS bound to java:/DefaultDS
      [DefaultDS] Started
      [MYSQLDS] Starting
      [MYSQLDS] XA Connection pool MYSQLDS bound to java:/MYSQLDS
      [MYSQLDS] Stopped
      [MYSQLDS] java.lang.NullPointerException
      [MYSQLDS] at org.opentools.minerva.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:165)
      [MYSQLDS] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:330)
      [MYSQLDS] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:93)
      [MYSQLDS] at java.lang.reflect.Method.invoke(Native Method)
      [MYSQLDS] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [MYSQLDS] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [MYSQLDS] at org.jboss.util.ServiceControl.start(ServiceControl.java:97)
      [MYSQLDS] at java.lang.reflect.Method.invoke(Native Method)
      [MYSQLDS] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [MYSQLDS] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [MYSQLDS] at org.jboss.Main.(Main.java:217)
      [MYSQLDS] at org.jboss.Main$1.run(Main.java:121)
      [MYSQLDS] at java.security.AccessController.doPrivileged(Native Method)
      [MYSQLDS] at org.jboss.Main.main(Main.java:117)
      [Service Control] Could not start DefaultDomain:service=XADataSource,name=MYSQLDB
      [Service Control] java.lang.NullPointerException
      [Service Control] at org.opentools.minerva.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:165)
      [Service Control] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:330)
      [Service Control] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:93)
      [Service Control] at java.lang.reflect.Method.invoke(Native Method)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [Service Control] at org.jboss.util.ServiceControl.start(ServiceControl.java:97)
      [Service Control] at java.lang.reflect.Method.invoke(Native Method)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [Service Control] at org.jboss.Main.(Main.java:217)
      [Service Control] at org.jboss.Main$1.run(Main.java:121)
      [Service Control] at java.security.AccessController.doPrivileged(Native Method)
      [Service Control] at org.jboss.Main.main(Main.java:117)
      [Container factory] Starting




      My jcml file is like this:
      (I have also tried using some extra attributes as mentioned on a previous post; this has not helped)

      <!-- JDBC -->

      org.gjt.mm.mysql.Driver,org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver


      [hypersonic edited out]
      [InstantDB edited out]
      [Default DS edited out]

      <!-- string used with jdbc standalone test... jdbc:mysql://localhost/test2?user=auth=auth -->

      <!-- this is as per the manual

      org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
      mySQLDS
      jdbc:mysql://localhost/test2
      auth
      auth

      -->
      <!-- try using extra attributes -->

      MYSQLDS
      org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl

      jdbc:mysql://localhost/test2
      1200000
      auth
      10
      auth
      false
      false
      false
      false
      120000
      1800000
      false
      false
      1.0
      0


      thanks for any future help,

      dan