[Pljava-dev] please help - java.lang.ClassNotFoundException: org.postgresql.Driver

Lists: pljava-dev
From: rath(dot)swaroop at gmail(dot)com (swaroop)
To:
Subject: [Pljava-dev] please help - java.lang.ClassNotFoundException: org.postgresql.Driver
Date: 2010-06-16 22:11:11
Message-ID: AANLkTinRI5_E1ukB43Ut4PAs1RX0CK7XIqq0sJkJVgs5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: PostgreSQL : PostgreSQL 메일 링리스트 : 2010-06-16 22:11 이후 토토 캔Dev

Hi

I compiled and installed Postgres in Ubuntu Jaunty. I need to develop an
extension to PostgreSQL and this is why I choose to compile from the
sources, rather than using an installer.

I tried to install pljava and followed the steps outlines in "
http://wiki.tada.se/index.php/Installing_on_Linux_(or_other_*nix)" sincerely.
I am sure that I did things correct.

The last step says, run the deployer program. I did that but unfortunately I
get an exception. Please help me here. The exception is below. I tried to
download the jdbc driver at
http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc3.jar and added
it to classpath. But this did not help. Please advice.

swaroop at swaroop-laptop:~/Project/pljava$ java -cp deploy.jar
org.postgresql.pljava.deploy.Deployer -install
java.lang.ClassNotFoundException: org.postgresql.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:238)

Regards
Swaroop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20100616/de389cfe/attachment.html>


From: books at ejurka(dot)com (Kris Jurka)
To:
Subject: [Pljava-dev] please help - java.lang.ClassNotFoundException: org.postgresql.Driver
Date: 2010-06-16 22:32:01
Message-ID: 4C1950E1.3030206@ejurka.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

On 6/16/2010 3:11 PM, swaroop wrote:
> The last step says, run the deployer program. I did that but
> unfortunately I get an exception. Please help me here. The exception is
> below. I tried to download the jdbc driver at
> http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc3.jar and
> added it to classpath. But this did not help. Please advice.
>
> swaroop at swaroop-laptop:~/Project/pljava$ java -cp deploy.jar
> org.postgresql.pljava.deploy.Deployer -install
> java.lang.ClassNotFoundException: org.postgresql.Driver

You need to add it to the classpath here:

java -cp postgresql-8.4-701.jdbc3.jar:deploy.jar
org.postgresql.pljava.deploy.Deployer -install


From: rath(dot)swaroop at gmail(dot)com (swaroop)
To:
Subject: [Pljava-dev] please help - java.lang.ClassNotFoundException: org.postgresql.Driver
Date: 2010-06-16 23:17:32
Message-ID: AANLkTin9vKmcbuqOwynCKj1ygC4lygAKkrzLbHIC8fAE@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Thanks a lot Kris. My this problem is solved. The next error I get is below.
Please have a look. I really need this up and running and really
appreciate your help. pljava.so is there in the directory. I think it needs
libjvm.so. Where do I find it ?

swaroop at swaroop-laptop:~/Project/pljava$ java -cp
postgresql-8.4-701.jdbc4.jar:deploy.jar
org.postgresql.pljava.deploy.Deployer -install
org.postgresql.util.PSQLException: ERROR: could not load library
"/home/swaroop/Project/MayBMS/database/lib/postgresql/pljava.so": libjvm.so:
cannot open shared object file: No such file or directory
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
at
org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deployer.java:474)
at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:269)

Regards
Swaroop

On Wed, Jun 16, 2010 at 11:32 PM, Kris Jurka <books at ejurka.com> wrote:

> On 6/16/2010 3:11 PM, swaroop wrote:
>
>> The last step says, run the deployer program. I did that but
>> unfortunately I get an exception. Please help me here. The exception is
>> below. I tried to download the jdbc driver at
>> http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc3.jar and
>> added it to classpath. But this did not help. Please advice.
>>
>> swaroop at swaroop-laptop:~/Project/pljava$ java -cp deploy.jar
>> org.postgresql.pljava.deploy.Deployer -install
>> java.lang.ClassNotFoundException: org.postgresql.Driver
>>
>
> You need to add it to the classpath here:
>
> java -cp postgresql-8.4-701.jdbc3.jar:deploy.jar
> org.postgresql.pljava.deploy.Deployer -install
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20100617/06e557ab/attachment.html>


From: syedmmansoor at gmail(dot)com (Syed Muhammad Mansoor)
To:
Subject: [Pljava-dev] please help - java.lang.ClassNotFoundException: org.postgresql.Driver
Date: 2010-06-16 23:33:13
Message-ID: AANLkTil80U05w0hb7IDBNfag0DEiH0xuMSvn6thN2-lG@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

You need to set LD_LIBRARY_PATH.
export LD_LIBARARY_PATH=<directory that contains libjvm.so>:$LD_LIBRARY_PATH
or this one would be more better
*export
LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/client*.

Thanks
--Mansoor
EnterpriseDB Corporation
The Enterprise Postgres Company
Website: http://www.enterprisedb.com

