pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Program accessing database via servlet
4+ messages / 4 participants
[nested] [flat]

* Program accessing database via servlet
@ 1999-10-01 09:56  zhang-lan@usa.net
  0 siblings, 3 replies; 4+ messages in thread

From: zhang-lan@usa.net @ 1999-10-01 09:56 UTC (permalink / raw)
  To: pgsql-interfaces

Hi, all.

I am having a problem when accessing the postgresql database via servlet. I
set up a java web server (Win 95), and my servlet program need to access the
remote postgresql database which is not on my server. When the program
executed
    DriverManager.getConnection(dburl, user, passwd),
it shows the error: java.lang.IllegalArgumentException: Argument # > Arg
length

But the similar program which I don't use servlet runs ok, it can access the
remote database very well. I don't know why. And if I change the database to
the MS Access database which is on my machine, the servlet program also runs
fine.

Anyone can help?

Thanks.

Lan Zhang


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [INTERFACES] Program accessing database via servlet
@ 1999-10-01 15:35  Jens Glaser <jens@helena.jens.de>
  parent: zhang-lan@usa.net
  2 siblings, 0 replies; 4+ messages in thread

From: Jens Glaser @ 1999-10-01 15:35 UTC (permalink / raw)
  To: zhang-lan@usa.net; +Cc: pgsql-interfaces

Hi,

On 1 Oct 1999 zhang-lan@usa.net wrote:
> I am having a problem when accessing the postgresql database via servlet. I
>[..]
>     DriverManager.getConnection(dburl, user, passwd),
> it shows the error: java.lang.IllegalArgumentException: Argument # > Arg
> length

This might actually be a misleading error message generated by an old JDBC
version. Try the newest JDBC driver first (from the CVS).

It *should* return you the correct error message then which I guess
is something like "wrong username/password" or so in your case!

Kind regards,

-- 
Jens Glaser     Am Holderstrauch 13, 36041 Fulda, 0661/9429507    jens@jens.de




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [INTERFACES] Program accessing database via servlet
@ 1999-10-01 16:57  Anders Svensson <anders@simusoft.dk>
  parent: zhang-lan@usa.net
  2 siblings, 0 replies; 4+ messages in thread

From: Anders Svensson @ 1999-10-01 16:57 UTC (permalink / raw)
  To: zhang-lan@usa.net; pgsql-interfaces

I had the samme problem on my system (mac > linux).

Make sure that you, if you load the dburl, usr and password from a file,
removes ANY tailing spaces.

If you get the the same error try to hard-code the dburl,usr and password
into your program (during debuging).



Simu Soft
v/Anders Svensson
Frederikssundsvej 20, 2 th
DK-2400  København NV

e-mail 	: Anders@simusoft.dk
tlf.	: +45 3583 8126




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [INTERFACES] Program accessing database via servlet
@ 1999-10-04 13:21  Richard Morrell <richard@ednet.co.uk>
  parent: zhang-lan@usa.net
  2 siblings, 0 replies; 4+ messages in thread

From: Richard Morrell @ 1999-10-04 13:21 UTC (permalink / raw)
  To: pgsql-interfaces

On 1 Oct 1999 zhang-lan@usa.net wrote:

> I am having a problem when accessing the postgresql database via servlet. I
> set up a java web server (Win 95), and my servlet program need to access the
> remote postgresql database which is not on my server. When the program
> executed
>     DriverManager.getConnection(dburl, user, passwd),
> it shows the error: java.lang.IllegalArgumentException: Argument # > Arg
> length

I got this problem when I used the old 6.5.1 jdbc driver.  Switching to
the new 6.5.2 driver fixed the problem for me.
 
--
Richard Morrell                                           richard@ednet.co.uk
Operations Manager - edNET: InternetWorkingSolutions - http://www.ednet.co.uk








^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~1999-10-04 13:21 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-10-01 09:56 Program accessing database via servlet zhang-lan@usa.net
1999-10-01 15:35 ` Jens Glaser <jens@helena.jens.de>
1999-10-01 16:57 ` Anders Svensson <anders@simusoft.dk>
1999-10-04 13:21 ` Richard Morrell <richard@ednet.co.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox