X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5410C9FB3B4 for ; Wed, 6 Sep 2006 17:11:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 76327-02-2 for ; Wed, 6 Sep 2006 17:11:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from jive.SoftHome.net (jive.SoftHome.net [66.54.152.27]) by postgresql.org (Postfix) with SMTP id F187B9FB387 for ; Wed, 6 Sep 2006 17:10:08 -0300 (ADT) Received: (qmail 19903 invoked by uid 417); 6 Sep 2006 20:03:27 -0000 Received: from tango-.softhome.net (HELO softhome.net) (172.16.2.14) by shunt-smtp-com-out-com-0 with SMTP; 6 Sep 2006 20:03:27 -0000 Received: from [10.27.93.50] ([209.163.142.248]) (AUTH: PLAIN scottpetersen@softhome.net) by softhome.net with esmtp; Wed, 06 Sep 2006 14:03:26 -0600 Message-ID: <44FF298D.3050000@softhome.net> Date: Wed, 06 Sep 2006 14:03:25 -0600 From: Scott Petersen User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: PL/Java problem. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200609/20 X-Sequence-Number: 15738 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.