niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » PostgreSQL
Loading of native libraries in PLJAVA
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
Nageshwar Rao
*nix forums beginner


Joined: 10 Mar 2005
Posts: 7

PostPosted: Thu Mar 10, 2005 2:10 pm    Post subject: Loading of native libraries in PLJAVA Reply with quote

We are facing 2 problems in loading files from Pljava.

1. Loading Native C library from Pljava trigger.

From Pljava trigger, we were trying to load native library,
Using System.loadLibrary("<library_name>"), which is
specified in the LD_LIBRARY_PATH.

Also specified the library file under /var/lib/pljava where
all the pljava specifc "*.so" files are located, which has an entry in the
postgresql.conf - dynamic_library_path for
"/var/lib/pljava",

Both theses cases failed to load native library.

we are getting this error in both cases-
UnSatisfiedLinkedError

2. Loading Properties file from trigger. (using
Properties.load(<properties_name.properties>))
We are unable to load properties file from
Properties.load("<properties_name.properties>").
we have included properties file in jar file and installed
the jar and set the jar file in the classpath using "sqlj.set_classpath".


Any light on this.

Thnx
Rao
Back to top
Thomas Hallgren
*nix forums beginner


Joined: 10 Mar 2005
Posts: 35

PostPosted: Thu Mar 10, 2005 3:30 pm    Post subject: Re: Loading of native libraries in PLJAVA Reply with quote

Nageshwar,
This is not the right forum for PL/Java issues. You should use mailing
list at pljava-dev@gborg.postgresql.org.

Quote:
We are facing 2 problems in loading files from Pljava.

1. Loading Native C library from Pljava trigger.

From Pljava trigger, we were trying to load native
library, Using System.loadLibrary("<library_name>"), which is

specified in the LD_LIBRARY_PATH.

The likely cause of this is that this library in turn have dependencies

to something not specified in the LD_LIBRARY_PATH or that you have some
mismatch in function naming. That in turn should be apparent from the
exception message (can't tell since you didn't convey it here).

Quote:

Also specified the library file under /var/lib/pljava
where all the pljava specifc "*.so" files are located, which has an
entry in the postgresql.conf -
dynamic_library_path for "/var/lib/pljava",


Both theses cases failed to load native library.

we are getting this error in both cases-
UnSatisfiedLinkedError

The dynamic_library_path is only used by the PostgreSQL backend when it

loads a module. It has no effect whatsoever on the System.loadLibrary
method.

Quote:

2. Loading Properties file from trigger. (using
Properties.load(<properties_name.properties>))
We are unable to load properties file from
Properties.load("<properties_name.properties>").
we have included properties file in jar file and
installed the jar and set the jar file in the classpath using
"sqlj.set_classpath".

To my knowledge there's Properties.load method that takes a String argument.


You have to use the Class.getResourceAsString() in order to obtain an
InputStream for a resource stored in a jar file. The class in question
should be in the same package as the resource (i.e. your properties file).

Regards,
Thomas Hallgren


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Fri Jan 09, 2009 3:44 am | All times are GMT
navigation Forum index » Databases » PostgreSQL
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts problem loading DSO modules Mauro Apache 5 Thu Jul 20, 2006 8:12 am
No new posts Weird gibberish when loading a gif in Firefox, but it's f... Edric Apache 9 Wed Jul 19, 2006 10:55 pm
No new posts shared objects cannot be overwritten even though the proc... prashantarane@gmail.com AIX 3 Wed Jul 19, 2006 6:33 am
No new posts SATA Native Command Queuing Matt Squid 2 Tue Jul 18, 2006 4:08 pm
No new posts loading 2 files into oracle using sql loader pawan_test Server 2 Sun Jul 16, 2006 8:49 pm

Tour Management Software | Loans | Credit Card Debt Consolidation | Personal Loans | Car Finance
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1393s ][ Queries: 16 (0.0631s) ][ GZIP on - Debug on ]