5 Replies Latest reply on Nov 13, 2001 12:05 PM by Josh Sents

    plzzz Help me out ( Oracle pool problem)

    Atif Umar Newbie

      hi all ,
      pls hepl me out solve this problem i had earlier posted a question on this forum regarding the same problem but didnt get any reply so i am posting again
      my problem is :

      i am setting up an oracle pool FOR Jboss 2.4.0
      I have followed the instruction given on the docs at

      http://jboss.org/documentation/HTML/ch04s09.html

      and the changes that i have made in jboss.jcml are


      oracle.jdbc.driver.OracleDriver



      OracleDB
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      jdbc:oracle:thin:@172.24.6.57:1521:bvdata
      wlcs
      wlcs



      i have lso made the other two changes ie adding classes12.zip in li/ext and adding that line in jboss.properties

      but when i start jboss i get these messages regarding the oraclepool

      [Configuration] Drivers set to oracle.jdbc.driver.OracleDriver in DefaultDomain:service=JdbcProvider
      [Configuration] PoolName set to OracleDB in DefaultDomain:service=XADataSource,name=OracleDB
      [Configuration] DataSourceClass set to org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl in DefaultDomain:service=XADataSource,name=OracleDB
      [Configuration] URL set to jdbc:oracle:thin:@172.24.6.57:1521:bvdata in DefaultDomain:service=XADataSource,name=OracleDB
      [Configuration] JDBCUser set to wlcs in DefaultDomain:service=XADataSource,name=OracleDB
      [Configuration] Password set to wlcs in DefaultDomain:service=XADataSource,name=OracleDB

      and

      [JdbcProvider] Starting
      [JdbcProvider] Started
      [XADataSourceLoader] Starting
      [OracleDB] XA Connection pool OracleDB bound to java:/OracleDB
      [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)

      i am unable to make out anything of this please help me out
      thanks in advance

      Atif




        • 1. Re: plzzz Help me out ( Oracle pool problem)
          Dave Elliot Newbie

          I'm also interesting in the answer... A colleague of mine was getting this exception (NullPointer at XAPoolDataSource.getConnection) and we couldn't figure it out. In the end we replaced her jboss.jcml with mine and the problem resolved, we figured there was a dodgy character somewhere in her xml messing something up but didn't try to investigate further.

          • 2. I'm having the same issue...
            Rich Bolen Newbie

            but what is even stranger is this was working perfectly yesterday but when I came in today and started my JBoss server I started getting the exception. I haven't changed anything in the config!

            Rich

            • 3. Re: I'm having the same issue...
              Jeffrey Newbie


              Is the database started? Look like the db connection can't be established.

              --- Jeffrey

              • 4. Re: plzzz Help me out ( Oracle pool problem)
                Ramki Krishnan Newbie

                I had similar problems on DB2 until I cleared out a few errors:

                (1) Make sure the DB server is up and running
                (2) Test the DB connection by doing a simple DB application like so (check name of DB you are connecting to):

                // your java code here
                import java.sql.*;
                
                public class DB2Appl {
                
                 static {
                 try {
                 Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
                 } catch (Exception e) {
                 System.out.println(e);
                 }
                 }
                
                 public static void main(String argv[]) {
                 Connection con = null;
                
                 // URL is jdbc:db2:dbname
                 String url = "jdbc:db2:test";
                
                 try {
                 if (argv.length == 0) {
                 // connect with default id/password
                 con = DriverManager.getConnection(url);
                 }
                 else if (argv.length == 2) {
                 String userid = argv[0];
                 String passwd = argv[1];
                
                 // connect with user-provided username and password
                 con = DriverManager.getConnection(url, userid, passwd);
                 }
                 else {
                 System.out.println("Usage: java DB2Appl [username password]");
                 System.exit(0);
                 }
                
                 // retrieve data from the database
                 System.out.println("Retrieve some data from the database...");
                 Statement stmt = con.createStatement();
                 ResultSet rs = stmt.executeQuery("select * from tdw_ira_portfolio");
                
                 System.out.println("Received results:");
                ...
                


                (3) Make sure that the jboss.jcml file contains the right db URL; my example for DB2:

                 <!-- ==================================================================== -->
                 <!-- JDBC -->
                 <!-- ==================================================================== -->
                
                <mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
                 <attribute name="Drivers">COM.ibm.db2.jdbc.app.DB2Driver</attribute>
                </mbean>
                
                 <mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=DefaultDS">
                 <attribute name="PoolName">DefaultDS</attribute>
                 <attribute name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl</attribute>
                 <attribute name="Properties"></attribute>
                 <attribute name="URL">jdbc:db2:TEST</attribute>
                 <attribute name="GCMinIdleTime">1200000</attribute>
                 <attribute name="JDBCUser" />
                 <attribute name="MaxSize">10</attribute>
                 <attribute name="Password" />
                 <attribute name="GCEnabled">false</attribute>
                 <attribute name="InvalidateOnError">false</attribute>
                 <attribute name="TimestampUsed">false</attribute>
                 <attribute name="Blocking">true</attribute>
                 <attribute name="GCInterval">120000</attribute>
                 <attribute name="IdleTimeout">1800000</attribute>
                 <attribute name="IdleTimeoutEnabled">false</attribute>
                 <attribute name="LoggingEnabled">false</attribute>
                 <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
                 <attribute name="MinSize">0</attribute>
                 </mbean>
                


                (4) remove references to other databases (Htpersonic, InstantDB, etc) from the above file.

                (5) If the database you are testing against is local use the form indicated above (for DB2).

                Hope this helps.



                • 5. Re: plzzz Help me out ( Oracle pool problem)
                  Josh Sents Newbie

                  Fixed the above Db2 connection Parameters


                  <!-- ==================================================================== -->
                  <!-- JDBC -->
                  <!-- ==================================================================== -->

                  COM.ibm.db2.jdbc.app.DB2Driver


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

                  jdbc:db2:TEST
                  1200000

                  10

                  false
                  false
                  false
                  true
                  120000
                  1800000
                  false
                  false
                  1.0
                  0