Error Message

Unable to load Java Library libjvm.so, error: /usr/java/jdk1.3/jre/lib/i386/classic/libjvm.so: undefined symbol: jdk_sem_post

My Config in PHP.INI
[java]
java.home=/usr/java/jdk1.3
java.class.path=/usr/java/jdk1.3/jre/lib/tools.jar:/usr/local/lib/php_java.jar:/usr/java/jdk1.3/jre/lib/rt.jar:/home/httpd/html/java2/ezsystems.jar
java.library=/usr/java/jdk1.3/jre/lib/i386/classic/libjvm.so
java.library.path=/usr/local/lib:/usr/lib/apache:/usr/java/jdk1.3/jre/lib/i386:/usr/java/jdk1.3/jre/lib/i386/classic:/usr/java/jdk1.3/jre/lib/i386/native_threads
extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20000809
extension=libphp_java.so

And i don't know "jdk_sem_post" what is ?

Help me pleases !!!!

    8 days later

    supin,

    I found that with some JDKs using libjava.so instead of libjvm.so works better.
    Try specifying java.library=libjava.so (no path).

    Also, try running ldd /usr/java/jdk1.3/jre/lib/i386/classic/libjvm.so and see if it reports any load problems. You might have to set LD_LIBRARY_PATH to include all the directories you have specified above in java.library.path for ldd to work
    the same way php will try to do it. Also try running ldd against libjava.so to see if everything it needs can be found.

    Alex

      I'm having the exact same problem, and I think that it has something to do with php envoking the jvm using classic threads. If we can find a way to get php to use native threads or hotspot it might work. I'll post again if i figure it out. LMK if you find anything
      Justin

        a month later

        Has anybody had any luck getting jdk1.3 working with php4.0.4? I've looked through the archives but it doesn't seem like anyone is having any luck.

          8 days later

          Aaron,

          I just tried Blackdown's JDK 1.3.0 it and got it to work. I had to hack <php4>ext/java/config.m4 as follows:

          change the line (around line 69):
          test -d $i/classic && AC_ADD_LIBPATH($i/classic)

          to:
          test -d $i/hotspot && AC_ADD_LIBPATH($i/hotspot)
          test -d $i/server && AC_ADD_LIBPATH($i/server)
          test -d $i/classic && AC_ADD_LIBPATH($i/classic)

          I'll see if I can get this released into the CVS. There are also some other changes necessary to that file to support other Ux platforms that have different shared object file suffixes (the java config file is hardcoded to use .so).

          Of course, you'll have to run ./buildconf again to pick up this change prior to running ./configure.

          Alex

            Write a Reply...