Loading native libraries

Hi,
The other day a came across an UnsatisfiedLinkError with the message "... already loaded in another classloader". I saw the JNI specification states a native library is only permitted to be loaded by a single classloader. My question is why is this the case? What if I have two indipendent applications running on the same JVM instance, and both rely on the same native library? the problem with these native libraries is that there is no classloader delegation architecture when loading one(as there is with java classes), the library will always be loaded by the calling classes' classloader. So what can a developer do? What is the idea behind this behavior?
Any help is appreciated....

Thanks for your answers,
The thing is -
1) I don't really want to load the library again, I
simply wish there will be no exception if I attempt to
load it again from a different classloader. After all,
what does it matter from which classloader i try to
load the library? If it is the same classloader the
method will simply return as if it loaded the lib
succesfully(even though it didn't since it detected
it's already loaded), why should there be any
difference if it's not the same classloader? the
library is already loaded anyway, all classes in the
JVM instance will have access to it anyway....Write the code so that it checks for the already loaded exception.
2) What if I one of my applications is a "third party"
app in which I cannot change the code to load the
library through my "library loader"?You are probably out of luck.
Although I would question why you would want a third party library used by mutliple applications to be individually loaded. In J2EE containers the database drivers are loaded outside the class loaders probably for similar reasons.

Similar Messages

  • Problem in loading Native libraries

    While trying to load native libraries I'm getting the following error message
    java.lang.UnsatisfiedLinkError: /XXX/XXX/libMySharedObj.so: ld.so.1: <JAVA_HOME>/bin/sparcv9/java: fatal: libskgxp10.so: open failed: No such file or directory
    At which place the 'libskgxp10.so' file should present and from where I can get a copy of the same?
    I'm using webLogic 8.15 on a solaris(5.8) box. The JVM has been started in 64bit mode with the options JAVA_VM="-server" and JAVA_OPTIONS="-d64" in the 'startWebLogic.sh' script.
    Any idea to fix this issue?

    Suspecting the same, I've tried to run the application in the same machine where the shared object has been created.
    This time I got the error message as
    java.lang.UnsatisfiedLinkError: /XXX/XXX/libMySharedObj.so: ld.so.1: <JAVA_HOME>/bin/java: fatal: /XXX/XXX/libMySharedObj.so: wrong ELF class: ELFCLASS64.
    I have created the native library 'libMySharedObj.so' by the following way
    gcc -c xxx.c
    gcc -c yyy.c
    gcc -c zzz.c
    ld -G xxx.o yyy.o zzz.o -o libMySharedObj.so -lm -lc -lpthreadPlease advice if I'm taking the wrong track somewhere or with any alternative approach.

  • Standalone OC4J 9.0.4 - Loading Native Libraries - Unsatisfied Link Error

    Hello,
    I incidentally happen to have a similar problem as has been described in several posts in this forum. The problem is that of loading Native libraries in OC4J.
    The scenario is
    1) Environment is Standalone OC4J 9.0.4, Windows 2000, JDK 1.4.2
    2) A Java wrapper loads DLL1 which internally loads DLL2.
    (To be more specific the DLL1 is a SAPSSOEXT.DLL and the DLL2 is SAPSECU.DLL. These are used for establishing SSO with SAP portal)
    The phase-1 of Java wrapper loading DLL1 is achieved by setting either the PATH or the java.library.path variables.
    The phase-2 of DLL1 loading DLL2 is what is failing with an Unsatisfied Link Error.
    Since I am using a standalone version and not a OC4J app-server, the OPMN related configuration for specified PATH variables will not be relevant here. Is there any other place where I can configure these.
    regards
    Shivaram

    A small correction to my observation above.
    The call to load DLL1 via System.loadLibrary() is successful. However when I attempt to call any method on it it fails with UnsatisfiedLinkError.
    Contrary to what was written above the error occured even before DLL1 attempted to load DLL2.
    So why is it that the call to loadLibrary is successful but the call to actual function is failing? (This works flawlessly on the command line)
    Is this a path problem, if so how do I configure it in OC4J standalone. Variables PATH, java.library.path, LD_LIBRARY_PATH none of them seem to have any effect on this.
    I tried debugging using a windows file monitor. The library DLL1 is being read from the correct path and is being opened successfully.
    Any suggestions will be greatly appreciated.

  • Native libraries in ABAP runtime

    Hello
    I have a question. Im developing application which is doing lots of XML processing (quite complicated and time consuming). Since XML support in ABAP itself its very poor we decided to use Java libraries on external server. Comunication between java and abap is done via Jco. But ... the best solution could be if we could use native libraries (java or C JNI wrapper to java) in ABAP. Is there a method or approach to expose interface in ABAP OO and then code implementation to use native library. How to deploy such library in R3.
    I saw that all classes from iXML are connected somehow to native runtime.
    Does anybody know how to do that, or just can point me to any documentation or example ?
    Best regards
    Marcin

    Can you make sure this native library is in the PATH(Windows) or LD_LIBRARY_PATH
    (UNIX)?
    Cameron Purdy wrote:
    That has nothing to do with it being an EJB. It just means it can't find the
    code to call.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "marc claeys" <[email protected]> wrote in message
    news:3cd7e60a$[email protected]..
    Everywhere I read not to use (load) native libraries in a bean.
    However I couldn't find a reason for not doing so I tried.
    The loading of the lib. is successful but when trying to call
    a function of it I receive:
    java.lang.UnsatisfiedLinkError: beanHelloWorld
    Could someone explain why this happens?
    Thanks in advance
    Marc
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • Using native libraries in web application (weblogic on linux)

    I have a problem with loading native libraries for use with my web application. Where do I have to put them in order for the server to see them? The same app on windows runs perfectly fine, because it has no problems finding the dll files.
              So far I have tried modifying the weblogic startup scripts, to include the library in LD_LIBRARY_PATH environment variable. I've also tried modifying the security policy just in case, but I don't think it's the case, because like I said, the app ran fine on windows without messing with the policies. So, any ideas, how I could load the libraries?
              The system is a WebLogic 8.1SP4 installed on Linux i386 using JRockit JVM, the native library in question is JAI 1.1.3-alpha native acceleration library.
              PS. if it's in the wrong group, please direct me to the correct one.

    <p>Fukiku,</p>
              <p>Did you get this working?</p>
              <p>You can also try setting the environment variable java.library.path.</p>
              <p>Please post your stack trace to the forum as well.</p>
              <p>
              Hussein Badakhchani</br>
              </p>

  • Native Libraries

    What is the effect of loading native libraries into a WLS instance? Is this
    forbidden/frowned upon/ok ?
    One effect we have seen is that may be related is that if a native library
    is not properly unloaded - either via WLS crash or just poor programming,
    restarting the WLS instance is not possible as it belives that the port is
    still in use (by another process) What is the relationship here?
    thanks,
    g

    Loading native libraries is not recommended, however, not forbidden.
    Writing a stable native code is not easy, if your native code screws up
    (such as memory leak), in most cases, weblogic will screw up too.
    For restarting, if you restart weblogic, weblogic can use its port. Once
    weblogic is killed, OS will release its port for reuse.
    My 2 cents.
    Cheers - Wei
    Garrick Evans <[email protected]> wrote in message
    news:8itojp$b0j$[email protected]..
    What is the effect of loading native libraries into a WLS instance? Isthis
    forbidden/frowned upon/ok ?
    One effect we have seen is that may be related is that if a native library
    is not properly unloaded - either via WLS crash or just poor programming,
    restarting the WLS instance is not possible as it belives that the port is
    still in use (by another process) What is the relationship here?
    thanks,
    g

  • Error 0(Native: listNetInterfaces:[3]) and error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

    Hi Gurus,
    I'm trying to upgrade my test 9.2.0.8 rac to 10.1 rac. I cannot upgrade to 10.2 because of RAM limitations on my test RAC. 10.1 Clusterware software was successfully installed and the daemons are up with OCR and voting disk created. Then during the installation of RAC software at the end, root.sh needs to be run. When I run root.sh, it gave the error: while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory. I have libpthread.so.0 in /lib. I looked up on metalink and found Doc ID: 414163.1 . I unset the LD_ASSUME_KERNEL in vipca (unsetting of LD_ASSUME_KERNEL was not required in srvctl because there was no LD_ASSUME_KERNEL in srvctl). Then I tried to run vipca manually. I receive the following error: Error 0(Native: listNetInterfaces:[3]). I'm able to see xclock and xeyes. So its not a problem with x.
    OS: OEL5 32 bit
    oifcfg iflist
    eth0 192.168.2.0
    eth1 10.0.0.0
    oifcfg getif
    eth1 10.0.0.0 global cluster_interconnect
    eth1 10.1.1.0 global cluster_interconnect
    eth0 192.168.2.0 global public
    cat /etc/hosts
    192.168.2.3 sunny1pub.ezhome.com sunny1pub
    192.168.2.4 sunny2pub.ezhome.com sunny2pub
    192.168.2.33 sunny1vip.ezhome.com sunny1vip
    192.168.2.44 sunny2vip.ezhome.com sunny2vip
    10.1.1.1 sunny1prv.ezhome.com sunny1prv
    10.1.1.2 sunny2prv.ezhome.com sunny2prv
    My questions are:
    should ping on sunny1vip and sunny2vip be already working? As of now they dont work.
    if you look at oifcfg getif, I initially had eth1 10.0.0.0 global cluster_interconnect,eth0 192.168.2.0 global public then I created eth1 10.1.1.0 global cluster_interconnect with setif. Should it be 10.1.1.0 or 10.0.0.0. I looked at the subnet calculator and it says for 10.1.1.1, 10.0.0.0 is the subnet. In metalink they had used 10.10.10.0 and hence I used 10.1.1.0
    Any ideas on resolving this issue would be very much appreciated. I had been searching on oracle forums, google, metalink but all of them refer to DOC Id 414163.1 but it does n't seem to work. Please help. Thanks in advance.
    Edited by: ayyappa on Aug 20, 2009 10:13 AM
    Edited by: ayyappa on Aug 20, 2009 10:14 AM
    Edited by: ayyappa on Aug 20, 2009 10:15 AM

    a step forward towards resolution but i need some help from the gurus.
    root# cat /etc/hosts
    127.0.0.1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6
    192.168.2.3 sunny1pub.ezhome.com sunny1pub
    192.168.2.4 sunny2pub.ezhome.com sunny2pub
    10.1.1.1 sunny1prv.ezhome.com sunny1prv
    10.1.1.2 sunny2prv.ezhome.com sunny2prv
    192.168.2.33 sunny1vip.ezhome.com sunny1vip
    192.168.2.44 sunny2vip.ezhome.com sunny2vip
    root# /u01/app/oracle/product/crs/bin/oifcfg iflist
    eth1 10.0.0.0
    eth0 192.168.2.0
    root# /u01/app/oracle/product/crs/bin/oifcfg getif
    eth1 10.0.0.0 global cluster_interconnect
    eth0 191.168.2.0 global public
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    ****ORACLE_HOME environment variable not set!
    ORACLE_HOME should be set to the main directory that contain oracle products. set and export ORACLE_HOME, then re-run.
    root# export ORACLE_BASE=/u01/app/oracle
    root# export ORACLE_HOME=/u01/app/oracle/product/10.1.0/Db_1
    root# export ORA_CRS_HOME=/u01/app/oracle/product/crs
    root# export PATH=$PATH:$ORACLE_HOME/bin
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    VIP does not exist.
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl add nodeapps -n sunny1pub -o $ORACLE_HOME -A 192.168.2.33/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl add nodeapps -n sunny2pub -o $ORACLE_HOME -A 192.168.2.44/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    VIP exists.: sunny1vip.ezhome.com/192.168.2.33/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny2pub -a
    VIP exists.: sunny2vip.ezhome.com/192.168.2.44/255.255.255.0
    Once I execute the add nodeapps command as root on node 1, I was able to get vip exists for config nodeapps on node 2. The above 2 statements resulted me with same values on both nodes. After this I executed root.sh on both nodes, I did not receive any errors. It said CRS resources are already configured.
    My questions to the gurus are as follows:
    Should ping on vip work? It does not work now.
    srvctl status nodeapps -n sunny1pub(same result for sunny2pub)
    VIP is not running on node: sunny1pub
    GSD is not running on node: sunny1pub
    PRKO-2016 : Error in checking condition of listener on node: sunny1pub
    ONS daemon is not running on node: sunny1pub
    [root@sunny1pub ~]# /u01/app/oracle/product/crs/bin/crs_stat -t
    Name Type Target State Host
    ora....pub.gsd application OFFLINE OFFLINE
    ora....pub.ons application OFFLINE OFFLINE
    ora....pub.vip application OFFLINE OFFLINE
    ora....pub.gsd application OFFLINE OFFLINE
    ora....pub.ons application OFFLINE OFFLINE
    ora....pub.vip application OFFLINE OFFLINE
    Will crs_stat and srvctl status nodeapps -n sunny1pub work after I upgrade my database or should they be working now already? I just choose to install 10.1.0.3 software and after running root.sh on both nodes, I clicked ok and then the End of installation screen appeared. Under installed products, I see 9i home, 10g home, crs home. Under 10g home and crs home, I see cluster nodes(sunny1pub and sunny2pub) So it looks like the 10g software is installed.

  • Error while loading shared libraries: libglut.so.3: cannot open shared

    Hi, I bought the new Humble Bundle today and downloaded the tar.gz file for Fieldrunners (which is supposed to work under linux)
    "error while loading shared libraries: libglut.so.3: cannot open shared object file: No such file or directory" is the message I get when I put ./Fieldrunners into konsole after copying the fieldrunners folder into /opt
    I have freeglut-2.8.0-1 installed
    This is the README:
    This is Fieldrunners for Linux.
    It was built under Ubuntu 12.04 but is known to work in other distros.
    The only external dependancy is the freeglut3 library.
    To install:
      copy the fieldrunners directory (executable and game assets) to /opt
      copy the .fieldrunners directory (user options, achievements and saves) to your home directory.
    If you don't want to copy the fieldrunners directory to /opt, you can likely start fieldrunners from any folder and it will attempt to find the assets in the same folder as the executable.
    The executable /opt/fieldrunners/Fieldrunners will create the .fieldrunners directory in the home directory if not found.
    EDIT: Forgot to mention, there is no PKGBUILD file in the tar.gz
    Last edited by harsha (2012-08-15 23:43:19)

    My Fieldrunners says:
    cannot open audio device (Device or resource busy)
    Fieldrunners: pcm.c:928: snd_pcm_state: Assertion `pcm' failed.
    ... so I have to kill pulseaudio first (or use padsp). After that (with alsa), it has choppy sound. 1 second sound, one pause...
    Spacechem is windows binary + a wine'ish blob (that just freezes on my machine), comes only as rpm/deb and seems to insist to be installed in /opt (AND some files in /usr/share). The included .exe doesn't work with native wine either (without further adjustments at least).
    Doesn't really look good at all so far, this bundle.
    edit:
    Also: Uplink seems to be unplayable on a big resolution Display without workarounds due to its small font...?
    Spirits says:
    (Spirits-64:14143): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Fatal error reading PNG image file: Incompatible libpng version in application and library
    ... but seems to work fine at a first glance (safe for a missing picture in the launcher which isn't really tragic).
    edit:
    ( Aaaand, now I notice I'm in the wrong thread and/or forum. Where did that generic "is the bundle working?"-thread go? Stupid multi-tabbing xD )
    Last edited by whoops (2012-08-16 20:47:17)

  • Error Loading Native Library on Mac, but not XP

    In a program that I am making, I use JOGL and Odejava. Testing on Mac and Windows works fine loading JOGL's native libraries. However Odejava fails to load on Mac OS X but works fine on my Windows machine.
    The only difference is that JOGL uses just .jnilib's while Odejava has a jnilib as well as a dylib. All the jnilib's and dylib's are in the home directory. I also placed libodejava.jnilib into /Library/Java/Extensions and ode.dylib into /usr/lib/ as per the installation instructions for Odejava.
    When I try to run I get this error:
    java.lang.UnsatisfiedLinkError: /private/Network/Servers/students.central.spps.org/Users/idoneus/Documents/workspace/Idoneus_.03/libodejava.jnilib:
    The only three possible things that I could think of are that
    a)libodejava.jnilib has been corrupted, but I doubt that since I keep redownloading it.
    b)The Mac computer is in a lab that users remote access to a server for users, which might possibly confuse Java.
    c)libodejava.jnilib wasn't built correctly to actually look for the dylib
    Your help would be appreciated because I'm at my wits end.

    Neither Red Hat 2.1 nor Suse 8 are supported. Please try on a supported operating system. You can find the complete list here: http://e-docs.bea.com/jrockit/jrdocs/suppPlat/supp_plat.html
    Regards,
    /Staffan

  • The struggle of creating a Custom ClassLoader for Native libraries

    Hello Everyone,
    I'm having a really hard time writing and using my own ClassLoader in a Java Applet.
    Context :
    As the this link shows - http://codethesis.com/tutorial.php?id=1 - loading and especially unloading native libraries through Java requires defining our own ClassLoader, and use it to instantiate a class loading a library. When the class using native libraries has finished execution, setting all references to the classloader and calling the garbage collector will cause the native library to be unloaded. The class to load within the custom classloader is thus read byte after byte from the jar and defined using the Classloader.defineClass(..) function. So that's what I did. But I've got two problems.
    Problem 1 :
    On one single machine over 15 tested, the magic number of a given class read from the Jar using Applet.class.getResourceAsStream(classname) takes a value different from CAFEBABE and the defineClass function then throws an "Incompatible magic value" exception (see below). The workaround I found is to force the first 4 bytes of the byte array read from the class with CAFEBABE. But I still would like to understand why it takes a different value on this machine.
    Exception in thread "thread applet-MyApplet.class-1" java.lang.ClassFormatError: Incompatible magic value 409165630 in class file Reader
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at NativeClassLoader.findClass(Unknown Source)
    Problem 2 :
    On windows, the NativeClassLoader works perfectly, but on Linux, I'm getting a java.lang.VerifyError (see below).
    Code is compiled with java 1.6.0_06 on windows XP. I tried to remove everything related to native code (remove .so load), the same error is raised.
    java.lang.VerifyError: (class: Reader, method: <clinit> signature: ()V) Illegal instruction found at offset 1
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.newInstance0(Class.java:326)
    at java.lang.Class.newInstance(Class.java:308)
    Code :
    NativeClassReader (custom) :
    public class NativeClassLoader extends ClassLoader {
        //the unique instance of the NativeClassLoader
        private static NativeClassLoader instance;
        private NativeClassLoader () {
            super(NativeClassLoader.class.getClassLoader());
         * Get the Singleton instance of the class
        public static NativeClassLoader getInstance () {
            if (instance == null)
                instance = new NativeClassLoader();
            return instance;
        public static void dispose () {
            instance = null;
         * Load a class using its full java name (prefixed with package)
        public Class findClass (String theName) {
            byte[] b = null;
            try {
                b = loadClassDataFromJar(theName);
                Class clazz = defineClass(theName, b, 0, b.length);
                resolveClass(clazz);
                return clazz;
            } catch (Exception e) {
                return null;
         * Gets the bytes of a class file stored in the current jar using
         * its full class name
        public byte[] loadClassDataFromJar (String theName)
                                     throws Exception {
            String filename = "/" + theName.replace('.', '/') + ".class";
            InputStream is = SawsApplet.class.getResourceAsStream(filename);
            BufferedReader br = new BufferedReader(new InputStreamReader(is));
            //compute file size
            Vector vChars = new Vector();
            int c;
            while ((c = br.read()) != -1)
                vChars.add(new Byte((byte) c));
            //fill in byte array with chars read from the buffer
            byte[] buff = new byte[vChars.size()];
            //workaround for a bug on one (some) Vista machine(s)
            //force magic number to CAFEBABE instead of 18635F3E
            if (vChars.size() > 3) {
                buff[0] = (byte) 0xCA;
                buff[1] = (byte) 0xFE;
                buff[2] = (byte) 0xBA;
                buff[3] = (byte) 0xBE;
            for (int i = 4; i < vChars.size(); ++i)
                buff[i] = ((Byte) vChars.get(i)).byteValue();
            return buff;
    }Reader (loading native libary) :
    public class Reader {
       static {
         System.loadLibrary("myLib");
        public static native String getData();
    }Main :
        NativeClassLoader cLoader = NativeClassLoader.getInstance();
        Class clazz = cLoader.findClass("Reader"); // ClassFormatError thrown here
        Object reader = clazz.newInstance(); // VerifyError thrown here
        Method m = clazz.getMethod("getData");
        String s = m.invoke(reader);
        print(s);
        s = null;
        m = null;
        reader = null;
        clazz = null;
        cLoader = null;
        NativeClassLoader.dispose();
        System.gcAny ideas would be really appreciated :-)
    Guillaume

    Are you using the executable exe file and the filename as a parameter in the custom task?
    Andreas Baumgarten | H&D International Group

  • Problem with loading native library in java version "1.5.0_05"

    My application uses a native coded drawing. With java version 1.4.xx it was working just fine but with java 1.5.xx it gives the following error at the time of loading native library:
    java.lang.UnsatisfiedLinkError: /home/abyzov/tmp/friend32-1.6.02/libfriend.so:
    /home/abyzov/tmp/friend32-1.6.02/libfriend.so: undefined symbol: XtWindowToWidget
    I assumed that java loads all necessary X-libraries at start up but it seems to be not true for version 1.5.xx. Does anybody now about this kind of problems? Should I report it as a bug?

    I have this exact same problem. I developed an application all along using 1.4.2_08 to be exact no problems. I was forced to switch to 1.5.0_06, now when I try to run the app I get:
    java.lang.UnsatisfiedLinkError: <path to library>/libcomlib.so: <path to library>/libcomlib.so: undefined symbol: yp_get_default_domain
    I have tried compiling it in both 1.4.2_8 and 1.5.0_06 and it compiles perfectly but when I run with 1.5.0_06 it messes up.
    If you found the problem with this or anyone else has any advice please let me know.

  • JMF with Native Libraries as Signed Applet

    Hello
    After spending a few days hunting through forums, digging into JMF source code and hacking in the dark I'm about to give up, but thought I'd start yet another thread on this. It's a long, sad story...
    Problem: Deploying a JMF based program that relies on native libraries (in this case the FOBS4JMF bindings) as an applet: how to get jmf.properties and the native libraries loaded properly.
    Partial Solution: the native libraries packaged in a signed jar file, added to the applet's archive property, extracted using getResourceAsStream(), and loaded using System.load(). This is how FOBS4JMF loads it's native library anyway (via the com.moesol.NativeLibraryFinder):
    Class classInApplet; // name of a class loaded by the applet
    File outputFile; // location for extracted library
    InputStream is = classInApplet.getResourceAsStream(resource);
    copyStream(is, outputFile);
    System.load(outputFile.getAbsolutePath());Why this doesn't really work:
    (a) JMF (com.media.util.Registry) only searches for jmf.properties (which contains the instructions to use the FOBS4JMF plugin) in real folders (i.e. not jars) on the classpath of the local machine. I could extract the jmf.properties to a folder on the local machine, but have no way of making sure that folder would be on the classpath. Calls to "System.getProperty("java.class.path") give varying results - including an empty string on FF/OSX. Even if i could get the classpath somehow, chances are that it wouldn't contain any folders writable under Vista's UAC, which would leave me out of luck.
    JMF also looks for a file called ".jmfdir" in various platform specific locations, and appends the contents of this file to the classpath, so if i could write to that file i'd be golden. This seems like it would work on non windows platforms, because JMF looks for that in "user.home"). However, from what i can tell, on windows, JMF uses a native call to a function called nGetUserHome() to determine where to find .jmfdir - which leads to the second problem...
    (b) the JMF native libraries are loaded through calls to System.loadLibrary(), not System.load(), which means that they have to be on the "java.library.path" in order to be found - and again, I have no way of extracting the libraries to a directory on that path (at least not one writable under Vista UAC). This wouldn't be a problem, as I could pre-load the libraries myself with System.load(), except that JMF throws an exception if it can't find one, and stops trying to do whatever it thinks it needs the library for. Again, not a problem if I use only the FOBS4JMF native code (though i would like to use the DirectAudio renderer on windows) - except that the nGetUserHome() function described above is in a native library (jmutil.dll). So, when com.media.util.Registry.getJMFDir() tries to find ".jmfdir" it first tries to load "jmutil.dll" using System.loadLibrary(). This throws an exception inf "jmutil.dll" is not on the "java.library.path", and com.media.util.Registry.getJMFDir() returns null. Here's the relevant code from com.media.util.Registry.getJMFDir() - with my annotations
    All of these problems are fixable by relatively minor tweaks to the JMF source - but I don't think that's allowed under the SCSL. So if anyone has any, i mean ANY other suggestions, please BRING 'EM ON.
    thanks
    -chris
    EDIT: just for kicks, i checked to see where JMF expects to find .jmfdir on windows - ie the result of nGetUserHome(). At least on XP this seems to be c:\WINDOWS. if it's the same on Vista, then fixing the loadLibrary problem won't help bc I still won't be able to write to this file.
    Edited by: wodenx on May 7, 2010 9:46 AM

    Hi-
    Thanks for responding so quickly.
    As far as the natives go, you might try using the new JNLP embedded applet ability in the plugin2 architecture.I was going to look into that, but decided it wasn't necessary since I can get the FOBS native code to link properly. It's really the registry that's the problem, since without solving that I can't get JMF to USE the FOBS code.
    Can you get it all to work if the JMF installer is invoked? If so, perhaps if you add an installer-desc that calls the normal JMF setup.exe (though that final warning to reboot is both unnecessary and odious).I don't think it would work even with the JMF installer, bc I need to point JMF at the FOBS specific jmf.properties. I might be get it to work by invoking my own installer though, to place my jmf.properties somewhere in the native class path, so that's worth looking at. Thank you. Problem there is that on Vista users would have to elevate to run the applet, which is not ideal.necessary and odious).
    Why do you particularly want to embed media in a web page?The customer may want it. I might be able to convince them to go with JNLP/WebStart, but I think I might have the same problem there. Please correct me if I'm wrong...
    I've also read that there are problems with JMF and JNLP owing to the fact that JMF doesn't recognize the security manager invoked by JNLP, and so gives your program no permissions. Haven't tried it myself yet.
    Thanks again!
    Edited by: wodenx on May 7, 2010 12:07 PM

  • Wls 6.1 on solaris 8 intel: native libraries missing (libmuxer.so ...)

    It seems that the native libraries for sparc only are included in WLS 6.1???
    #file libmuxer.so
    libmuxer.so: ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked,
    not stripped
    Where can I get the intel version?
    # ./startWebLogic.sh
    LD_LIBRARY_PATH=/usr2/bea/wlserver6.1/lib/solaris:/usr2/bea/wlserver6.1/lib/solaris/oci816_8
    * To start WebLogic Server, use the password *
    * assigned to the system user. The system *
    * username and password must also be used to *
    * access the WebLogic Server console from a web *
    * browser. *
    Starting WebLogic Server ....
    <Jan 18, 2002 9:57:11 AM CET> <Notice> <Management> <Loading configuration file
    ./config/helsana/config.xml ...>
    <Jan 18, 2002 9:57:17 AM CET> <Notice> <WebLogicServer> <Starting WebLogic Admin
    Server "sunetweb"
    for domain "helsana">
    <Jan 18, 2002 9:57:22 AM CET> <Notice> <Management> <Starting discovery of Managed
    Server... This feature is on by default, you may turn this off by passing -Dweblogic.management.discover=false>
    <Jan 18, 2002 9:57:28 AM CET> <Notice> <Management> <Application Poller not started
    for production
    server.>
    <Jan 18, 2002 9:57:28 AM CET> <Notice> <WebLogicServer> <ListenThread listening
    on port 80>
    <Jan 18, 2002 9:57:28 AM CET> <Error> <Performance Pack> <Unable to load performance
    pack, using Java I/O instead.
    Please ensure that libmuxer library is in /usr/j2sdk1_3_1_02/jre/bin/../lib/i386/hotspot:/usr/j2sdk1_3_1_02/jre/bin/../lib/i386::/usr2/bea/wlserver6.1/lib/solaris:/usr2/bea/wlserver6.1/lib/solaris/oci816_8:/usr/lib
    java.lang.UnsatisfiedLinkError: /usr2/bea/wlserver6.1/lib/solaris/libmuxer.so:
    ld.so.1: /usr/j2sdk1_3_1_02/jre/bin/../bin/i386/native_threads/java: fatal: /usr2/bea/wlserver6.1/lib/solaris/libmuxer.so:
    wrong ELF data format: ELFDATA2MSB
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1419)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1343)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.PosixSocketMuxer.<init>(PosixSocketMuxer.java:90)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:192)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:144)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:232)
    >
    <Jan 18, 2002 9:57:28 AM CET> <Notice> <WebLogicServer> <SSLListenThread listening
    on port 443>

    Hi.
    We only support Solaris on Sparc platforms, so there are no intel libs for Solaris 8.
    Regards,
    Michael
    Dominik wrote:
    It seems that the native libraries for sparc only are included in WLS 6.1???
    #file libmuxer.so
    libmuxer.so: ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked,
    not stripped
    Where can I get the intel version?
    # ./startWebLogic.sh
    LD_LIBRARY_PATH=/usr2/bea/wlserver6.1/lib/solaris:/usr2/bea/wlserver6.1/lib/solaris/oci816_8
    * To start WebLogic Server, use the password *
    * assigned to the system user. The system *
    * username and password must also be used to *
    * access the WebLogic Server console from a web *
    * browser. *
    Starting WebLogic Server ....
    <Jan 18, 2002 9:57:11 AM CET> <Notice> <Management> <Loading configuration file
    /config/helsana/config.xml ...>
    <Jan 18, 2002 9:57:17 AM CET> <Notice> <WebLogicServer> <Starting WebLogic Admin
    Server "sunetweb"
    for domain "helsana">
    <Jan 18, 2002 9:57:22 AM CET> <Notice> <Management> <Starting discovery of Managed
    Server... This feature is on by default, you may turn this off by passing -Dweblogic.management.discover=false>
    <Jan 18, 2002 9:57:28 AM CET> <Notice> <Management> <Application Poller not started
    for production
    server.>
    <Jan 18, 2002 9:57:28 AM CET> <Notice> <WebLogicServer> <ListenThread listening
    on port 80>
    <Jan 18, 2002 9:57:28 AM CET> <Error> <Performance Pack> <Unable to load performance
    pack, using Java I/O instead.
    Please ensure that libmuxer library is in /usr/j2sdk1_3_1_02/jre/bin/../lib/i386/hotspot:/usr/j2sdk1_3_1_02/jre/bin/../lib/i386::/usr2/bea/wlserver6.1/lib/solaris:/usr2/bea/wlserver6.1/lib/solaris/oci816_8:/usr/lib
    java.lang.UnsatisfiedLinkError: /usr2/bea/wlserver6.1/lib/solaris/libmuxer.so:
    ld.so.1: /usr/j2sdk1_3_1_02/jre/bin/../bin/i386/native_threads/java: fatal: /usr2/bea/wlserver6.1/lib/solaris/libmuxer.so:
    wrong ELF data format: ELFDATA2MSB
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1419)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1343)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.PosixSocketMuxer.<init>(PosixSocketMuxer.java:90)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:192)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:144)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:232)
    >
    <Jan 18, 2002 9:57:28 AM CET> <Notice> <WebLogicServer> <SSLListenThread listening
    on port 443>--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Unloading Native Libraries in java

    Hi all,
    This is what i have read from a document.
    The VM calls JNI_OnUnload when the class loader containing the native library is garbage collected.
    When the class loader containing the native library is garbage collected, will the native library gets unloaded.

    Well it should be unloaded:
    "The benefits of the new approach are:
    1. Name space separation based on class loaders is preserved in native libraries. A native library cannot easily mix classes from different class loaders.
    2. In addition, native libraries can be unloaded when their corresponding class loaders are garbage collected"
    As stated in the same document.

  • Weblogic 8.1.6 Unable to load native library: libjvm.so

    hi,
    i have installed weblogic 8.1 SP6 on my box and when im trying to deploy new application i get errors comaplining about some java libraries.
    when i link them to the /usr/lib directory it's working but it's not a solution couse i need also weblogic 9.2 server running on that box.
    i tried to export LD_LIBRARY_PATH with path to the jdk142 that was installed with weblogic server by myself but also without any success.
    i checked commEnv.sh file and found that path to java libraries are not set properly. added those paths to the LD_LIBRARY_PATH but after running WLS when i try to echo ${LD_LIBRARY_PATH} i get no results.
    maybe someone had such problems, and knows how to resolv them.
    my system is Debian Linux/stable
    WL_HOME=/home/bea/bea/weblogic81
    JAVA_HOME=/home/bea/bea/jdk142_11
    added to commEnv.sh:
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/${JAVA_HOME}/jre/lib:${JAVA_HOME}/jre/lib/i386:${JAVA_HOME}/jre/lib/i386/server:${JAVA_HOME}/jre/lib/i386/client
    thanks
    below is a log for this error:
    CUT HERE
    <Error> <HTTP> <brain> <blsBepi> <ExecuteThread: '14' for queue: 'weblogic.kernel.Default'>
    weblogic.servlet.jsp.CompilationException: Compilation of /home/bea/bepi/blsBepiDomain/blsBepi/.wlnotdelete/extract/blsBepi_bepi
    Unable to load native library: libjvm.so: cannot open shared object file: No such file or directory
    at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:478)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:246)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:196)
    at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:598)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:406)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Caused by: java.io.IOException: Compiler failed executable.exec
    at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:470)
    at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328)
    at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:336)
    at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:321)
    at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:451)
    ... 13 more
    -- CUT HERE --
    PS. sorry for my english and is this post is not in the place where it sould be ;-)

    SOLUTION:
    set the absolute path to javac in General Section of the configuration
    make sure that you j2sdk1.4.2 is accessible by all uids that managed servers are running at.
    if that wont help try to put your J2SDK in /usr/local/java.
    and reconfigure your administration server.
    i hope that will help you all that have same problems. cheers ;-)

Maybe you are looking for

  • Can I buy an iMac and pay in dollars and send it to Belguim?

    I will buy an iMac and pay in dollars. Can i send this imac (paid in dollars) to belguim with the apple store? Please answer ;)

  • Web IC Sales Order ERP Integration (Workcentre IC_SLO_ERP)

    System: CRM 2007 s4 and ECC 6 I have integrated ERP Sales Order within my Web IC aplication.  I'm able to create ERP orders from within the CRM based Web IC using the work centre IC_SLO_ERP.  I can save the orders and the orders are saved to SAP ECC

  • More Home Share Issues

    Been browsing all the home share issues here but not seeing this symptom. I have 4 comps on the same wired network. Upgraded all to the newest itunes and activated home share with the same account on all...sharing options all checked and turned on. T

  • Error code "-1" while updating the iOS from IPAD2

    When I try to update my IPAD2 to iOS 4.3.2 I receive the error code "-1" at the end of the installation, and now I´m stuck in the restore point, because the system don´t boot anymore. When I connect to Itunes it says I have to download the update, th

  • RAID Admin Parity verification test: How to use?

    Folks: My basic question: How to get "Parity validation" test to tell you something useful. XServe RAID, dual 7x250, RAID Admin 1.5.1 and firmware updated 2 weeks ago. After rebuilding a RAID array, I ran the RAID Admin's Parity verification test (wh