6 Replies Latest reply on Oct 4, 2001 1:36 AM by konrad

    mbean for db pooling with postgres causing java.lang.NullPoi

    konrad Newbie

      i'm trying to set up jboss to use postgres as my db. after making the appropriate settings in jboss.jcml (see below), i get the below error:

      [XADataSourceLoader] Starting
      [PostgresDS] XA Connection pool PostgresDS bound to java:/PostgresDS
      [XADataSourceLoader] Stopped
      java.lang.NullPointerException
      at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:178)
      at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:407)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:836)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:81)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:210)
      at org.jboss.Main$1.run(Main.java:116)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:112)

      i have tested my db connection to postgres from a stand-alone app and it works fine.

      here are my settings:

      environment
      ------------
      os: windows2000 with cygwin1.3.3
      postgres: 7.1.3 (with jdbc2.0-compatible jdbc driver)
      jboss: 2.4.1
      java: 1.3.1


      jboss.jcml
      ---------

      org.postgresql.Driver,org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver




      PostgresDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      jdbc:postgresql://localhost:5432/mydb
      konrad



      for the url, i've also tried the below with no success:
      jdbc:postgresql:mydb
      jdbc:postgresql://localhost/mydb

      if i set the "Blocking" element to "true", jboss just waits...

      i've read through the other posts, but still haven't been able to come up with a solution.

      i'd appreciate it if you could also email your reply. (btw, is there a regular mailing list version of the forums, or do we need to always check back here for new posts/replies?)

      thanks...