You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dudley Irish <di...@arsmagna.com> on 2000/07/15 18:44:52 UTC

Error with JDBC connecting from servlet

Hello all,

I am new to Tomcat and, in fact, am only involved as sysadmin and DBA
so I don't even know Java that well and, to top it all off, I am
having a very strange problem.

The root error is that the JDBC driver reports that the network device
cannot connect.  (I would report the text of the error, but I can't
get to the machine from here.)

Here is what makes the problem strange.  This is the test box that I
have just set up.  The development box works.  The same application or
so the developers assure me.  More over, the database works fine.  Any
way that we can think of to connect to the database, works.  The
sample app that comes with the database (Oracle8i R2) works.  It can
connect to the database using the same JDBC drivers that the
application is using.  And now the really wierd fact, when we redirect
the application to use the development instance of the database rather
than the test instance, it works.  I am really stumped.

So this is basically a fishing expedition.  I have run out of things
to check.  Today, I am going to try and find the critical
configuration difference between the two systems, but I don't even
know where to look.  If I don't have any luck, I will at least be in a
position to give a detailed description of the configuration.  They
are supposed to both be running Redhat 6.1, the latest Apache rpm for
6.1, the latest stable jakarta-tomcat, jdk-1.2.2, the latest JDBC
thin drivers from Oracle, and Oracle8iR2.

If you have any ideas as to what might be the issue; anything that I
can check, please email.

Re: Error with JDBC connecting from servlet

Posted by Wolfgang Egger <Eg...@synemedia.de>.
Servus,

----- Original Message ----- > Here is what makes the problem strange.  This
is the test box that I
> have just set up.  The development box works.  The same application or
> so the developers assure me.  More over, the database works fine.

we have similar strange problem here.
If we tried to connect the database (mySQL) from the same machine tomcat is
runing on, everything goes well. But if we have run tomcat and the same
webapp (same classes, same jsps and so on) on an other machine, we get an
IOException.
More strange was, that if we execute the same code, that was failing in the
doGet()-method of our servlet, from within a standalone java app, it runs
very well from a diffrent machine too.
After some test we have experienced, that the DBConnectionBroker we use is
causing the problem. We don't have the source of this class, but if we
remove that DBConnectionBroker an use only the classicaly
Class.ForName("Driver"); connection = DriverManger.getConnection();
everythinbg works erverytime from ervery machine .....

Wolfgang



RE: Error with JDBC connecting from servlet

Posted by "Rob S." <rs...@home.com>.
If you're getting a stack trace, that could be pretty helpful in diagnosing
the problem.

All I can think of is assure that you don't have an old version of the JDBC
drivers in your WEB-APP/lib directory, or at some place in your Tomcat
CLASSPATH.

- r

> -----Original Message-----
> From: Dudley Irish [mailto:dirish@arsmagna.com]
> Sent: July 15, 2000 9:45 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Error with JDBC connecting from servlet
>
>
> Hello all,
>
> I am new to Tomcat and, in fact, am only involved as sysadmin and DBA
> so I don't even know Java that well and, to top it all off, I am
> having a very strange problem.
>
> The root error is that the JDBC driver reports that the network device
> cannot connect.  (I would report the text of the error, but I can't
> get to the machine from here.)
>
> Here is what makes the problem strange.  This is the test box that I
> have just set up.  The development box works.  The same application or
> so the developers assure me.  More over, the database works fine.  Any
> way that we can think of to connect to the database, works.  The
> sample app that comes with the database (Oracle8i R2) works.  It can
> connect to the database using the same JDBC drivers that the
> application is using.  And now the really wierd fact, when we redirect
> the application to use the development instance of the database rather
> than the test instance, it works.  I am really stumped.
>
> So this is basically a fishing expedition.  I have run out of things
> to check.  Today, I am going to try and find the critical
> configuration difference between the two systems, but I don't even
> know where to look.  If I don't have any luck, I will at least be in a
> position to give a detailed description of the configuration.  They
> are supposed to both be running Redhat 6.1, the latest Apache rpm for
> 6.1, the latest stable jakarta-tomcat, jdk-1.2.2, the latest JDBC
> thin drivers from Oracle, and Oracle8iR2.
>
> If you have any ideas as to what might be the issue; anything that I
> can check, please email.
>
> From a dark and confused place,
>
> Dudley Irish
> dirish@arsmagna.com
>