3 Replies Latest reply on Aug 9, 2009 3:06 PM by vineet_tripathi

    MAC OS X - Adding  Apache Portable Runtime (APR) to JBoss no

      Hi All,
      I am facing problem in APR configuration for JBoss server instances running on
      OS-System: Mac OS X 10.5.6,i386
      with
      JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)

      I followed following steps:

      1)downloaded JBoss Native 2.0.6 MacOSX x86 from
      http://jboss.org/jbossweb/downloads/jboss-native/

      2) copied- jboss-native-2.0.6-macosx-x86-ssl/bin/META-INF/lib/macosx/x86/*.dylib to JBOSS_HOME/bin/native.

      3)Copied
      jboss-native-2.0.6-macosx-x86-ssl/bin/META-INF/lib/macosx/x86/engines, directory
      to JBOSS_HOME/bin/native/engines

      4)Copied

      jboss-native-2.0.6-macosx-x86-ssl/bin/META-INF/bin/macosx/x86/openssl
      to JBOSS_HOME/bin

      Restarted the server instance:
      getting following messages on startup:

      in JAVA_OPTS getting:




      -Djava.library.path=/Users/vineet/DMGAndSWS/jboss-portal-2.7.2/bin/native


      in logs getting:
      14:57:49,692 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/vineet/DMGAndSWS/jboss-portal-2.7.2/bin/native


      could some one please help me on this configuration and let me know if I need to do some additional steps OR I am missing something .

      Thanks
      Vineet

        • 1. Re: MAC OS X - Adding  Apache Portable Runtime (APR) to JBos

          when i enabled DEBUG logging for apache.core, I got following exception

          Caused by: java.lang.UnsatisfiedLinkError: /Users/vineet/DMGAndSWS/jboss-portal-2.7.2/bin/native/libtcnative-1.0.1.16.dylib: Library not loaded: /Users/mturk/workplace/jbossnative-trunk/build/unix/cache/common/macosx-x86/lib/libssl.0.9.8.dylib Referenced from: /Users/vineet/DMGAndSWS/jboss-portal-2.7.2/bin/native/libtcnative-1.0.1.16.dylib Reason: image not found, no libtcnative-1 in java.library.path(/Users/vineet/DMGAndSWS/jboss-portal-2.7.2/bin/native)
           at org.apache.tomcat.jni.Library.<init>(Library.java:56)
           at org.apache.tomcat.jni.Library.initialize(Library.java:157)
          


          its trying to find libssl.0.9.8.dylib from , /Users/mturk/workplace/jbossnative-trunk/build/unix/cache/common/macosx-x86/lib/ , Which I dont think it will be able to find..but how to resolve it?

          • 2. Re: MAC OS X - Adding  Apache Portable Runtime (APR) to JBos

            done guys..its done..and here are the steps to do this:

            1) Install the latest version of MacPorts.

            http://www.macports.org/

            2) Quit and Reopen your Terminal program. From the Terminal, enter:

            sudo port install tomcat-native
            

            3) From the Terminal program, make symbolic links from the /opt/local/lib/libtcnative-1.* to /usr/lib/java:
            sudo ln -s /opt/local/lib/libtcnative-1.* /usr/lib/java
            

            Restart Tomcat and hurray..enjoy!!!!!

            • 3. Re: MAC OS X - Adding  Apache Portable Runtime (APR) to JBos

              1)download JBoss Native 2.0.6 MacOSX x86 from
              http://jboss.org/jbossweb/downloads/jboss-native/

              2) copied- jboss-native-2.0.6-macosx-x86-ssl/bin/META-INF/lib/macosx/x86/*.dylib to JBOSS_HOME/bin/native.

              3)Copy
              jboss-native-2.0.6-macosx-x86-ssl/bin/META-INF/lib/macosx/x86/engines, directory
              to JBOSS_HOME/bin/native/engines

              4)Copy jboss-native-2.0.6-macosx-x86-ssl/bin/META-INF/bin/macosx/x86/openssl
              to JBOSS_HOME/bin

              5) edit run.sh (vi run.sh), Add following lines under "# Setup JBosst Native library path", part of the script:

              JBOSS_NATIVE_DIR="$JBOSS_HOME/bin/native"
              if [ -d "$JBOSS_NATIVE_DIR" ]; then
               if $cygwin ; then
               export PATH="$JBOSS_NATIVE_DIR:$PATH"
               JBOSS_NATIVE_DIR=`cygpath --dos "$JBOSS_NATIVE_DIR"`
               fi
               if [ "x$LD_LIBRARY_PATH" = "x" ]; then
               LD_LIBRARY_PATH="$JBOSS_NATIVE_DIR"
               else
               LD_LIBRARY_PATH="$JBOSS_NATIVE_DIR:$LD_LIBRARY_PATH"
               fi
               export LD_LIBRARY_PATH
              if [ "x$DYLD_LIBRARY_PATH" = "x" ]; then
               DYLD_LIBRARY_PATH="$JBOSS_NATIVE_DIR"
               else
               DYLD_LIBRARY_PATH="$JBOSS_NATIVE_DIR:$DYLD_LIBRARY_PATH"
               fi
               export DYLD_LIBRARY_PATH
               if [ "x$JAVA_OPTS" = "x" ]; then
               JAVA_OPTS="-Djava.library.path=$JBOSS_NATIVE_DIR"
               else
               JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$JBOSS_NATIVE_DIR"
               fi
              fi
              

              The lines in bold font has to be added to the script.

              6)Restart your application server, Verify for the following message:

              [AprLifecycleListener] Loaded Apache Tomcat Native library 1.1.16.


              Hurray..done..