• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

UnsatisfiedLinkError

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have Java code that generates the following error:

HTTP JVM: [Signaling in VM: java/lang/UnsatisfiedLinkError, message: /opt/lotus/notes/65040/ibmpow/libXfoJavaCtl.so: load ENOENT on shared library(s)]


The code is as follows. It fails on the line: axfo = new XfoObj();

import lotus.domino.*;
import java.io.*;
import java.util.*;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
import jp.co.antenna.XfoJavaCtl.*;

public class JavaAgent extends AgentBase {
public void NotesMain() {
XfoObj axfo = null;
try {
Session session = getSession();
System.out.println("About to create an instance of \"XfoObj\" class . . .");
axfo = new XfoObj();
System.out.println("Created an instance of \"XfoObj\" class . . .");
} catch (Throwable th) {
th.printStackTrace();
} finally {
if (axfo != null) {
try {
axfo.releaseObjectEx();
System.out.println("\"XfoObj\" instance released . . .");
} catch (Throwable th) {
th.printStackTrace();
}
axfo = null;
}
System.runFinalization();
System.gc();
}
}
}

I'd appreciate any suggestions on how to resolve this error.


Additional details:

The file 'libXfoJavaCtl.so' comes with third party software (Antenna House) which is integrated with a Domino application. I tried copying this file
from its original location in the Antenna House 'lib' directory
to the directory '/opt/lotus/notes/65040/ibmpow'. However, the Java code still does not run to completion.

Thanks.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error means that the native library cannot be found. You say you moved it to the lib directory. Did you also set the PATH or LD_LIBRARY_PATH or whatever it's called on your operating system so that it includes the lib directory?

Instead of setting the platform-specific environment variable, you can also set the Java system variable java.library.path to point to the directory that contains the native library. You do that by adding an extra parameter to the command line:

java -Djava.library.path=path to lib dir mypackage.MyClass
[ August 26, 2006: Message edited by: Jesper Young ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic