jdbc/redhat8.0/postgresql upgrade
jdbc/redhat8.0/postgresql upgrade
От:
"Jason S. Friedman" <jason@powerpull.net>
Дата:
I just recently upgraded my postgresql to version 7.2.2-1 on my RedHat box. JDBC was working before the upgrade. Now, I get this error message: ClassNotFoundException: org.postgresql.Driver Under the old setup I had the /usr/java directory in my CLASSPATH and in that directory I had a link to /usr/share/pgsql/pgjdbc2.jar lrwxrwxrwx 1 root root 28 Jan 6 03:38 postgresql.jar -> /usr/share/pgsql/pgjdbc2.jar I removed that link and replaced it with a link to /usr/share/pgsql/jdbc7.2dev-1.2.jar, but that did not help. I did review the archives in this mailing list carefully and could not find anything that directly answered my issue. Many thanks in advance.
Re: jdbc/redhat8.0/postgresql upgrade
От:
"Campano, Troy" <Troy.Campano@LibertyMutual.com>
Дата:
What do you get when you echo your classpath? echo $CLASSPATH ~ Troy Campano ~ -----Original Message----- From: Jason S. Friedman [mailto:jason@powerpull.net] Sent: Thursday, January 16, 2003 2:42 PM To: pgsql-jdbc@postgresql.org Subject: [JDBC] jdbc/redhat8.0/postgresql upgrade I just recently upgraded my postgresql to version 7.2.2-1 on my RedHat box. JDBC was working before the upgrade. Now, I get this error message: ClassNotFoundException: org.postgresql.Driver Under the old setup I had the /usr/java directory in my CLASSPATH and in that directory I had a link to /usr/share/pgsql/pgjdbc2.jar lrwxrwxrwx 1 root root 28 Jan 6 03:38 postgresql.jar -> /usr/share/pgsql/pgjdbc2.jar I removed that link and replaced it with a link to /usr/share/pgsql/jdbc7.2dev-1.2.jar, but that did not help. I did review the archives in this mailing list carefully and could not find anything that directly answered my issue. Many thanks in advance. ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Re: jdbc/redhat8.0/postgresql upgrade
От:
"Campano, Troy" <Troy.Campano@LibertyMutual.com>
Дата:
Jason, The jar file needs to be added to your classpath. Once you log in try: export CLASSPATH=$CLASSPATH:/usr/share/pgsql/jdbc7.2dev-1.2.jar or export CLASSPATH=$CLASSPATH:/usr/java/postgresql.jar If that works you can add that export statement to your .bash_profile in your home directory so that you don't need to type that every time you log in. Let me know if that works for you. thanks! ~ Troy Campano ~ -----Original Message----- From: Jason S. Friedman [mailto:jason@powerpull.net] Sent: Thursday, January 16, 2003 6:01 PM To: Campano, Troy Subject: Re: [JDBC] jdbc/redhat8.0/postgresql upgrade powerpull@abigail ~ $ echo $CLASSPATH .:/usr/java:/usr/java/j2sdk1.4.1_01 powerpull@abigail ~ $ ll /usr/java total 12 drwxr-xr-x 7 root root 4096 Dec 24 04:44 j2re1.4.1_01 drwxr-xr-x 9 root root 4096 Dec 24 04:44 j2sdk1.4.1_01 drwxr-x--- 3 powerpull users 4096 Jan 4 22:47 net lrwxrwxrwx 1 root root 35 Jan 16 18:44 postgresql.jar -> /usr/share/pgsql/jdbc7.2dev-1.2.jar powerpull@abigail ~ $ ll /usr/share/pgsql/jdbc7.2dev-1.2.jar -rwxr-xr-x 1 root root 116198 Dec 20 17:57 /usr/share/pgsql/jdbc7.2dev-1.2.jar On Thu, Jan 16, 2003 at 03:19:42PM -0500, Campano, Troy wrote: > What do you get when you echo your classpath? > > echo $CLASSPATH > > > ~ Troy Campano ~ > > -----Original Message----- > From: Jason S. Friedman [mailto:jason@powerpull.net] > Sent: Thursday, January 16, 2003 2:42 PM > To: pgsql-jdbc@postgresql.org > Subject: [JDBC] jdbc/redhat8.0/postgresql upgrade > > > I just recently upgraded my postgresql to version 7.2.2-1 on my RedHat > box. > > JDBC was working before the upgrade. Now, I get this error message: > ClassNotFoundException: org.postgresql.Driver > > Under the old setup I had the /usr/java directory in my CLASSPATH and in that directory I had a link to /usr/share/pgsql/pgjdbc2.jar > lrwxrwxrwx 1 root root 28 Jan 6 03:38 postgresql.jar -> /usr/share/pgsql/pgjdbc2.jar > > I removed that link and replaced it with a link to > /usr/share/pgsql/jdbc7.2dev-1.2.jar, but that did not help.
Re: jdbc/redhat8.0/postgresql upgrade
От:
"Jason S. Friedman" <jason@powerpull.net>
Дата:
Huh. I did not expect that to be the problem, as I did not have the actual jar file in my CLASSPATH before, either. But, there's no arguing with success -- thank you very much for helping! On Thu, Jan 16, 2003 at 06:40:57PM -0500, Campano, Troy wrote: > Jason, > The jar file needs to be added to your classpath. > Once you log in try: > export CLASSPATH=$CLASSPATH:/usr/share/pgsql/jdbc7.2dev-1.2.jar > or > export CLASSPATH=$CLASSPATH:/usr/java/postgresql.jar > > > If that works you can add that export statement to your .bash_profile in your home directory so that you don't need to type that every time you log in. > > Let me know if that works for you. > > thanks! > > ~ Troy Campano ~ > > -----Original Message----- > From: Jason S. Friedman [mailto:jason@powerpull.net] > Sent: Thursday, January 16, 2003 6:01 PM > To: Campano, Troy > Subject: Re: [JDBC] jdbc/redhat8.0/postgresql upgrade > > > powerpull@abigail ~ $ echo $CLASSPATH .:/usr/java:/usr/java/j2sdk1.4.1_01 > > powerpull@abigail ~ $ ll /usr/java > total 12 > drwxr-xr-x 7 root root 4096 Dec 24 04:44 j2re1.4.1_01 > drwxr-xr-x 9 root root 4096 Dec 24 04:44 j2sdk1.4.1_01 > drwxr-x--- 3 powerpull users 4096 Jan 4 22:47 net > lrwxrwxrwx 1 root root 35 Jan 16 18:44 postgresql.jar -> /usr/share/pgsql/jdbc7.2dev-1.2.jar > > powerpull@abigail ~ $ ll /usr/share/pgsql/jdbc7.2dev-1.2.jar > -rwxr-xr-x 1 root root 116198 Dec 20 17:57 /usr/share/pgsql/jdbc7.2dev-1.2.jar > > On Thu, Jan 16, 2003 at 03:19:42PM -0500, Campano, Troy wrote: