From: | Barry Lind <blind(at)xythos(dot)com> |
---|---|
To: | Rich Cullingford <rculling(at)sysd(dot)com> |
Cc: | pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Security manager changing the jdbc Connection class? |
Date: | 2003-01-13 17:46:21 |
Message-ID: | 3E22FB6D.304@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2003-01-13 18:03:12 | Re: Performance of request of type WHERE ... IN ( ... ) |
Previous Message | Rich Cullingford | 2003-01-13 17:20:47 | Security manager changing the jdbc Connection class? |