Re: Security manager changing the jdbc Connection class? [Viruschecked]

From: "Patric Bechtel" <bechtel(at)ipcon(dot)de>
To: "pgsql-jdbc" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Security manager changing the jdbc Connection class? [Viruschecked]
Date: 2003-01-13 22:42:55
Message-ID: 20030113224335.4977E476520@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

On Mon, 13 Jan 2003 09:46:21 -0800, Barry Lind wrote:

I already know this bug... and fixed it in my patch.
Anyone got an eye onto it?

>The jar file should have a org/postgresql/jdbc2/AbstractJdbc2Connection
>in it. AbstractJdbc3Connection extends AbstractJdbc2Connection so both
>are necessary.

>--Barry

>Rich Cullingford wrote:
>> All,
>> This bizarre behaviour occurs after I compile the jdbc jar from source
>> (/usr/local/java/jdk->j2sdk1.4.1, 'configure' & 'gmake' build a JDBC3
>> edition driver). I placed 'postgresql.jar' in /usr/local/java/lib, which
>> is in CLASSPATH.
>>
>> The server has been set up to receive TCP/IP connections. Now I compile
>> and run basic.java in the 'examples' directory, and (with debug 'on') get:
>>
>> [rculling(at)thriller example]$ java basic jdbc:postgresql:rculling rcu
>> ng debug
>> PostgreSQL basic test v6.3 rev 1
>>
>> DriverManager.initialize: jdbc.drivers = null
>> JDBC DriverManager initialized
>> registerDriver: driver[className=org.postgresql.Driver,org.postgresq
>> 2e08]
>> Connecting to Database URL = jdbc:postgresql:rculling
>> DriverManager.getConnection("jdbc:postgresql:rculling")
>> trying driver[className=org.postgresql.Driver,org.postgresql.Dri
>> Exception in thread "main" java.lang.NoClassDefFoundError: org/postg
>> AbstractJdbc2Connection
>> at java.lang.ClassLoader.defineClass0(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
>> at java.security.SecureClassLoader.defineClass(SecureClassLo
>> 3)
>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:2
>> at java.net.URLClassLoader.access$100(URLClassLoader.java:54
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
>> at java.security.AccessController.doPrivileged(Native Method
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:186
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
>> at java.lang.ClassLoader.defineClass0(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
>> at java.security.SecureClassLoader.defineClass(SecureClassLo
>> 3)
>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:2
>> at java.net.URLClassLoader.access$100(URLClassLoader.java:54
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
>> at java.security.AccessController.doPrivileged(Native Method
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:186
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
>> at java.lang.Class.forName0(Native Method)
>> at java.lang.Class.forName(Class.java:140)
>> at org.postgresql.Driver.connect(Driver.java:121)
>> at java.sql.DriverManager.getConnection(DriverManager.java:5
>> at java.sql.DriverManager.getConnection(DriverManager.java:1
>> at basic.<init>(basic.java:37)
>> at basic.main(basic.java:212)
>>
>> The relevant source line in org.postgresql.Driver.connect says it's
>> attempting a Class.forName("org.postgresql.jdbc3.Jdbc3Connection"), but
>> by the time the error registers, the system seems to be attempting to
>> load "org.postgres.jdbc2.AbstractJdbc2Cnnection." The jar file has an
>> AbstractJdbc3Connection, but not Jdbc2. Is something funny happening in
>> the do.Privileged() calls by the SecurityManager?
>>
>> I'm stumped. Thanks for any help.
>> Rich Cullingford
>>
>>
>>
>>
>>
>> ---------------------------(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)
>>

>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?

>http://archives.postgresql.org

sincerely,

Patric Bechtel
IPCON Informationssysteme

- -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGPsdk version 1.7.1 (C) 1997-1999 Network Associates, Inc. and its affiliated companies.

mQGiBD4hkMERBADNMNrmye5hXtCU35gi5JB1IHkGuvgL/5BYkQpTyDLFA1rcHlUu
+lyCuQnaMBvqKXSbuwDymIOinbR/DFgRt7ZwWhlBZX9JCV2zcNbca2pJ9JFbrZ14
aTve0LWoO3ljZQz1g6dhC14D+a0vN3hDBvaxavgNeVIX5XJRKC02xlWhaQCg/0j0
S8/bNgKsbMSMVfAbeVrwGW0EALBiel6TNkKtO+8v2qMNvwR6AlGFPVgxX6B95xqC
RQlUDMKqd07Kfmub9qK7wX7n/c7ck96aSWsHkd+qXiX5wOrEUuVHUaR+OWQ772Gd
xzeJ1hgqEXNnUqwW8QnDGuKjJ3WwvbfULlyOVI2WnJKBJb9dMheiWFaloTOqJ5LU
y3feA/9i/Pd3QPgBOudu7QDNcWtqGAp4jLPOlzeCYFGZkRI0/yVGkdcZaqn4Ez1x
Aeb2y0ijSqDUJauTgE9RDNI4HZNPK7vFb7aN6WcZ8gNylQOZdS0h/uM1oisyv1YY
Q5I/pvjfT+iEwdMMPQVMh0DY0c4806BmAkFbh9samJaPpm6PYrQhUGF0cmljIEJl
Y2h0ZWwgPGJlY2h0ZWxAaXBjb24uZGU+iQBOBBARAgAOBQI+IZDBBAsDAgECGQEA
CgkQfGgGu8y7ypAN+ACeIbN5gD22P0QpCtufDGlDD1UIsoIAn19UJ5DhTWMwxeZf
KSBtjjVsswiiuQINBD4hkMEQCAD2Qle3CH8IF3KiutapQvMF6PlTETlPtvFuuUs4
INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfUodNQ+PVZX9x2Uk89PY3b
zpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7HAarTW56NoKVyOtQa8L9G
AFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxbLY7288kjwEPwpVsYjY67
VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyEpwpy1obEAxnIByl6ypUM
2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1XpMgs7AAICB/4+9hRIaZs+
MiJABA+QvbnU1N2SfrZ8PyhYk1FOAiLmSOPeT/6UWK7YEY6GiOujXRGpiqlyuAak
8YGDO0J5QURwZU1ao8toEXEpx5iHSo/pgf1m53IQIRaSDf05hzBBBbIjNMXCsjMk
FS2H2uozSNGdeBzTQqQ/tYnyodctbtc+bXaplKlbA85fj0JbbojBLv+S71E6j9fc
e0aqdNl5ZTy547dlZvXY/WgNJHBpmVVobStcOjYpYkF+0E8a9lTSoQHh4SXCjE/2
tf8W3TcPPVUgPeJzQGb2cdGgbC5I4Oaz6vDaAJ68hk3vKauoBcbjiISlUxqvul5M
tgb9kgcGDp9OiQBGBBgRAgAGBQI+IZDBAAoJEHxoBrvMu8qQly4Anjxp+O42ax91
dHIlZI93a3IYqjbZAJwJfDajIDVHHozMu8j5FEyV26WUEg==
=HZnf
- -----END PGP PUBLIC KEY BLOCK-----

PGP Public Key Fingerprint: 2636 F26E F523 7D62 4377 D206 7C68 06BB

-----BEGIN PGP SIGNATURE-----
Version: PGPsdk version 1.7.1 (C) 1997-1999 Network Associates, Inc. and its affiliated companies.

iQA/AwUBPiMy4HxoBrvMu8qQEQK5aQCdEZPaxtxgwaq1O6cPN2WQkQxethIAn0pG
c+7zvTmROktHPr9m5hDhqL2/
=z1TJ
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2003-01-14 01:12:24 Re: Security manager changing the jdbc Connection class? [Viruschecked]
Previous Message snpe 2003-01-13 21:23:24 Re: Errors compiling Postgres (bison -maximum table size excceeded)