On Wed, Jun 16, 2010 at 7:17 PM, swaroop <rath.swaroop at gmail.com> wrote:

> Thanks a lot Kris. My this problem is solved. The next error I get is
> below. Please have a look. I really need this up and running and really
> appreciate your help. pljava.so is there in the directory. I think it needs
> libjvm.so. Where do I find it ?
>
> swaroop at swaroop-laptop:~/Project/pljava$ java -cp
> postgresql-8.4-701.jdbc4.jar:deploy.jar
> org.postgresql.pljava.deploy.Deployer -install
> org.postgresql.util.PSQLException: ERROR: could not load library
> "/home/swaroop/Project/MayBMS/database/lib/postgresql/pljava.so": libjvm.so:
> cannot open shared object file: No such file or directory
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
> at
> org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deployer.java:474)
> at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:269)
>
>
> Regards
> Swaroop
>
>
>
> On Wed, Jun 16, 2010 at 11:32 PM, Kris Jurka <books at ejurka.com> wrote:
>
>> On 6/16/2010 3:11 PM, swaroop wrote:
>>
>>> The last step says, run the deployer program. I did that but
>>> unfortunately I get an exception. Please help me here. The exception is
>>> below. I tried to download the jdbc driver at
>>> http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc3.jar and
>>> added it to classpath. But this did not help. Please advice.
>>>
>>> swaroop at swaroop-laptop:~/Project/pljava$ java -cp deploy.jar
>>> org.postgresql.pljava.deploy.Deployer -install
>>> java.lang.ClassNotFoundException: org.postgresql.Driver
>>>
>>
>> You need to add it to the classpath here:
>>
>> java -cp postgresql-8.4-701.jdbc3.jar:deploy.jar
>> org.postgresql.pljava.deploy.Deployer -install
>>
>
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pljava-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20100616/7174c678/attachment.html>


From: rath(dot)swaroop at gmail(dot)com (swaroop)
To:
Subject: [Pljava-dev] please help - java.lang.ClassNotFoundException: org.postgresql.Driver
Date: 2010-06-16 23:36:34
Message-ID: AANLkTinfilYMfsybdA2JEAjugYmyG-lGN4kO_5iIBWS1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

I already have that -
swaroop at swaroop-laptop:~/Project/pljava$ echo $LD_LIBRARY_PATH
/usr/lib/jvm/java-1.5.0-sun/jre/lib/i386:/usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/client:/usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/native_threads

Still I have the error :(. I tried copying libjvm.so to
"database/lib/postgresql" but that did not solve the problem either. :( I
copy the stack trace here for reference.

org.postgresql.util.PSQLException: ERROR: could not load library
"/home/swaroop/Project/MayBMS/database/lib/postgresql/pljava.so": libjvm.so:
cannot open shared object file: No such file or directory
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
at
org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deployer.java:474)
at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:269)

Regards
Swaroop

On Thu, Jun 17, 2010 at 12:33 AM, Syed Muhammad Mansoor <
syedmmansoor at gmail.com> wrote:

> You need to set LD_LIBRARY_PATH.
> export LD_LIBARARY_PATH=<directory that contains
> libjvm.so>:$LD_LIBRARY_PATH
> or this one would be more better
> *export
> LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/client*.
>
> Thanks
> --Mansoor
> EnterpriseDB Corporation
> The Enterprise Postgres Company
> Website: http://www.enterprisedb.com
>
>
> On Wed, Jun 16, 2010 at 7:17 PM, swaroop <rath.swaroop at gmail.com> wrote:
>
>> Thanks a lot Kris. My this problem is solved. The next error I get is
>> below. Please have a look. I really need this up and running and really
>> appreciate your help. pljava.so is there in the directory. I think it needs
>> libjvm.so. Where do I find it ?
>>
>> swaroop at swaroop-laptop:~/Project/pljava$ java -cp
>> postgresql-8.4-701.jdbc4.jar:deploy.jar
>> org.postgresql.pljava.deploy.Deployer -install
>> org.postgresql.util.PSQLException: ERROR: could not load library
>> "/home/swaroop/Project/MayBMS/database/lib/postgresql/pljava.so": libjvm.so:
>> cannot open shared object file: No such file or directory
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
>> at
>> org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deployer.java:474)
>> at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:269)
>>
>>
>> Regards
>> Swaroop
>>
>>
>>
>> On Wed, Jun 16, 2010 at 11:32 PM, Kris Jurka <books at ejurka.com> wrote:
>>
>>> On 6/16/2010 3:11 PM, swaroop wrote:
>>>
>>>> The last step says, run the deployer program. I did that but
>>>> unfortunately I get an exception. Please help me here. The exception is
>>>> below. I tried to download the jdbc driver at
>>>> http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc3.jar and
>>>> added it to classpath. But this did not help. Please advice.
>>>>
>>>> swaroop at swaroop-laptop:~/Project/pljava$ java -cp deploy.jar
>>>> org.postgresql.pljava.deploy.Deployer -install
>>>> java.lang.ClassNotFoundException: org.postgresql.Driver
>>>>
>>>
>>> You need to add it to the classpath here:
>>>
>>> java -cp postgresql-8.4-701.jdbc3.jar:deploy.jar
>>> org.postgresql.pljava.deploy.Deployer -install
>>>
>>
>>
>> _______________________________________________
>> Pljava-dev mailing list
>> Pljava-dev at pgfoundry.org
>> http://pgfoundry.org/mailman/listinfo/pljava-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20100617/963f394c/attachment.html>


