You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Minh Tu Thanh Tran <ki...@gmail.com> on 2006/08/07 15:15:07 UTC

Problem with java.library.path

Hi,

I want to use methods of an external library (jpl.jar file) inside a
java Bean class. But I got this error message from Tomcat 5.5.17 log
file:

Aug 7, 2006 1:14:44 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/lib/j2sdk1.5-sun/jre/lib/i386/client:/usr/lib/j2sdk1.5-sun/jre/lib/i386:/usr/lib/j2sdk1.5-sun/jre/../lib/i386

My question is how to solve this problem?

Many thanks,

Tu

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Problem with java.library.path

Posted by Mark Thomas <ma...@apache.org>.
Minh Tu Thanh Tran wrote:
> Thanks David,
> 
> Again, I want to start the prolog engine, so I need to load the
> library of prolog when I start Tomcat 5.5.17. I think the command line
> is: java -Djava.library.path=$PLLIBDIR $1
> But I do not know where to put this command line in Tomcat in order to
> load the prolog library when Tomcat starts. I am using Linux.

You can set command line parameters on start-up by setting the
JAVA_OPTS or CATALINA_OPTS environment variables. Have a look at
catalina.sh in your bin directory for more details.

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Problem with java.library.path

Posted by Minh Tu Thanh Tran <ki...@gmail.com>.
Thanks David,

Again, I want to start the prolog engine, so I need to load the
library of prolog when I start Tomcat 5.5.17. I think the command line
is: java -Djava.library.path=$PLLIBDIR $1
But I do not know where to put this command line in Tomcat in order to
load the prolog library when Tomcat starts. I am using Linux.

This is the error I get when using jpl methods to call prolog, just
because the prolog engine is not yet started.

Caused by: java.lang.UnsatisfiedLinkError: no jpl in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
	at java.lang.Runtime.loadLibrary0(Runtime.java:822)
	at java.lang.System.loadLibrary(System.java:992)
	at jpl.fli.Prolog.<clinit>(Prolog.java:81)
	at jpl.Query.open(Query.java:302)
	at jpl.Util.textToTerm(Util.java:162)
	at jpl.Query.<init>(Query.java:209)
	at nats.incom.jsp.beans.predicate.PredicateBean.setExercise(PredicateBean.java:37)

Many thanks,

Tu


On 8/7/06, David Smith <dn...@cornell.edu> wrote:
> Your log message sited below is not related to accessing jpl.jar.  It's
> just a message stating it couldn't use the new native APR connector and
> is falling back to the traditional Coyote connector.
>
> As far as an external jar file, best practice is include it in your
> webapp in WEB-INF/lib.  In $CATALINA_HOME/shared/lib if you are using it
> accross multiple webapps.
>
> --David
>
> Minh Tu Thanh Tran wrote:
>
> > Hi,
> >
> > I want to use methods of an external library (jpl.jar file) inside a
> > java Bean class. But I got this error message from Tomcat 5.5.17 log
> > file:
> >
> > Aug 7, 2006 1:14:44 PM org.apache.catalina.core.AprLifecycleListener
> > lifecycleEvent
> > INFO: The Apache Tomcat Native library which allows optimal
> > performance in production environments was not found on the
> > java.library.path:
> >
> /usr/lib/j2sdk1.5-sun/jre/lib/i386/client:/usr/lib/j2sdk1.5-sun/jre/lib/i386:/usr/lib/j2sdk1.5-sun/jre/../lib/i386
> >
> >
> > My question is how to solve this problem?
> >
> > Many thanks,
> >
> > Tu
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Problem with java.library.path

Posted by David Smith <dn...@cornell.edu>.
Your log message sited below is not related to accessing jpl.jar.  It's 
just a message stating it couldn't use the new native APR connector and 
is falling back to the traditional Coyote connector.

As far as an external jar file, best practice is include it in your 
webapp in WEB-INF/lib.  In $CATALINA_HOME/shared/lib if you are using it 
accross multiple webapps.

--David

Minh Tu Thanh Tran wrote:

> Hi,
>
> I want to use methods of an external library (jpl.jar file) inside a
> java Bean class. But I got this error message from Tomcat 5.5.17 log
> file:
>
> Aug 7, 2006 1:14:44 PM org.apache.catalina.core.AprLifecycleListener
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal
> performance in production environments was not found on the
> java.library.path:
> /usr/lib/j2sdk1.5-sun/jre/lib/i386/client:/usr/lib/j2sdk1.5-sun/jre/lib/i386:/usr/lib/j2sdk1.5-sun/jre/../lib/i386 
>
>
> My question is how to solve this problem?
>
> Many thanks,
>
> Tu
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org