You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Marshall <ma...@cs.umass.edu> on 2007/10/16 21:09:50 UTC
java.library.path / Unsatisfied Link Error problem with Linux Tomcat
5.5
Using Tomcat 5.5 on Linux.
I've set my environment variable with export
JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
After restarting tomcat and hitting my servlet (which depends on the .so
file in the folder above) I get an UnsatisfiedLinkError no X found in
java.library.path
I've looked in catalina.out and see a message that says that The Apache
Tomcat Native library cannot be found on java.library.path:
/path/to/my/sharedobjectfolder. So it appears that Tomcat is using the
path at least when it starts up.
I've seen other Linux Tomcat users raising this same problem and not
getting any answers.
Within Eclipse I can run Tomcat and configure a VM parameter for
java.library.path and my library is successfully found when the servlet
runs so this issue only pertains to running tomcat directly from the
startup scripts (e.g. /etc/init.d/tomcat start)
What could be wrong?
--
David Marshall
Staff Software Engineer
Center For Knowledge Communication
Computer Science Dept.
University of Massachusetts - Amherst
www.cs.umass.edu/~marshall
---------------------------------------------------------------------
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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by Lionel Crine <lc...@linagora.com>.
Hello,
I had a similar problem, did a try a chmod 755 ?
David Marshall wrote:
> I'm not doing a System.loadLibrary. The library is needed by a
> third-party jar that I am using. SInce it works from within Eclipse I
> know that their jar and the shared object (.so file) work correctly
> together and that the shared object is indeed in the correct location on
> library path. Its only when I deploy to the production version of
> Tomcat (on the same machine) that this stuff fails. At that point I
> don't have Eclipse's VM parameter setting abilities available to me and
> the only place to put it is in JAVA_OPTS. From the tomcat log file I
> can see that the java.library.path is set as intended.
>
> I'll try your JSP idea just to be 100% the path is set correctly.
>
> Filip Hanik - Dev Lists wrote:
>> and that your library is valid, and that you are calling
>> System.loadLibrary with the correct name
>>
>> Filip
>>
>> David Marshall wrote:
>>> Filip :
>>>
>>> Thanks. I didn't literally mean X. The library it won't load is
>>> called Netica. I just changed it to X to be more general. I hope
>>> I'm not just creating confusion for everyone.
>>>
>>> thanks
>>> dm
>>>
>>> Filip Hanik - Dev Lists wrote:
>>>> I believe there is a
>>>> -Djava.awt.headless=true
>>>>
>>>> or something like that, so that it doesn't try to load your X
>>>> windows environment
>>>>
>>>> Filip
>>>>
>>>> David Marshall wrote:
>>>>> Using Tomcat 5.5 on Linux.
>>>>> I've set my environment variable with export
>>>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>>>>>
>>>>> After restarting tomcat and hitting my servlet (which depends on
>>>>> the .so file in the folder above) I get an UnsatisfiedLinkError no
>>>>> X found in java.library.path
>>>>>
>>>>> I've looked in catalina.out and see a message that says that The
>>>>> Apache Tomcat Native library cannot be found on java.library.path:
>>>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is
>>>>> using the path at least when it starts up. I've seen other Linux
>>>>> Tomcat users raising this same problem and not getting any
>>>>> answers. Within Eclipse I can run Tomcat and configure a VM
>>>>> parameter for java.library.path and my library is successfully
>>>>> found when the servlet runs so this issue only pertains to running
>>>>> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
>>>>> start)
>>>>>
>>>>> What could be wrong?
>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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: java.library.path / Unsatisfied Link Error problem with Linux Tomcat 5.5
Posted by Konstantin Kolinko <kn...@gmail.com>.
I understand that if the .so library fails to load, it will also be
UnsatisfiedLinkError. I do not know (haven't tested), whether the
error text will be the same.
If some required system libraries cannot be found, the library does
not load. Those system libraries are loaded from LD_LIBRARY_PATH.
If you are using JDK 1.5 or later, you may print your environment in
Java with System.getenv() / System.getenv(String). See
http://www.velocityreviews.com/forums/t259893-systemgetenv.html
To be sure: in case you misprinted the value for "java.library.path",
or permissions problem, you may check if the file is actually
readable.
java.io.File f = new File(System.getProperty("java.library.path") +
File.separatorChar + "libLibName.so");
f.isFile();
f.canRead();
f.canExecute();
2007/10/17, david marshall <ma...@cs.umass.edu>:
> Its a single .so file so does that mean the LD_LIBRARY_PATH stuff won't
> be relevant?
>
>
> Konstantin Kolinko wrote:
> > Does the native library consist of a single .so file, or there are several ones?
> >
> > See the second "NOTE MEG" here:
> > http://wrapper.tanukisoftware.org/doc/english/prop-java-library-path-n.html
> > It is about requirements for LD_LIBRARY_PATH if there are several libraries.
> >
> >
> > Does your printenv mention the value of LD_LIBRARY_PATH? Is there any
> > difference compared to when you are running Eclipse?
> >
> >
> > 2007/10/17, David Marshall <ma...@cs.umass.edu>:
> >
> >> The results of printing System.getProperty("java.library.path") in the
> >> jsp does show the correct path to my shared object....
> >>
> >>> Looking forward to your results with JSP.
> >>>
> >>>
> >>> 2007/10/17, David Marshall <ma...@cs.umass.edu>:
> >>>
> >>>
> >>>> I'm not doing a System.loadLibrary. The library is needed by a
> >>>> third-party jar that I am using. SInce it works from within Eclipse I
> >>>> know that their jar and the shared object (.so file) work correctly
> >>>> together and that the shared object is indeed in the correct location on
> >>>> library path. Its only when I deploy to the production version of
> >>>> Tomcat (on the same machine) that this stuff fails. At that point I
> >>>> don't have Eclipse's VM parameter setting abilities available to me and
> >>>> the only place to put it is in JAVA_OPTS. From the tomcat log file I
> >>>> can see that the java.library.path is set as intended.
> >>>>
> >>>> I'll try your JSP idea just to be 100% the path is set correctly.
> >>>>
> >>>> Filip Hanik - Dev Lists wrote:
> >>>>
> >>>>
> >>>>> and that your library is valid, and that you are calling
> >>>>> System.loadLibrary with the correct name
> >>>>>
> >>>>> Filip
> >>>>>
> >>>>> David Marshall wrote:
> >>>>>
> >>>>>
> >>>>>> Filip :
> >>>>>>
> >>>>>> Thanks. I didn't literally mean X. The library it won't load is
> >>>>>> called Netica. I just changed it to X to be more general. I hope
> >>>>>> I'm not just creating confusion for everyone.
> >>>>>>
> >>>>>> thanks
> >>>>>> dm
> >>>>>>
> >>>>>> Filip Hanik - Dev Lists wrote:
> >>>>>>
> >>>>>>
> >>>>>>> I believe there is a
> >>>>>>> -Djava.awt.headless=true
> >>>>>>>
> >>>>>>> or something like that, so that it doesn't try to load your X
> >>>>>>> windows environment
> >>>>>>>
> >>>>>>> Filip
> >>>>>>>
> >>>>>>> David Marshall wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>> Using Tomcat 5.5 on Linux.
> >>>>>>>> I've set my environment variable with export
> >>>>>>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
> >>>>>>>>
> >>>>>>>> After restarting tomcat and hitting my servlet (which depends on
> >>>>>>>> the .so file in the folder above) I get an UnsatisfiedLinkError no
> >>>>>>>> X found in java.library.path
> >>>>>>>>
> >>>>>>>> I've looked in catalina.out and see a message that says that The
> >>>>>>>> Apache Tomcat Native library cannot be found on java.library.path:
> >>>>>>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is
> >>>>>>>> using the path at least when it starts up. I've seen other Linux
> >>>>>>>> Tomcat users raising this same problem and not getting any
> >>>>>>>> answers. Within Eclipse I can run Tomcat and configure a VM
> >>>>>>>> parameter for java.library.path and my library is successfully
> >>>>>>>> found when the servlet runs so this issue only pertains to running
> >>>>>>>> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
> >>>>>>>> start)
> >>>>>>>>
> >>>>>>>> What could be wrong?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> ---------------------------------------------------------------------
> >>>>>>> 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
> >>>>>
> >>>>>
> >>>> --
> >>>> David Marshall
> >>>> Staff Software Engineer
> >>>> Center For Knowledge Communication
> >>>> Computer Science Dept.
> >>>> University of Massachusetts - Amherst
> >>>> www.cs.umass.edu/~marshall
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> 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
> >>>
> >>>
> >> --
> >> David Marshall
> >> Staff Software Engineer
> >> Center For Knowledge Communication
> >> Computer Science Dept.
> >> University of Massachusetts - Amherst
> >> www.cs.umass.edu/~marshall
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>
---------------------------------------------------------------------
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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by david marshall <ma...@cs.umass.edu>.
Its a single .so file so does that mean the LD_LIBRARY_PATH stuff won't
be relevant?
Konstantin Kolinko wrote:
> Does the native library consist of a single .so file, or there are several ones?
>
> See the second "NOTE MEG" here:
> http://wrapper.tanukisoftware.org/doc/english/prop-java-library-path-n.html
> It is about requirements for LD_LIBRARY_PATH if there are several libraries.
>
>
> Does your printenv mention the value of LD_LIBRARY_PATH? Is there any
> difference compared to when you are running Eclipse?
>
>
> 2007/10/17, David Marshall <ma...@cs.umass.edu>:
>
>> The results of printing System.getProperty("java.library.path") in the
>> jsp does show the correct path to my shared object....
>>
>>> Looking forward to your results with JSP.
>>>
>>>
>>> 2007/10/17, David Marshall <ma...@cs.umass.edu>:
>>>
>>>
>>>> I'm not doing a System.loadLibrary. The library is needed by a
>>>> third-party jar that I am using. SInce it works from within Eclipse I
>>>> know that their jar and the shared object (.so file) work correctly
>>>> together and that the shared object is indeed in the correct location on
>>>> library path. Its only when I deploy to the production version of
>>>> Tomcat (on the same machine) that this stuff fails. At that point I
>>>> don't have Eclipse's VM parameter setting abilities available to me and
>>>> the only place to put it is in JAVA_OPTS. From the tomcat log file I
>>>> can see that the java.library.path is set as intended.
>>>>
>>>> I'll try your JSP idea just to be 100% the path is set correctly.
>>>>
>>>> Filip Hanik - Dev Lists wrote:
>>>>
>>>>
>>>>> and that your library is valid, and that you are calling
>>>>> System.loadLibrary with the correct name
>>>>>
>>>>> Filip
>>>>>
>>>>> David Marshall wrote:
>>>>>
>>>>>
>>>>>> Filip :
>>>>>>
>>>>>> Thanks. I didn't literally mean X. The library it won't load is
>>>>>> called Netica. I just changed it to X to be more general. I hope
>>>>>> I'm not just creating confusion for everyone.
>>>>>>
>>>>>> thanks
>>>>>> dm
>>>>>>
>>>>>> Filip Hanik - Dev Lists wrote:
>>>>>>
>>>>>>
>>>>>>> I believe there is a
>>>>>>> -Djava.awt.headless=true
>>>>>>>
>>>>>>> or something like that, so that it doesn't try to load your X
>>>>>>> windows environment
>>>>>>>
>>>>>>> Filip
>>>>>>>
>>>>>>> David Marshall wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Using Tomcat 5.5 on Linux.
>>>>>>>> I've set my environment variable with export
>>>>>>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>>>>>>>>
>>>>>>>> After restarting tomcat and hitting my servlet (which depends on
>>>>>>>> the .so file in the folder above) I get an UnsatisfiedLinkError no
>>>>>>>> X found in java.library.path
>>>>>>>>
>>>>>>>> I've looked in catalina.out and see a message that says that The
>>>>>>>> Apache Tomcat Native library cannot be found on java.library.path:
>>>>>>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is
>>>>>>>> using the path at least when it starts up. I've seen other Linux
>>>>>>>> Tomcat users raising this same problem and not getting any
>>>>>>>> answers. Within Eclipse I can run Tomcat and configure a VM
>>>>>>>> parameter for java.library.path and my library is successfully
>>>>>>>> found when the servlet runs so this issue only pertains to running
>>>>>>>> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
>>>>>>>> start)
>>>>>>>>
>>>>>>>> What could be wrong?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> 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
>>>>>
>>>>>
>>>> --
>>>> David Marshall
>>>> Staff Software Engineer
>>>> Center For Knowledge Communication
>>>> Computer Science Dept.
>>>> University of Massachusetts - Amherst
>>>> www.cs.umass.edu/~marshall
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>> --
>> David Marshall
>> Staff Software Engineer
>> Center For Knowledge Communication
>> Computer Science Dept.
>> University of Massachusetts - Amherst
>> www.cs.umass.edu/~marshall
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: java.library.path / Unsatisfied Link Error problem with Linux Tomcat 5.5
Posted by Konstantin Kolinko <kn...@gmail.com>.
Does the native library consist of a single .so file, or there are several ones?
See the second "NOTE MEG" here:
http://wrapper.tanukisoftware.org/doc/english/prop-java-library-path-n.html
It is about requirements for LD_LIBRARY_PATH if there are several libraries.
Does your printenv mention the value of LD_LIBRARY_PATH? Is there any
difference compared to when you are running Eclipse?
2007/10/17, David Marshall <ma...@cs.umass.edu>:
> The results of printing System.getProperty("java.library.path") in the
> jsp does show the correct path to my shared object....
> >
> > Looking forward to your results with JSP.
> >
> >
> > 2007/10/17, David Marshall <ma...@cs.umass.edu>:
> >
> >> I'm not doing a System.loadLibrary. The library is needed by a
> >> third-party jar that I am using. SInce it works from within Eclipse I
> >> know that their jar and the shared object (.so file) work correctly
> >> together and that the shared object is indeed in the correct location on
> >> library path. Its only when I deploy to the production version of
> >> Tomcat (on the same machine) that this stuff fails. At that point I
> >> don't have Eclipse's VM parameter setting abilities available to me and
> >> the only place to put it is in JAVA_OPTS. From the tomcat log file I
> >> can see that the java.library.path is set as intended.
> >>
> >> I'll try your JSP idea just to be 100% the path is set correctly.
> >>
> >> Filip Hanik - Dev Lists wrote:
> >>
> >>> and that your library is valid, and that you are calling
> >>> System.loadLibrary with the correct name
> >>>
> >>> Filip
> >>>
> >>> David Marshall wrote:
> >>>
> >>>> Filip :
> >>>>
> >>>> Thanks. I didn't literally mean X. The library it won't load is
> >>>> called Netica. I just changed it to X to be more general. I hope
> >>>> I'm not just creating confusion for everyone.
> >>>>
> >>>> thanks
> >>>> dm
> >>>>
> >>>> Filip Hanik - Dev Lists wrote:
> >>>>
> >>>>> I believe there is a
> >>>>> -Djava.awt.headless=true
> >>>>>
> >>>>> or something like that, so that it doesn't try to load your X
> >>>>> windows environment
> >>>>>
> >>>>> Filip
> >>>>>
> >>>>> David Marshall wrote:
> >>>>>
> >>>>>> Using Tomcat 5.5 on Linux.
> >>>>>> I've set my environment variable with export
> >>>>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
> >>>>>>
> >>>>>> After restarting tomcat and hitting my servlet (which depends on
> >>>>>> the .so file in the folder above) I get an UnsatisfiedLinkError no
> >>>>>> X found in java.library.path
> >>>>>>
> >>>>>> I've looked in catalina.out and see a message that says that The
> >>>>>> Apache Tomcat Native library cannot be found on java.library.path:
> >>>>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is
> >>>>>> using the path at least when it starts up. I've seen other Linux
> >>>>>> Tomcat users raising this same problem and not getting any
> >>>>>> answers. Within Eclipse I can run Tomcat and configure a VM
> >>>>>> parameter for java.library.path and my library is successfully
> >>>>>> found when the servlet runs so this issue only pertains to running
> >>>>>> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
> >>>>>> start)
> >>>>>>
> >>>>>> What could be wrong?
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> 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
> >>>
> >> --
> >> David Marshall
> >> Staff Software Engineer
> >> Center For Knowledge Communication
> >> Computer Science Dept.
> >> University of Massachusetts - Amherst
> >> www.cs.umass.edu/~marshall
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
>
> --
> David Marshall
> Staff Software Engineer
> Center For Knowledge Communication
> Computer Science Dept.
> University of Massachusetts - Amherst
> www.cs.umass.edu/~marshall
>
>
>
> ---------------------------------------------------------------------
> 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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by David Marshall <ma...@cs.umass.edu>.
The results of printing System.getProperty("java.library.path") in the
jsp does show the correct path to my shared object....
>
> Looking forward to your results with JSP.
>
>
> 2007/10/17, David Marshall <ma...@cs.umass.edu>:
>
>> I'm not doing a System.loadLibrary. The library is needed by a
>> third-party jar that I am using. SInce it works from within Eclipse I
>> know that their jar and the shared object (.so file) work correctly
>> together and that the shared object is indeed in the correct location on
>> library path. Its only when I deploy to the production version of
>> Tomcat (on the same machine) that this stuff fails. At that point I
>> don't have Eclipse's VM parameter setting abilities available to me and
>> the only place to put it is in JAVA_OPTS. From the tomcat log file I
>> can see that the java.library.path is set as intended.
>>
>> I'll try your JSP idea just to be 100% the path is set correctly.
>>
>> Filip Hanik - Dev Lists wrote:
>>
>>> and that your library is valid, and that you are calling
>>> System.loadLibrary with the correct name
>>>
>>> Filip
>>>
>>> David Marshall wrote:
>>>
>>>> Filip :
>>>>
>>>> Thanks. I didn't literally mean X. The library it won't load is
>>>> called Netica. I just changed it to X to be more general. I hope
>>>> I'm not just creating confusion for everyone.
>>>>
>>>> thanks
>>>> dm
>>>>
>>>> Filip Hanik - Dev Lists wrote:
>>>>
>>>>> I believe there is a
>>>>> -Djava.awt.headless=true
>>>>>
>>>>> or something like that, so that it doesn't try to load your X
>>>>> windows environment
>>>>>
>>>>> Filip
>>>>>
>>>>> David Marshall wrote:
>>>>>
>>>>>> Using Tomcat 5.5 on Linux.
>>>>>> I've set my environment variable with export
>>>>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>>>>>>
>>>>>> After restarting tomcat and hitting my servlet (which depends on
>>>>>> the .so file in the folder above) I get an UnsatisfiedLinkError no
>>>>>> X found in java.library.path
>>>>>>
>>>>>> I've looked in catalina.out and see a message that says that The
>>>>>> Apache Tomcat Native library cannot be found on java.library.path:
>>>>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is
>>>>>> using the path at least when it starts up. I've seen other Linux
>>>>>> Tomcat users raising this same problem and not getting any
>>>>>> answers. Within Eclipse I can run Tomcat and configure a VM
>>>>>> parameter for java.library.path and my library is successfully
>>>>>> found when the servlet runs so this issue only pertains to running
>>>>>> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
>>>>>> start)
>>>>>>
>>>>>> What could be wrong?
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>> --
>> David Marshall
>> Staff Software Engineer
>> Center For Knowledge Communication
>> Computer Science Dept.
>> University of Massachusetts - Amherst
>> www.cs.umass.edu/~marshall
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
--
David Marshall
Staff Software Engineer
Center For Knowledge Communication
Computer Science Dept.
University of Massachusetts - Amherst
www.cs.umass.edu/~marshall
---------------------------------------------------------------------
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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by David Marshall <ma...@cs.umass.edu>.
Yes. its in TOMCAT_HOME/shared/lib
Konstantin Kolinko wrote:
> Is your third-party jar placed into the shared libraries folder as it should be?
>
> See
> http://wiki.apache.org/tomcat/HowTo#head-a4b7185ee95d0cf14a48f92c08d1eb66b561139d
> http://forum.java.sun.com/thread.jspa?threadID=780109
>
> See also
> http://java.sun.com/docs/books/jni/html/design.html
> chapters 11.2.3 and 11.2.4.
>
> Is the script file /etc/init.d/tomcat editable for you? E.g., to
> define the JAVA_OPTS there? Or you are defining them in a profile file
> of the user that is su-ed to run the tomcat?
>
> Looking forward to your results with JSP.
>
>
> 2007/10/17, David Marshall <ma...@cs.umass.edu>:
>
>> I'm not doing a System.loadLibrary. The library is needed by a
>> third-party jar that I am using. SInce it works from within Eclipse I
>> know that their jar and the shared object (.so file) work correctly
>> together and that the shared object is indeed in the correct location on
>> library path. Its only when I deploy to the production version of
>> Tomcat (on the same machine) that this stuff fails. At that point I
>> don't have Eclipse's VM parameter setting abilities available to me and
>> the only place to put it is in JAVA_OPTS. From the tomcat log file I
>> can see that the java.library.path is set as intended.
>>
>> I'll try your JSP idea just to be 100% the path is set correctly.
>>
>> Filip Hanik - Dev Lists wrote:
>>
>>> and that your library is valid, and that you are calling
>>> System.loadLibrary with the correct name
>>>
>>> Filip
>>>
>>> David Marshall wrote:
>>>
>>>> Filip :
>>>>
>>>> Thanks. I didn't literally mean X. The library it won't load is
>>>> called Netica. I just changed it to X to be more general. I hope
>>>> I'm not just creating confusion for everyone.
>>>>
>>>> thanks
>>>> dm
>>>>
>>>> Filip Hanik - Dev Lists wrote:
>>>>
>>>>> I believe there is a
>>>>> -Djava.awt.headless=true
>>>>>
>>>>> or something like that, so that it doesn't try to load your X
>>>>> windows environment
>>>>>
>>>>> Filip
>>>>>
>>>>> David Marshall wrote:
>>>>>
>>>>>> Using Tomcat 5.5 on Linux.
>>>>>> I've set my environment variable with export
>>>>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>>>>>>
>>>>>> After restarting tomcat and hitting my servlet (which depends on
>>>>>> the .so file in the folder above) I get an UnsatisfiedLinkError no
>>>>>> X found in java.library.path
>>>>>>
>>>>>> I've looked in catalina.out and see a message that says that The
>>>>>> Apache Tomcat Native library cannot be found on java.library.path:
>>>>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is
>>>>>> using the path at least when it starts up. I've seen other Linux
>>>>>> Tomcat users raising this same problem and not getting any
>>>>>> answers. Within Eclipse I can run Tomcat and configure a VM
>>>>>> parameter for java.library.path and my library is successfully
>>>>>> found when the servlet runs so this issue only pertains to running
>>>>>> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
>>>>>> start)
>>>>>>
>>>>>> What could be wrong?
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>> --
>> David Marshall
>> Staff Software Engineer
>> Center For Knowledge Communication
>> Computer Science Dept.
>> University of Massachusetts - Amherst
>> www.cs.umass.edu/~marshall
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
--
David Marshall
Staff Software Engineer
Center For Knowledge Communication
Computer Science Dept.
University of Massachusetts - Amherst
www.cs.umass.edu/~marshall
---------------------------------------------------------------------
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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by David Marshall <ma...@cs.umass.edu>.
Solved!
I found the source of the problem after following your links below.
Not only do you need to place the jar file in the tomcat/shared/lib
folder, you need to place the .so there and then adjust the
java.library.path
on JAVA_OPTS to point there. My .so was originally living in a
directory under my user. I also made sure that the .so is owned by the
tomcat user and is set for execute privileges. Not sure if all those
things are strictly necessary, but certainly the placement of the .so in
the shared/lib folder is.
Thanks very much to you all for continuing to generate ideas for me to
try out!!!
Konstantin Kolinko wrote:
> Is your third-party jar placed into the shared libraries folder as it should be?
>
> See
> http://wiki.apache.org/tomcat/HowTo#head-a4b7185ee95d0cf14a48f92c08d1eb66b561139d
> http://forum.java.sun.com/thread.jspa?threadID=780109
>
> See also
> http://java.sun.com/docs/books/jni/html/design.html
> chapters 11.2.3 and 11.2.4.
>
> Is the script file /etc/init.d/tomcat editable for you? E.g., to
> define the JAVA_OPTS there? Or you are defining them in a profile file
> of the user that is su-ed to run the tomcat?
>
> Looking forward to your results with JSP.
>
>
> 2007/10/17, David Marshall <ma...@cs.umass.edu>:
>
>> I'm not doing a System.loadLibrary. The library is needed by a
>> third-party jar that I am using. SInce it works from within Eclipse I
>> know that their jar and the shared object (.so file) work correctly
>> together and that the shared object is indeed in the correct location on
>> library path. Its only when I deploy to the production version of
>> Tomcat (on the same machine) that this stuff fails. At that point I
>> don't have Eclipse's VM parameter setting abilities available to me and
>> the only place to put it is in JAVA_OPTS. From the tomcat log file I
>> can see that the java.library.path is set as intended.
>>
>> I'll try your JSP idea just to be 100% the path is set correctly.
>>
>> Filip Hanik - Dev Lists wrote:
>>
>>> and that your library is valid, and that you are calling
>>> System.loadLibrary with the correct name
>>>
>>> Filip
>>>
>>> David Marshall wrote:
>>>
>>>> Filip :
>>>>
>>>> Thanks. I didn't literally mean X. The library it won't load is
>>>> called Netica. I just changed it to X to be more general. I hope
>>>> I'm not just creating confusion for everyone.
>>>>
>>>> thanks
>>>> dm
>>>>
>>>> Filip Hanik - Dev Lists wrote:
>>>>
>>>>> I believe there is a
>>>>> -Djava.awt.headless=true
>>>>>
>>>>> or something like that, so that it doesn't try to load your X
>>>>> windows environment
>>>>>
>>>>> Filip
>>>>>
>>>>> David Marshall wrote:
>>>>>
>>>>>> Using Tomcat 5.5 on Linux.
>>>>>> I've set my environment variable with export
>>>>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>>>>>>
>>>>>> After restarting tomcat and hitting my servlet (which depends on
>>>>>> the .so file in the folder above) I get an UnsatisfiedLinkError no
>>>>>> X found in java.library.path
>>>>>>
>>>>>> I've looked in catalina.out and see a message that says that The
>>>>>> Apache Tomcat Native library cannot be found on java.library.path:
>>>>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is
>>>>>> using the path at least when it starts up. I've seen other Linux
>>>>>> Tomcat users raising this same problem and not getting any
>>>>>> answers. Within Eclipse I can run Tomcat and configure a VM
>>>>>> parameter for java.library.path and my library is successfully
>>>>>> found when the servlet runs so this issue only pertains to running
>>>>>> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
>>>>>> start)
>>>>>>
>>>>>> What could be wrong?
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>> --
>> David Marshall
>> Staff Software Engineer
>> Center For Knowledge Communication
>> Computer Science Dept.
>> University of Massachusetts - Amherst
>> www.cs.umass.edu/~marshall
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
--
David Marshall
Staff Software Engineer
Center For Knowledge Communication
Computer Science Dept.
University of Massachusetts - Amherst
www.cs.umass.edu/~marshall
---------------------------------------------------------------------
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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by David Marshall <ma...@cs.umass.edu>.
I have tried editing the tomcat scripts (catalina.sh) to set JAVA_OPTS
in there and it didn't solve the problem.
Currently I set the JAVA_OPTS in my user .bashrc and .bash_profile. So
when I run the startup script the user is me ( I have to run the script with
sudo). I'm verifying that JAVA_OPTS is set with a printenv before
running tomcat start
> Is the script file /etc/init.d/tomcat editable for you? E.g., to
> define the JAVA_OPTS there? Or you are defining them in a profile file
> of the user that is su-ed to run the tomcat?
>
> Looking forward to your results with JSP.
>
>>>>
>>>> Thanks. I didn't literally mean X. The library it won't load is
>>>> called Netica. I just changed it to X to be more general. I hope
>>>> I'm not just creating confusion for everyone.
>>>>
>>>> thanks
>>>> dm
>>>>
>>>> Filip Hanik - Dev Lists wrote:
>>>>
>>>>> I believe there is a
>>>>> -Djava.awt.headless=true
>>>>>
>>>>> or something like that, so that it doesn't try to load your X
>>>>> windows environment
>>>>>
>>>>> Filip
>>>>>
>>>>> David Marshall wrote:
>>>>>
>>>>>> Using Tomcat 5.5 on Linux.
>>>>>> I've set my environment variable with export
>>>>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>>>>>>
>>>>>> After restarting tomcat and hitting my servlet (which depends on
>>>>>> the .so file in the folder above) I get an UnsatisfiedLinkError no
>>>>>> X found in java.library.path
>>>>>>
>>>>>> I've looked in catalina.out and see a message that says that The
>>>>>> Apache Tomcat Native library cannot be found on java.library.path:
>>>>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is
>>>>>> using the path at least when it starts up. I've seen other Linux
>>>>>> Tomcat users raising this same problem and not getting any
>>>>>> answers. Within Eclipse I can run Tomcat and configure a VM
>>>>>> parameter for java.library.path and my library is successfully
>>>>>> found when the servlet runs so this issue only pertains to running
>>>>>> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
>>>>>> start)
>>>>>>
>>>>>> What could be wrong?
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>> --
>> David Marshall
>> Staff Software Engineer
>> Center For Knowledge Communication
>> Computer Science Dept.
>> University of Massachusetts - Amherst
>> www.cs.umass.edu/~marshall
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
--
David Marshall
Staff Software Engineer
Center For Knowledge Communication
Computer Science Dept.
University of Massachusetts - Amherst
www.cs.umass.edu/~marshall
---------------------------------------------------------------------
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: java.library.path / Unsatisfied Link Error problem with Linux Tomcat 5.5
Posted by Konstantin Kolinko <kn...@gmail.com>.
Is your third-party jar placed into the shared libraries folder as it should be?
See
http://wiki.apache.org/tomcat/HowTo#head-a4b7185ee95d0cf14a48f92c08d1eb66b561139d
http://forum.java.sun.com/thread.jspa?threadID=780109
See also
http://java.sun.com/docs/books/jni/html/design.html
chapters 11.2.3 and 11.2.4.
Is the script file /etc/init.d/tomcat editable for you? E.g., to
define the JAVA_OPTS there? Or you are defining them in a profile file
of the user that is su-ed to run the tomcat?
Looking forward to your results with JSP.
2007/10/17, David Marshall <ma...@cs.umass.edu>:
> I'm not doing a System.loadLibrary. The library is needed by a
> third-party jar that I am using. SInce it works from within Eclipse I
> know that their jar and the shared object (.so file) work correctly
> together and that the shared object is indeed in the correct location on
> library path. Its only when I deploy to the production version of
> Tomcat (on the same machine) that this stuff fails. At that point I
> don't have Eclipse's VM parameter setting abilities available to me and
> the only place to put it is in JAVA_OPTS. From the tomcat log file I
> can see that the java.library.path is set as intended.
>
> I'll try your JSP idea just to be 100% the path is set correctly.
>
> Filip Hanik - Dev Lists wrote:
> > and that your library is valid, and that you are calling
> > System.loadLibrary with the correct name
> >
> > Filip
> >
> > David Marshall wrote:
> >> Filip :
> >>
> >> Thanks. I didn't literally mean X. The library it won't load is
> >> called Netica. I just changed it to X to be more general. I hope
> >> I'm not just creating confusion for everyone.
> >>
> >> thanks
> >> dm
> >>
> >> Filip Hanik - Dev Lists wrote:
> >>> I believe there is a
> >>> -Djava.awt.headless=true
> >>>
> >>> or something like that, so that it doesn't try to load your X
> >>> windows environment
> >>>
> >>> Filip
> >>>
> >>> David Marshall wrote:
> >>>> Using Tomcat 5.5 on Linux.
> >>>> I've set my environment variable with export
> >>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
> >>>>
> >>>> After restarting tomcat and hitting my servlet (which depends on
> >>>> the .so file in the folder above) I get an UnsatisfiedLinkError no
> >>>> X found in java.library.path
> >>>>
> >>>> I've looked in catalina.out and see a message that says that The
> >>>> Apache Tomcat Native library cannot be found on java.library.path:
> >>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is
> >>>> using the path at least when it starts up. I've seen other Linux
> >>>> Tomcat users raising this same problem and not getting any
> >>>> answers. Within Eclipse I can run Tomcat and configure a VM
> >>>> parameter for java.library.path and my library is successfully
> >>>> found when the servlet runs so this issue only pertains to running
> >>>> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
> >>>> start)
> >>>>
> >>>> What could be wrong?
> >>>>
> >>>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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
>
> --
> David Marshall
> Staff Software Engineer
> Center For Knowledge Communication
> Computer Science Dept.
> University of Massachusetts - Amherst
> www.cs.umass.edu/~marshall
>
>
>
> ---------------------------------------------------------------------
> 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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by David Marshall <ma...@cs.umass.edu>.
I'm not doing a System.loadLibrary. The library is needed by a
third-party jar that I am using. SInce it works from within Eclipse I
know that their jar and the shared object (.so file) work correctly
together and that the shared object is indeed in the correct location on
library path. Its only when I deploy to the production version of
Tomcat (on the same machine) that this stuff fails. At that point I
don't have Eclipse's VM parameter setting abilities available to me and
the only place to put it is in JAVA_OPTS. From the tomcat log file I
can see that the java.library.path is set as intended.
I'll try your JSP idea just to be 100% the path is set correctly.
Filip Hanik - Dev Lists wrote:
> and that your library is valid, and that you are calling
> System.loadLibrary with the correct name
>
> Filip
>
> David Marshall wrote:
>> Filip :
>>
>> Thanks. I didn't literally mean X. The library it won't load is
>> called Netica. I just changed it to X to be more general. I hope
>> I'm not just creating confusion for everyone.
>>
>> thanks
>> dm
>>
>> Filip Hanik - Dev Lists wrote:
>>> I believe there is a
>>> -Djava.awt.headless=true
>>>
>>> or something like that, so that it doesn't try to load your X
>>> windows environment
>>>
>>> Filip
>>>
>>> David Marshall wrote:
>>>> Using Tomcat 5.5 on Linux.
>>>> I've set my environment variable with export
>>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>>>>
>>>> After restarting tomcat and hitting my servlet (which depends on
>>>> the .so file in the folder above) I get an UnsatisfiedLinkError no
>>>> X found in java.library.path
>>>>
>>>> I've looked in catalina.out and see a message that says that The
>>>> Apache Tomcat Native library cannot be found on java.library.path:
>>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is
>>>> using the path at least when it starts up. I've seen other Linux
>>>> Tomcat users raising this same problem and not getting any
>>>> answers. Within Eclipse I can run Tomcat and configure a VM
>>>> parameter for java.library.path and my library is successfully
>>>> found when the servlet runs so this issue only pertains to running
>>>> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat
>>>> start)
>>>>
>>>> What could be wrong?
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
--
David Marshall
Staff Software Engineer
Center For Knowledge Communication
Computer Science Dept.
University of Massachusetts - Amherst
www.cs.umass.edu/~marshall
---------------------------------------------------------------------
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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
and that your library is valid, and that you are calling
System.loadLibrary with the correct name
Filip
David Marshall wrote:
> Filip :
>
> Thanks. I didn't literally mean X. The library it won't load is
> called Netica. I just changed it to X to be more general. I hope
> I'm not just creating confusion for everyone.
>
> thanks
> dm
>
> Filip Hanik - Dev Lists wrote:
>> I believe there is a
>> -Djava.awt.headless=true
>>
>> or something like that, so that it doesn't try to load your X windows
>> environment
>>
>> Filip
>>
>> David Marshall wrote:
>>> Using Tomcat 5.5 on Linux.
>>> I've set my environment variable with export
>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>>>
>>> After restarting tomcat and hitting my servlet (which depends on the
>>> .so file in the folder above) I get an UnsatisfiedLinkError no X
>>> found in java.library.path
>>>
>>> I've looked in catalina.out and see a message that says that The
>>> Apache Tomcat Native library cannot be found on java.library.path:
>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is using
>>> the path at least when it starts up. I've seen other Linux Tomcat
>>> users raising this same problem and not getting any answers.
>>> Within Eclipse I can run Tomcat and configure a VM parameter for
>>> java.library.path and my library is successfully found when the
>>> servlet runs so this issue only pertains to running tomcat directly
>>> from the startup scripts (e.g. /etc/init.d/tomcat start)
>>>
>>> What could be wrong?
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
yeah, changing the error message wont help anyone, especially yourself :)
make sure that your -D parameter actually took in effect, and that you
didn't put it in the wrong place. easiest way to check, have a JSP print
out the system property for you
Filip
David Marshall wrote:
> Filip :
>
> Thanks. I didn't literally mean X. The library it won't load is
> called Netica. I just changed it to X to be more general. I hope
> I'm not just creating confusion for everyone.
>
> thanks
> dm
>
> Filip Hanik - Dev Lists wrote:
>> I believe there is a
>> -Djava.awt.headless=true
>>
>> or something like that, so that it doesn't try to load your X windows
>> environment
>>
>> Filip
>>
>> David Marshall wrote:
>>> Using Tomcat 5.5 on Linux.
>>> I've set my environment variable with export
>>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>>>
>>> After restarting tomcat and hitting my servlet (which depends on the
>>> .so file in the folder above) I get an UnsatisfiedLinkError no X
>>> found in java.library.path
>>>
>>> I've looked in catalina.out and see a message that says that The
>>> Apache Tomcat Native library cannot be found on java.library.path:
>>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is using
>>> the path at least when it starts up. I've seen other Linux Tomcat
>>> users raising this same problem and not getting any answers.
>>> Within Eclipse I can run Tomcat and configure a VM parameter for
>>> java.library.path and my library is successfully found when the
>>> servlet runs so this issue only pertains to running tomcat directly
>>> from the startup scripts (e.g. /etc/init.d/tomcat start)
>>>
>>> What could be wrong?
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by David Marshall <ma...@cs.umass.edu>.
Filip :
Thanks. I didn't literally mean X. The library it won't load is
called Netica. I just changed it to X to be more general. I hope I'm
not just creating confusion for everyone.
thanks
dm
Filip Hanik - Dev Lists wrote:
> I believe there is a
> -Djava.awt.headless=true
>
> or something like that, so that it doesn't try to load your X windows
> environment
>
> Filip
>
> David Marshall wrote:
>> Using Tomcat 5.5 on Linux.
>> I've set my environment variable with export
>> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>>
>> After restarting tomcat and hitting my servlet (which depends on the
>> .so file in the folder above) I get an UnsatisfiedLinkError no X
>> found in java.library.path
>>
>> I've looked in catalina.out and see a message that says that The
>> Apache Tomcat Native library cannot be found on java.library.path:
>> /path/to/my/sharedobjectfolder. So it appears that Tomcat is using
>> the path at least when it starts up. I've seen other Linux Tomcat
>> users raising this same problem and not getting any answers. Within
>> Eclipse I can run Tomcat and configure a VM parameter for
>> java.library.path and my library is successfully found when the
>> servlet runs so this issue only pertains to running tomcat directly
>> from the startup scripts (e.g. /etc/init.d/tomcat start)
>>
>> What could be wrong?
>>
>>
>
>
> ---------------------------------------------------------------------
> 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
--
David Marshall
Staff Software Engineer
Center For Knowledge Communication
Computer Science Dept.
University of Massachusetts - Amherst
www.cs.umass.edu/~marshall
---------------------------------------------------------------------
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: java.library.path / Unsatisfied Link Error problem with Linux
Tomcat 5.5
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
I believe there is a
-Djava.awt.headless=true
or something like that, so that it doesn't try to load your X windows
environment
Filip
David Marshall wrote:
> Using Tomcat 5.5 on Linux.
> I've set my environment variable with export
> JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
>
> After restarting tomcat and hitting my servlet (which depends on the
> .so file in the folder above) I get an UnsatisfiedLinkError no X found
> in java.library.path
>
> I've looked in catalina.out and see a message that says that The
> Apache Tomcat Native library cannot be found on java.library.path:
> /path/to/my/sharedobjectfolder. So it appears that Tomcat is using
> the path at least when it starts up.
> I've seen other Linux Tomcat users raising this same problem and not
> getting any answers. Within Eclipse I can run Tomcat and configure a
> VM parameter for java.library.path and my library is successfully
> found when the servlet runs so this issue only pertains to running
> tomcat directly from the startup scripts (e.g. /etc/init.d/tomcat start)
>
> What could be wrong?
>
>
---------------------------------------------------------------------
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