7

I'm running a Java application on a Linux server that uses Tibco RV and I get the following error:

TibrvException[error=901,message=Library not found: tibrvj]

What is causing this problem?

I have already added lib path containing *.so into LD_LIBRARY_PATH but still the same result.

UPDATE:

Currently, I have <MyApp>/libs/tibrvj.jar added into classpath. The tibrvj.jar was copied from Windows environment to the Linux box where I'm running my application. I removed this from the classpath and added another reference <TibcoDirectory>/libs/tibrvj.jar and it FIXED the problem. They have different sizes with the previous file and there's probably a difference between the one copied from Windows and the one currently in the Linux box. Can someone explain why is this so?

Nikolay Fominyh
  • 8,946
  • 8
  • 66
  • 102
jasonline
  • 8,646
  • 19
  • 59
  • 80

5 Answers5

9

I had the same problem, and I fixed it doing the following:

  1. File tibrvj.jar is present in the classpath of my application
  2. File tibrvj.dll is present via java library path. This file is usually located at bin directory in Tibco Rendezvous home directory (e.g. C:/tibco/tibrv/8.2/bin)
  3. The installed java version is compatible with the installed tibco version.

My environment is:

  1. Windows 7, 64bits
  2. Tibco Rendezvous 8.2, 64bits
  3. JDK 1.6u29, 64bits

Before, I had installed a JDK 1.6u17, for a i586 processor and when I tried to load the library using:

System.loadLibrary("tibrvj");

I got this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\TIBCO\tibrv\8.2\bin\tibrvj.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform

It gave me the clue to instal the correct java version.

rchavarria
  • 930
  • 10
  • 16
  • The keys are 1 - Right Java version, 2 - tibrvj.jar in classpath 3- tibrvj.dll in environment variable PATH. You can do it adding to PATH [TIBCO_PATH]\bin – AntuanSoft Dec 20 '18 at 09:21
2

Have you loaded the library using System.loadLibrary("tibrvj")? Have you added it to java.library.path?

DaveH
  • 7,187
  • 5
  • 32
  • 53
  • I loaded it using Tibrv.open(Tibrv.IMPL_NATIVE). – jasonline Mar 29 '11 at 09:04
  • Not sure what you mean there - I believe that in order to use a native library you have to load in once into the JVM so that the classloader knows about it. Typically I'd do this in a static initializer. Is the Tibrv.open() statement you mention above in your java? – DaveH Mar 29 '11 at 09:11
  • And what is Tibrv? One of your own objects or something supplied by Tivco? – DaveH Mar 29 '11 at 09:35
  • Tibrv is a class provided by Tibco, as in com.tibco.tibrv.Tibrv. – jasonline Mar 29 '11 at 09:38
1

Use :

java -Djava.library.path=/opt/tibco/tibrv/lib -cp {}.jar

LD_LIBRARY_PATH=/opt/tibco/tibrv/lib export LD_LIBRARY_PATH

Then **System.loadLibrary("tibrvj");**

Derrick
  • 3,669
  • 5
  • 35
  • 50
Linza
  • 11
  • 1
0

The answers by rchavarria and DaveHowes helped, but for me the problem was that my IDE was overriding the PATH variable (and hence java.library.path) when running my project.

Removing this override made it work, as outside the IDE tibrv was already on the PATH.

Ben Challenor
  • 3,365
  • 1
  • 35
  • 35
0

Are you using Wrappers?

Do you have java.library.path set in your wrapper.conf? I had java.library.path set in wrapper.conf, correct this value fixed the issue for me.

Syed Siraj Uddin
  • 583
  • 1
  • 5
  • 13