Re: Applet problem

Lists: pgsql-jdbc
From: cedric(dot)picard(at)esial(dot)uhp-nancy(dot)fr
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Applet problem
Date: 2004-06-30 12:49:47
Message-ID: 1088599787.40e2b6eb13e58@venus.esial.uhp-nancy.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hi

I have some problem with my applet

in fact when i use jdbc for postgresql with a basic java program it perfectly
works.
when i try to connect from the server to the server it works. When i try from an
other computer to the server it works.
but when i try to use it from my applet, it says it cant load the drivers.I
tried from the server and from another computer , it both does'nt work.

for the sources, i use exemples from postgresql.org

if you have any solution, it will be great

thanks

Cédric.Picard


From: Holger Klawitter <lists(at)klawitter(dot)de>
To: cedric(dot)picard(at)esial(dot)uhp-nancy(dot)fr, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Applet problem
Date: 2004-06-30 14:01:42
Message-ID: 200406301601.48753.lists@klawitter.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

> in fact when i use jdbc for postgresql with a basic java program it
> perfectly works.
> when i try to connect from the server to the server it works. When i try
> from an other computer to the server it works.
> but when i try to use it from my applet, it says it cant load the drivers.I
> tried from the server and from another computer , it both does'nt work.

The classpath of an applet is very restricted and specifically different
from standalone applications.

You have to bring the postgresql code into the classpath. The canonical way
would be to create one jar-file containing your applet and all needed classes
from postgresql.jar, but there are probly better ways I don't know of :-)

Mit freundlichem Gruß / With kind regards
Holger Klawitter
- --
lists <at> klawitter <dot> de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFA4sfM1Xdt0HKSwgYRAlpsAJ9VESrW7gAYZOFqC/7YNxoFYG24OwCfaa1g
+pns4GKpgSrbx9N2HPUvQ9o=
=isx6
-----END PGP SIGNATURE-----


From: Felipe <pipojmr(at)yahoo(dot)com(dot)mx>
To: cedric(dot)picard(at)esial(dot)uhp-nancy(dot)fr
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Applet problem
Date: 2004-06-30 20:38:13
Message-ID: 20040630203813.16865.qmail@web50810.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

if your problem is that your browser cannot find "org.postgresql.Driver" you can try this: unpack the postgresql.jar file in the directory in where you have your applet, for my this works

I hope this is helpfull to yuo

cedric(dot)picard(at)esial(dot)uhp-nancy(dot)fr wrote:
Hi

I have some problem with my applet

in fact when i use jdbc for postgresql with a basic java program it perfectly
works.
when i try to connect from the server to the server it works. When i try from an
other computer to the server it works.
but when i try to use it from my applet, it says it cant load the drivers.I
tried from the server and from another computer , it both does'nt work.

for the sources, i use exemples from postgresql.org

if you have any solution, it will be great

thanks

Cédric.Picard

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

---------------------------------
Do You Yahoo!?
Yahoo! Net: La mejor conexión a internet y 25MB extra a tu correo por $100 al mes.