Meanwhile I found out what the reason for my NullPointerException was and I
can reproduce it: The Oracle TNS listener simply wasn't running (due to a
newly introduced bug in Oracle 8.1.7 that brakes the startup procedure on
some installations) and when I tried to connect via a simple test program
outside of EJB I got a
java.sql.SQLException: E/A-Exception: The Network Adapter could not
establish the connection.
It'd ideal if all exceptions that occur during the initialization of any
JMX module would just print their stack trace to the console. That would
make error tracking much easier. Or is there a log where the error messages
go and I just didn't find it?
Regards,
Alexander Jerusalem
At 06:49 01.04.01, Guy Rouillier wrote:
>Well, thanks to others on this list, I've been able to look in the code.
>Here is where it is failing:
>
> public Connection getConnection() throws java.sql.SQLException {
> if(!initialized) initialize();
> return ((XAConnection)pool.getObject()).getConnection();
> }
>
>Unfortunately, many questions are unanswered. Could be either pool is null
>or getObject() returns null. I've been trying to reproduce this without any
>luck. I tried (1) taking out the Oracle driver, (2) giving the pool mbean a
>bogus userid or password, and (3) giving the pool mbean a bogus database
>name. In all cases, jboss hung trying to start the pool, which is obviously
>not good, but I couldn't get a null pointer exception.
>
>----- Original Message -----
>From: "Alexander Jerusalem" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Friday, March 30, 2001 5:14 PM
>Subject: Re: [JBoss-user] Oracle database pool hangs on 2.1
>
>
> > Hi,
> >
> > I'm trying to configure my Oracle connection pool on 2.1 and found this
> > message. I'm doing exactly as suggested in this posting but still get a
> > NullPointerException at jboss startup:
> > ...
> > [OracleDB] XA Connection pool OracleDB bound to java:/OracleDB
> > [OracleDB] Stopped
> > [OracleDB] java.lang.NullPointerException
> > [OracleDB] at
> >
>org.opentools.minerva.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSourc
>e.java:165)
> > ...
> >
> > Does this mean that it doesn't find my driver class or that it has some
> > problem with making the actual connection or something completely else?
> >
> > Regards,
> > Alexander Jerusalem
> >
> >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED]]On Behalf Of Guy
>Rouillier
> > > > Sent: Tuesday, March 20, 2001 7:56 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [JBoss-user] Oracle database pool hangs on 2.1
> > > >
> > > >
> > > > I followed other suggestions on this mailing list and got it to work.
> > >Here
> > > > are my entries from jboss.jcml. The first is an addition to an
>existing
> > > > entry to add the Oracle driver, while the second is a new one for the
> > >pooled
> > > > connection to Oracle (adjust entries to match your database - "userid"
>and
> > > > "password" should not be these literals, but the actual userid and
> > > > password.)
> > > >
> > > > <!-- JDBC -->
> > > > <mbean code="org.jboss.jdbc.JdbcProvider"
> > > > name="DefaultDomain:service=JdbcProvider">
> > > > <attribute
> > > >
> >
> >name="Drivers">oracle.jdbc.driver.OracleDriver,org.hsql.jdbcDriver,org.enhy
>d
> > > > ra.instantdb.jdbc.idbDriver</attribute>
> > > > </mbean>
> > > >
> > > > <mbean code="org.jboss.jdbc.XADataSourceLoader"
> > > > name="DefaultDomain:service=XADataSource,name=OracleDB">
> > > > <attribute name="PoolName">OracleDB</attribute>
> > > > <attribute
> > > >
> >
> >name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceIm
>p
> > > > l</attribute>
> > > > <attribute
> > > > name="URL">jdbc:oracle:thin:@localhost:1521:homedb</attribute>
> > > > <attribute name="JDBCUser">userid</attribute>
> > > > <attribute name="Password">password</attribute>
> > > > </mbean>
> > > >
> > > > Make sure classes12.zip is in your classpath. When you start jboss
>you
> > > > should see the following (amongst everything else). The first group
>are
> > >the
> > > > drivers loading, while the second group is the Oracle pooled
>connection
> > > > being set up.
> > > >
> > > > [JDBC provider] Initializing
> > > > [JDBC provider] Loaded JDBC-driver:oracle.jdbc.driver.OracleDriver
> > > > [JDBC provider] Loaded JDBC-driver:org.hsql.jdbcDriver
> > > > [JDBC provider] Loaded
>JDBC-driver:org.enhydra.instantdb.jdbc.idbDriver
> > > > [JDBC provider] Initialized
> > > > [Hypersonic] Initializing
> > > > [Hypersonic] Initialized
> > > > [InstantDB] Initializing
> > > > [InstantDB] Initialized
> > > > [DefaultDS] Initializing
> > > > [DefaultDS] Initialized
> > > > [OracleDB] Initializing
> > > > [OracleDB] Initialized
> > > >
> > > > [OracleDB] Starting
> > > > [OracleDB] XA Connection pool OracleDB bound to java:/OracleDB
> > > > [OracleDB] Started
> > > >
> > > > What are you seeing or not seeing?
> > > > ----- Original Message -----
> > > > From: Bolt, Dave
> > > > To: [EMAIL PROTECTED]
> > > > Sent: Monday, March 19, 2001 7:30 PM
> > > > Subject: RE: [JBoss-user] Oracle database pool hangs on 2.1
> > > >
> > > >
> > > > I have the drivers in my jboss.jcml file and I get the message that
>the
> > > > driver was loaded. But it still hangs. I can connect to the Oracle
>server
> > > > from the same machine that I'm running JBoss from (of course I'm using
>OCI
> > > > vs. a thin driver) as well.
> > > > Any other ideas on getting a 2.1 connection pool unstuck?
> > > > Dave
> > > > -----Original Message-----
> > > > From: Bill Burke [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, March 19, 2001 7:05 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [JBoss-user] Oracle database pool hangs on 2.1
> > > >
> > > >
> > > > Make sure you have the oracle drivers in the JdbcProvider section in
> > > > jboss.jcml. Also make sure that you have the jdbc jar file in your
> > > > ClassPathExtension defined in jboss.conf. Look in ../log/server.log
>for
> > > > the message "2001-03-19 02:46:49 [JDBC provider] Loaded
> > > > JDBC-driver:oracle.jdbc.driver.OracleDriver".
> > > > Bill
> > > > Bolt, Dave wrote:
> > > > > I'm trying to get the 2.1 binary to run with Tomcat and Oracle. The
> > > > > server boots fine until it tries to start the Oracle connection
>pool.
> > > > > Is there any documentation, specific to JBoss 2.1, that describes
>how
> > > > > to configure an Oracle connection pool. Most of the stuff on the web
> > > > > site is for 2.0.
> > > > >
> > > > > Dave Bolt
> > > > > There is always plenty of bandwidth, just none for you.
> > > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > JBoss-user mailing list
> > > > [EMAIL PROTECTED]
> > > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> > > >
> > > >
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
>
>
>_______________________________________________
>JBoss-user mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user