From: thhal at mailblocks.com (Thomas Hallgren) Date: Tue, 18 May 2004 15:51:46 +0200 Subject: [Pljava-dev] Problems compiling under Mac OS X References: <06f301c439a2$74ee5c80$eb4917ac@cor> <000d01c43be3$ee755b60$fa4817ac@ad.eoncompany.com> <59E0A0C8-A7DD-11D8-8BDF-0003933F0AB6@mac.com> <077301c43bed$40e676f0$eb4917ac@cor> <005901c43cdf$441be970$eb4917ac@cor> Message-ID: What is the setting of your current "dynamic_library_path" configuration option and the LD_LIBRARY_PATH? The pljava.jar is not the problem. The Oid class is found. The error comes when the Oid class initializer performs a System.loadLibrary("pljava") in order to let the JVM register all JNI methods (it will require to find the libpljava.so although it's loaded already). My guess is that this fails. The JVM will use the system property "java.library.path" in order to find the libpljava.so. Currently, I'm setting this property to the union of paths defined in the config option "dynamic_library_path" (defined in postgresql.conf) and the environment LD_LIBRARY_PATH. Perhaps this should be done differently using Mac OS X? In any case, try and set the LD_LIBRARY_PATH seen by your postmaster to include the directory where libpljava.so resides and see if this helps. - thomas ----- Original Message ----- From: p3consulting To: Thomas Hallgren Sent: Tuesday, May 18, 2004 3:18 PM Subject: Re: [Pljava-dev] Problems compiling under Mac OS X Latest news: still have problem make it run even after restarting postmaster with classpath set In psql SELECT sqlj.install_jar('samples','file:///Volumes/Data2/download_osx/PostgreSQL/org.postgresql.pljava/bin/examples.jar',true); outputs ERROR: Unable to load class org/postgresql/pljava/internal/Oid using CLASSPATH '/Library/Java/Extensions/pljava.jar' (Path to examples.jar is correct since drag and dropped from Finder, no typo possible) (Note that trying this twice leads to server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. ) At least classpath is correct and the setup of previous mail works... In shell ls -l /Library/Java/Extensions/pljava.jar outputs -rw-r--r-- 1 pascal admin 54841 14 May 16:44 /Library/Java/Extensions/pljava.jar so pljava.jar is there (along with postgresql.jar) and ls /usr/local/pgsql/lib/libplj* outputs /usr/local/pgsql/lib/libpljava.a /usr/local/pgsql/lib/libpljava.so.1 /usr/local/pgsql/lib/libpljava.so /usr/local/pgsql/lib/libpljava.so.1.0 and in psql \d sqlj.* outputs: Table "sqlj.classpath_entry" Column | Type | Modifiers ------------+-----------------------+----------- schemaname | character varying(30) | not null ordinal | smallint | not null jarid | integer | not null Indexes: "classpath_entry_pkey" primary key, btree (schemaname, ordinal) Foreign-key constraints: "$1" FOREIGN KEY (jarid) REFERENCES sqlj.jar_repository(jarid) ON DELETE CASCADE Index "sqlj.classpath_entry_pkey" Column | Type ------------+----------------------- schemaname | character varying(30) ordinal | smallint primary key, btree, for table "sqlj.classpath_entry" Table "sqlj.jar_entry" Column | Type | Modifiers ------------+------------------------+-------------------------------------------------------------- entryid | integer | not null default nextval('sqlj.jar_entry_entryid_seq'::text) entryname | character varying(200) | not null jarid | integer | not null entryimage | bytea | not null Indexes: "jar_entry_pkey" primary key, btree (entryid) "jar_entry_jarid_key" unique, btree (jarid, entryname) Foreign-key constraints: "$1" FOREIGN KEY (jarid) REFERENCES sqlj.jar_repository(jarid) ON DELETE CASCADE Sequence "sqlj.jar_entry_entryid_seq" Column | Type ---------------+--------- sequence_name | name last_value | bigint increment_by | bigint max_value | bigint min_value | bigint cache_value | bigint log_cnt | bigint is_cycled | boolean is_called | boolean Index "sqlj.jar_entry_jarid_key" Column | Type -----------+------------------------ jarid | integer entryname | character varying(200) unique, btree, for table "sqlj.jar_entry" Index "sqlj.jar_entry_pkey" Column | Type ---------+--------- entryid | integer primary key, btree, for table "sqlj.jar_entry" Table "sqlj.jar_repository" Column | Type | Modifiers ----------------+------------------------+----------------------------------------------------------------- jarid | integer | not null default nextval('sqlj.jar_repository_jarid_seq'::text) jarname | character varying(100) | not null jarorigin | character varying(500) | not null deploymentdesc | integer | Indexes: "jar_repository_pkey" primary key, btree (jarid) "jar_repository_jarname_key" unique, btree (jarname) Foreign-key constraints: "$1" FOREIGN KEY (deploymentdesc) REFERENCES sqlj.jar_entry(entryid) ON DELETE SET NULL Sequence "sqlj.jar_repository_jarid_seq" Column | Type ---------------+--------- sequence_name | name last_value | bigint increment_by | bigint max_value | bigint min_value | bigint cache_value | bigint log_cnt | bigint is_cycled | boolean is_called | boolean Index "sqlj.jar_repository_jarname_key" Column | Type ---------+------------------------ jarname | character varying(100) unique, btree, for table "sqlj.jar_repository" Index "sqlj.jar_repository_pkey" Column | Type --------+--------- jarid | integer primary key, btree, for table "sqlj.jar_repository" So deploy seems to have done its work. What info more do you need to help me solve the problem ? Regards, Pascal -------------- next part -------------- An HTML attachment was scrubbed... URL: