2 Replies Latest reply on Jan 8, 2002 6:42 AM by Punit

    Setting up more than one Datasources

    Punit Newbie

      Hi All,

      Can anybody help me in configuring JBoss.jcml for making JBoss able to connect to 2 Databases viz. Oracle and SQL Server.
      When I have only 1 Datasource mbean it runs fine

      oracle.jdbc.driver.OracleDriver
      com.ashna.jturbo.driver.DataSource



      SqlServerDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl

      jdbc:JTurbo://krishna:1433/integraLine/sql170=true
      cms
      bwv
      2


      I add this mbean tag also in the jboss.jcml file to access Oracle :

      oracle.jdbc.driver.OracleDriver



      DefaultDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl

      jdbc:oracle:thin:@arjun-b876qvihe:1521:ewebdb
      rahul
      rahul
      2


      Following exception is thrown :
      [XADataSourceLoader] Started
      [XADataSourceLoader] Starting
      [DefaultDS] XA Connection pool DefaultDS bound to java:/DefaultDS
      [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)
      [Configuration] java.lang.NullPointerException
      [Configuration] at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:178)
      [Configuration] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:407)
      [Configuration] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107)
      [Configuration] at java.lang.reflect.Method.invoke(Native Method)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [Configuration] at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:836)
      [Configuration] at $Proxy0.start(Unknown Source)
      [Configuration] at org.jboss.util.ServiceControl.start(ServiceControl.java:81)
      [Configuration] at java.lang.reflect.Method.invoke(Native Method)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [Configuration] at org.jboss.Main.(Main.java:210)
      [Configuration] at org.jboss.Main$1.run(Main.java:116)
      [Configuration] at java.security.AccessController.doPrivileged(Native Method)
      [Configuration] at org.jboss.Main.main(Main.java:112)
      [ServerDataCollector] Starting
      [ServerDataCollector] JBoss Management Service 'servercollector' bound to servercollector
      [ServerDataCollector] Started