[Pljava-dev] execute pl/java function
Thomas Hallgren
thhal at mailblocks.com
Tue Feb 15 17:38:11 UTC 2005
FERREIRA William (COFRAMI) wrote:
> hi
>
> i downloaded pl/java for postgresql 8.0 and install it.
> i wrote 2 functions and i would like to call them by a function :
>
> this is my call :
> select adoc_java.flushInFile('c:\\toto.txt', 'titi');
>
> in result i got this error and i don't understand why:
> ERROR: java.lang.ClassNotFoundException:
> com.xxxxxx.adoc.util.ADOCFileUtil
>
> here is my installation sequence :
> SELECT
> sqlj.install_jar('file:///Opt/PostgreSQL/8.0.0/pljava/ADOC_JAVA.jar'
> <file:///Opt/PostgreSQL/8.0.0/pljava/ADOC_JAVA.jar%27>, 'javapa', true);
> SELECT sqlj.set_classpath('adoc_java', 'javapa');
>
> if somebody can help me
> thanks in advance
>
I assume that you somehow have issued a commit after the
sqlj.install_jar and sqlj.set_classpath commands?
If you have, then the same apply as in any Java environment. Either
you've misspelled the name of the class (or package) or you don't have a
compiled class file by that name in the jar file. Do a jar -tf on the
jar file and verify that the class really is in there. Also verify that
the class is public.
Hope this helps,
Thomas Hallgren
More information about the Pljava-dev
mailing list