Thread & JDBC

Thread & JDBC

Post by Ji » Sun, 07 Apr 2002 03:51:13



Dear All,

I have problem to get a connection to the database in a thread. I
tried:

    connection con = DriverManager.getConnection(url, user, passwd);
and

    Driver driver = DriverManager.getDriver(url);
    connection con=driver.connect(url, property)

Both of them do not work(but DriverManager.getDriver()works fine), I
got the exception message is: No client specified.

Please help me! Thanks!!!!

Jin

 
 
 

Thread & JDBC

Post by Robert Klemm » Tue, 09 Apr 2002 18:41:51


this does not sound like a thread problem.  look into your
driver's documentation, maybe you forgot a parameter / property.

        robert

Jin schrieb:

Quote:

> Dear All,

> I have problem to get a connection to the database in a thread. I
> tried:

>     connection con = DriverManager.getConnection(url, user, passwd);
> and

>     Driver driver = DriverManager.getDriver(url);
>     connection con=driver.connect(url, property)

> Both of them do not work(but DriverManager.getDriver()works fine), I
> got the exception message is: No client specified.

> Please help me! Thanks!!!!

> Jin

--
Robert Klemme
software engineer
--------------------------------------------------------------------------------
myview technologies GmbH & Co. KG
Lindberghring 1 ~ 33142 Bren ~ Germany
Fon: +49-2955-7433-20 Fax: +49-2955-7433-99
--------------------------------------------------------------------------------
The information transmitted is only intended for the person or
entity to which
it is adressed. It may contain confidential and/or privileged
material. Any
review, forwarding, distribution or any other action related to
this information
by persons or entities other  than the intended addressee is
prohibited. If you
receive this by mistake, please contact the addresser and delete
the material
from any computer.

 
 
 

Thread & JDBC

Post by Ji » Tue, 09 Apr 2002 22:38:17


Thanks, Robert! But the connection works perfectly without thread. I
don't understand ...

> this does not sound like a thread problem.  look into your
> driver's documentation, maybe you forgot a parameter / property.

>    robert

> Jin schrieb:

> > Dear All,

> > I have problem to get a connection to the database in a thread. I
> > tried:

> >     connection con = DriverManager.getConnection(url, user, passwd);
> > and

> >     Driver driver = DriverManager.getDriver(url);
> >     connection con=driver.connect(url, property)

> > Both of them do not work(but DriverManager.getDriver()works fine), I
> > got the exception message is: No client specified.

> > Please help me! Thanks!!!!

> > Jin

> --

> Robert Klemme
> software engineer
> -------------------------------------------------------------------------
> -------
> myview technologies GmbH & Co. KG
> Lindberghring 1 ~ 33142 B?en ~ Germany
> Fon: +49-2955-7433-20 Fax: +49-2955-7433-99
> -------------------------------------------------------------------------
> -------
> The information transmitted is only intended for the person or
> entity to which
> it is adressed. It may contain confidential and/or privileged
> material. Any
> review, forwarding, distribution or any other action related to
> this information
> by persons or entities other  than the intended addressee is
> prohibited. If you
> receive this by mistake, please contact the addresser and delete
> the material
> from any computer.

 
 
 

Thread & JDBC

Post by Robert Klemm » Wed, 10 Apr 2002 16:10:18


hm, well...

then maybe the driver stores thread specific data behind the
scenes.  wouldn't be too good.  did you proper synchronized usage
of the connection?

        robert

Jin schrieb:

> Thanks, Robert! But the connection works perfectly without thread. I
> don't understand ...


> > this does not sound like a thread problem.  look into your
> > driver's documentation, maybe you forgot a parameter / property.

> >       robert

> > Jin schrieb:

> > > Dear All,

> > > I have problem to get a connection to the database in a thread. I
> > > tried:

> > >     connection con = DriverManager.getConnection(url, user, passwd);
> > > and

> > >     Driver driver = DriverManager.getDriver(url);
> > >     connection con=driver.connect(url, property)

> > > Both of them do not work(but DriverManager.getDriver()works fine), I
> > > got the exception message is: No client specified.

> > > Please help me! Thanks!!!!

> > > Jin

> > --

> > Robert Klemme
> > software engineer
> > -------------------------------------------------------------------------
> > -------
> > myview technologies GmbH & Co. KG
> > Lindberghring 1 ~ 33142 B?en ~ Germany
> > Fon: +49-2955-7433-20 Fax: +49-2955-7433-99
> > -------------------------------------------------------------------------
> > -------
> > The information transmitted is only intended for the person or
> > entity to which
> > it is adressed. It may contain confidential and/or privileged
> > material. Any
> > review, forwarding, distribution or any other action related to
> > this information
> > by persons or entities other  than the intended addressee is
> > prohibited. If you
> > receive this by mistake, please contact the addresser and delete
> > the material
> > from any computer.

--
Robert Klemme
software engineer
--------------------------------------------------------------------------------
myview technologies GmbH & Co. KG
Lindberghring 1 ~ 33142 Bren ~ Germany
Fon: +49-2955-7433-20 Fax: +49-2955-7433-99
--------------------------------------------------------------------------------
The information transmitted is only intended for the person or
entity to which
it is adressed. It may contain confidential and/or privileged
material. Any
review, forwarding, distribution or any other action related to
this information
by persons or entities other  than the intended addressee is
prohibited. If you
receive this by mistake, please contact the addresser and delete
the material
from any computer.
 
 
 

1. JDBC & native threads

Hello !
I am working on a java application which works with native threads , and
that's because we are working with DCE middle ware
which we need.
On the other hand we are trying to connect to informix database as well
using  informix JDBC driver.
For unknown reasons the  JDBC Driver doesn't work with native threads.
When trying to connect the DB I get the following message :
X08004:-908:Client unable to establish connection.
Does anyone has a suggestion ?

limor.

2. FAIL TO OPEN ODBC DRIVER IN WIN98

3. JDBC & servlet threads

4. Get user information (OWAS 3)

5. Common Functions - threaded & non-threaded

6. Muse Prime is looking for a Sr. Oracle DBA

7. DEMO1.ec && threads HELP URGENT

8. Transactions

9. Is JDBC 2.0 thread-safe?

10. INFORMIX CRASH on java-jdbc-threads-aplication execution

11. Thread Safety of MS JDBC-ODBC Bridge

12. JDBC program (threaded) crashes when I try to exit

13. thread support in Oracle 7 jdbc thin driver