7 Replies Latest reply on Jan 26, 2009 7:42 PM by Daniel Genkin

    JBoss Web

    Daniel Genkin Newbie

      Hi,

      I have installed jboss web 2.1.1.GA. I cannot get native libraries to work. In fact, i installed tomcat native libraries susccessfuly on my jboss instances, but cant figure out the problem with jboss web.

      I get this well-known error:
      Jan 21, 2009 5:19:35 PM org.apache.catalina.core.AprLifecycleListener init
      INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/jbossweb/product/jdk1.6.0_10/jre/lib/i386/server:/home/jbossweb/product/jdk1.6.0_10/jre/lib/i386:/home/jbossweb/product/jdk1.6.0_10/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib

      i downloaded native libraries from http://www.jboss.org/jbossweb/downloads/jboss-native/
      created a 'native' folder in $JBOSSWEB_HOME/bin. extracted everything from ".../lib/linux2/x64/*" to "$JBOSSWEB_HOME/bin/native". And still, on boot i see the error.

      Thanks!

        • 1. Re: JBoss Web
          Peter Johnson Master

          Not sure if thjis discussion helps: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=147583

          Which version of JBoss Native? And can I assume you are running Linux? And can I also assume you are running both a 64-bit OS and 64-bit JVM?

          • 2. Re: JBoss Web
            Daniel Genkin Newbie

            Hi Peter,

            Sorry, i should have clarified all these things in the beginning.

            I tried JBoss Native 2.0.6 Linux x86-64. I am running linux 64 bit OS and 64 bit JVM.

            If i understand correctly form your other post, you are recommending to try with JBoss Native 2.0.5 Linux x86-64.

            I will do that and let you know how it went.

            • 3. Re: JBoss Web
              Daniel Genkin Newbie

              still same error:

              extracted native libraries, copied everything from bin/META-INF/lib/linux2/x64 (engine folder and .so files) to JBOSSWEB_HOME/bin/native

              The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/jbossweb/product/jdk1.6.0_10/jre/lib/i386/server:/home/jbossweb/product/jdk1.6.0_10/jre/lib/i386:/home/jbossweb/product/jdk1.6.0_10/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib

              • 4. Re: JBoss Web
                Peter Johnson Master

                Two things.

                First, copy the contents of 'jboss_native/bin' to 'jboss_home/bin' as is.

                Second, I looked in catalina.sh and do not see the same code that appears in run.sh for JBoss AS, the code that checks for JBoss Native shared objects and modifies the LD_LIBRARY_PATH. So two possibilities come to mind:

                a) Modify catalina.sh to do the shared library check like run.sh does
                b) set LD_LIBRARY_PATH before running startup.sh

                • 5. Re: JBoss Web
                  Daniel Genkin Newbie

                  Peter, what do you mean by 'jboss_native/bin'?

                  I added this to catalina.sh:

                  # Setup JBosst Native library path
                  JBOSSWEB_NATIVE_DIR="$JBOSSWEB_HOME/bin/native"
                  if [ -d "$JBOSSWEB_NATIVE_DIR" ]; then
                  if $cygwin ; then
                  export PATH="$JBOSSWEB_NATIVE_DIR:$PATH"
                  JBOSSWEB_NATIVE_DIR=`cygpath --dos "$JBOSSWEB_NATIVE_DIR"`
                  fi
                  if [ "x$LD_LIBRARY_PATH" = "x" ]; then
                  LD_LIBRARY_PATH="$JBOSSWEB_NATIVE_DIR"
                  else
                  LD_LIBRARY_PATH="$JBOSSWEB_NATIVE_DIR:$LD_LIBRARY_PATH"
                  fi
                  export LD_LIBRARY_PATH
                  if [ "x$JAVA_OPTS" = "x" ]; then
                  JAVA_OPTS="-Djava.library.path=$JBOSSWEB_NATIVE_DIR"
                  else
                  JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$JBOSSWEB_NATIVE_DIR"
                  fi
                  fi

                  and get the following error:

                  INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/jbossweb/product/jbossweb/bin/native

                  java.libray.path is different now.
                  I am obviously doing something wrong here...

                  • 6. Re: JBoss Web
                    Peter Johnson Master

                    For 'jboss_native/bin', 'jboss_native' == directory into which you unpacked the tar.gz file. (The actual installation instructions for Native are to unpack the downloaded file into jboss_home, but you were smart to unpack it into a separate temp directory - it is that temp directory that I meant by 'jboss_native'.)

                    Some other post pointed out the fact that the -Dld.library.path setting for JAVA_OPTS is incorrect - it includes only the native library directory and drops everything else that was in LD_LIBRARY_PATH, which means that the required system libraries are missing.

                    • 7. Re: JBoss Web
                      Daniel Genkin Newbie

                      was able to fix it. i specified additional variables in bashrc and also added the following to catalina.sh:


                      # Setup JBosst Native library path
                      JBOSSWEB_NATIVE_DIR="$JBOSSWEB_HOME/bin/native"
                      if [ -d "$JBOSSWEB_NATIVE_DIR" ]; then
                      if $cygwin ; then
                      export PATH="$JBOSSWEB_NATIVE_DIR:$PATH"
                      JBOSSWEB_NATIVE_DIR=`cygpath --dos "$JBOSSWEB_NATIVE_DIR"`
                      fi
                      if [ "x$LD_LIBRARY_PATH" = "x" ]; then
                      LD_LIBRARY_PATH="$JBOSSWEB_NATIVE_DIR"
                      else
                      LD_LIBRARY_PATH="$JBOSSWEB_NATIVE_DIR:$LD_LIBRARY_PATH"
                      fi
                      export LD_LIBRARY_PATH
                      if [ "x$JAVA_OPTS" = "x" ]; then
                      JAVA_OPTS="-Djava.library.path=$JBOSSWEB_NATIVE_DIR"
                      else
                      JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$JBOSSWEB_NATIVE_DIR"
                      fi
                      fi

                      Now I see this: INFO: Loaded Apache Tomcat Native library 1.1.16.