From: syedmmansoor at gmail(dot)com (Syed Muhammad Mansoor)
To:
Subject: [Pljava-dev] please help - java.lang.ClassNotFoundException: org.postgresql.Driver
Date: 2010-06-16 23:52:45
Message-ID: AANLkTimbky_xKWX5lyVn8XAkikeYcGX3VRkR3ntHZn03@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: PostgreSQL : PostgreSQL 메일 링리스트 : 2010-06-16 이후 토토 결과Dev 23:52

Do you have LD_LIBRARY_PATH set in the session, in which database server is
running. Database server should see the same LD_LIBRARY_PARH.

Thanks,
--Mansoor
EnterpriseDB Corporation
The Enterprise Postgres Company
Website: http://www.enterprisedb.com

On Wed, Jun 16, 2010 at 7:36 PM, swaroop <rath.swaroop at gmail.com> wrote:

> I already have that -
> swaroop at swaroop-laptop:~/Project/pljava$ echo $LD_LIBRARY_PATH
>
> /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386:/usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/client:/usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/native_threads
>
>
> Still I have the error :(. I tried copying libjvm.so to
> "database/lib/postgresql" but that did not solve the problem either. :( I
> copy the stack trace here for reference.
>
> org.postgresql.util.PSQLException: ERROR: could not load library
> "/home/swaroop/Project/MayBMS/database/lib/postgresql/pljava.so": libjvm.so:
> cannot open shared object file: No such file or directory
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
> at
> org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deployer.java:474)
> at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:269)
>
>
> Regards
> Swaroop
>
>
> On Thu, Jun 17, 2010 at 12:33 AM, Syed Muhammad Mansoor <
> syedmmansoor at gmail.com> wrote:
>
>> You need to set LD_LIBRARY_PATH.
>> export LD_LIBARARY_PATH=<directory that contains
>> libjvm.so>:$LD_LIBRARY_PATH
>> or this one would be more better
>> *export
>> LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/client*.
>>
>> Thanks
>> --Mansoor
>> EnterpriseDB Corporation
>> The Enterprise Postgres Company
>> Website: http://www.enterprisedb.com
>>
>>
>> On Wed, Jun 16, 2010 at 7:17 PM, swaroop <rath.swaroop at gmail.com> wrote:
>>
>>> Thanks a lot Kris. My this problem is solved. The next error I get is
>>> below. Please have a look. I really need this up and running and really
>>> appreciate your help. pljava.so is there in the directory. I think it needs
>>> libjvm.so. Where do I find it ?
>>>
>>> swaroop at swaroop-laptop:~/Project/pljava$ java -cp
>>> postgresql-8.4-701.jdbc4.jar:deploy.jar
>>> org.postgresql.pljava.deploy.Deployer -install
>>> org.postgresql.util.PSQLException: ERROR: could not load library
>>> "/home/swaroop/Project/MayBMS/database/lib/postgresql/pljava.so": libjvm.so:
>>> cannot open shared object file: No such file or directory
>>> at
>>> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
>>> at
>>> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
>>> at
>>> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
>>> at
>>> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
>>> at
>>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
>>> at
>>> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
>>> at
>>> org.postgresql.pljava.deploy.Deployer.initJavaHandlers(Deployer.java:474)
>>> at org.postgresql.pljava.deploy.Deployer.main(Deployer.java:269)
>>>
>>>
>>> Regards
>>> Swaroop
>>>
>>>
>>>
>>> On Wed, Jun 16, 2010 at 11:32 PM, Kris Jurka <books at ejurka.com> wrote:
>>>
>>>> On 6/16/2010 3:11 PM, swaroop wrote:
>>>>
>>>>> The last step says, run the deployer program. I did that but
>>>>> unfortunately I get an exception. Please help me here. The exception is
>>>>> below. I tried to download the jdbc driver at
>>>>> http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc3.jar and
>>>>> added it to classpath. But this did not help. Please advice.
>>>>>
>>>>> swaroop at swaroop-laptop:~/Project/pljava$ java -cp deploy.jar
>>>>> org.postgresql.pljava.deploy.Deployer -install
>>>>> java.lang.ClassNotFoundException: org.postgresql.Driver
>>>>>
>>>>
>>>> You need to add it to the classpath here:
>>>>
>>>> java -cp postgresql-8.4-701.jdbc3.jar:deploy.jar
>>>> org.postgresql.pljava.deploy.Deployer -install
>>>>
>>>
>>>
>>> _______________________________________________
>>> Pljava-dev mailing list
>>> Pljava-dev at pgfoundry.org
>>> http://pgfoundry.org/mailman/listinfo/pljava-dev
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20100616/7ef177c2/attachment.html>