Обсуждение: PL/Java problem.

Поиск
Список
Период
Сортировка

PL/Java problem.

От
Scott Petersen
Дата:
Greetings,

Before I start I must admit that I am a newbie to Java.  This means that
this might actually be my problem and NOT a software issue, but I need help.

I am attempting to execute the "Hello World" demo from
http://wiki.tada.se/wiki/display/pljava/User+Guide which is part of the
user guide for the software.  In the process I created the following
class, and compiled (JAR) with NO errors:

   package com.mycompany.helloworld;
   public HelloWorld {    public String helloWorld() {        return
"Hello World";    }
   }

Next I ran psql  with the following result:

#psql -U mfgadmin mlp204
Password for user mfgadmin:
Welcome to psql 8.1.3, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

Warning: Console code page (437) differs from Windows code page (1252)
         8-bit characters may not work correctly. See psql reference
         page "Notes for Windows users" for details.

mlp204=# select sqlj.install_jar('file:///Java source/helloworld.jar',
'hellowor
ld_jar', false);
 install_jar
-------------

(1 row)

mlp204=# select sqlj.set_classpath('public', 'helloworld_jar');
 set_classpath
---------------

(1 row)

mlp204=# CREATE OR REPLACE FUNCTION helloworld()
mlp204-#   RETURNS "varchar" AS
mlp204-#     'com.mycompany.helloworld.HelloWorld.helloWorld'
mlp204-#   LANGUAGE 'java' VOLATILE;
CREATE FUNCTION
mlp204=# select * from helloworld();
ERROR:  java.lang.ClassNotFoundException:
com.mycompany.helloworld.HelloWorld
mlp204=#

Everything seems to be working fine except I receive a
"ClassNotFoundException".  Any help in understanding what I did wrong
would be appreciated.

Thanks Scott.




Re: PL/Java problem.

От
Markus Schaber
Дата:
Hi, Scott,

Scott Petersen wrote:

> I am attempting to execute the "Hello World" demo from
> http://wiki.tada.se/wiki/display/pljava/User+Guide which is part of the
> user guide for the software.

I think that you're asking the wrong list here, this list is for the
PostgreSQL JDBC drivers, and not for PLJava.

Currently, there's no pljava support list I know of, but maybe the
people at pljava-dev@gborg.postgresql.org can help you.

(I hope that the gborg servers are working again...)

Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

Re: PL/Java problem.

От
"Guy Rouillier"
Дата:
Markus Schaber wrote:
> Currently, there's no pljava support list I know of, but maybe the
> people at pljava-dev@gborg.postgresql.org can help you.

Just got an email from Thomas right now via that mailing list, so it
appears to still be active.

--
Guy Rouillier


Re: PL/Java problem.

От
Markus Schaber
Дата:
Hi, Guy,

Guy Rouillier wrote:
> Markus Schaber wrote:
>> Currently, there's no pljava support list I know of, but maybe the
>> people at pljava-dev@gborg.postgresql.org can help you.
>
> Just got an email from Thomas right now via that mailing list, so it
> appears to still be active.

Yes, it's active, albeit low traffic.

But it's a developer list, not an users / support list.

Markus


--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

Re: PL/Java problem.

От
"Guy Rouillier"
Дата:
Markus Schaber wrote:
> Hi, Guy,
>
> Guy Rouillier wrote:
>> Markus Schaber wrote:
>>> Currently, there's no pljava support list I know of, but maybe the
>>> people at pljava-dev@gborg.postgresql.org can help you.

> But it's a developer list, not an users / support list.

Support questions are fielded there - Thomas is great about replying
quickly.  BTW, I'm looking into this issue, but work has gotten busy, so
I'm having trouble getting time to delve into it.  Thomas will know the
answer - undoubtedly a setup issue.  You'll get going much more quickly
by popping your question over there.

--
Guy Rouillier


Re: PL/Java problem.

От
Thomas Hallgren
Дата:
Markus Schaber wrote:
> Hi, Guy,
>
> Guy Rouillier wrote:
>> Markus Schaber wrote:
>>> Currently, there's no pljava support list I know of, but maybe the
>>> people at pljava-dev@gborg.postgresql.org can help you.
>> Just got an email from Thomas right now via that mailing list, so it
>> appears to still be active.
>
> Yes, it's active, albeit low traffic.
>
> But it's a developer list, not an users / support list.
>
For what it's worth, the pljava-dev description on Gborg says "Mailing list for Pl/Java
users and developers" but I confess that the name is somewhat suggestive and thus badly
chosen. In any case, all questions, regardless of what relation you might have to the
project, are very welcome on this list.

Kind Regards,
Thomas Hallgren


Re: PL/Java problem.

От
Markus Schaber
Дата:
Hi, Thomas,

Thomas Hallgren wrote:

> For what it's worth, the pljava-dev description on Gborg says "Mailing
> list for Pl/Java users and developers" but I confess that the name is
> somewhat suggestive and thus badly chosen. In any case, all questions,
> regardless of what relation you might have to the project, are very
> welcome on this list.

Yes, you're right. Shame on me.

Sorry for the confusion.

Markus