3 Replies Latest reply on Dec 30, 2008 9:20 AM by lexsoto

    installing/configuring on Mac OSX

    lexsoto

      Hello,

      I'm trying to get the JBoss Profiler working on Mac OSX.
      I'm running JBoss 4.2.2.GA with Java 5.

      First, I downloaded the latest release "jboss-profiler-2.0.Beta3.SP1" but could not find the native library anywhere.

      I found the native library in the downloaded "jboss-profiler-1.0.CR4.zip" file.
      Is this the one I should be using?

      There is no pre-compiled library for Mac OSX so I'm trying to compile it from the sources. After removing windows '\r' characters from the provided compile.sh file I get these errors when compiling the sources:

      i686-apple-darwin8-g++-4.0.1: unrecognized option '-shared'
      ../native-src/jbossAgent.cpp:1: warning: -fpic is not supported; -fPIC assumed
      i686-apple-darwin8-g++-4.0.1: unrecognized option '-shared'
      ../native-src/jbossAgentJNI.cpp:1: warning: -fpic is not supported; -fPIC assumed
      i686-apple-darwin8-g++-4.0.1: unrecognized option '-shared'
      ../native-src/jbossAgentUtilities.cpp:1: warning: -fpic is not supported; -fPIC assumed
      /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/libstdc++.dylib load command 8 unknown cmd field
      /usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib unknown flags (type) of section 6 (__TEXT,__literal16) in load command 0
      /usr/bin/ld: /usr/lib/libSystem.B.dylib unknown flags (type) of section 6 (__TEXT,__literal16) in load command 0
      collect2: ld returned 1 exit status
      


      Has anybody done what I'm attempting?
      Any help will be greatly appreciated.

      Thanks,
      Alex Soto

        • 1. Re: installing/configuring on Mac OSX
          jesper.pedersen

          There isn't any native for JBoss Profiler 2.0 yet. It is a 100% pure Java profiler currently.

          See the README.txt on which options you need to pass to JAVA_OPT and remember to copy javassist.jar to the bin/ directory.

          As for JBoss Profiler 1.x -- you need to look into why -shared isn't working on your machine.

          HTH

          • 2. Re: installing/configuring on Mac OSX
            lexsoto

            Thank you for your help. Unfortunately, I'm still lost trying to follow the instructions. This is what the README.txt says:

            * Edit run.conf (Unix) or run.bat (Windows) in jbossas/bin to include JBoss Profiler in JAVA_OPTS


            What exactly does this means?
            What do I add to JAVA_OPTS?

            Thanks,
            -Alex Soto


            • 3. Re: installing/configuring on Mac OSX
              lexsoto

              In case others have the same problem. The "run.conf" needs to be modified by adding the line:


              JAVA_OPTS="$JAVA_OPTS -javaagent:jboss-profiler.jar -Djboss-profiler.properties=jboss-profiler.properties"


              For whatever is worth, I have to say the documentation is very confusing. I would suggest separating the instructions about how to setup/run in stand alone mode from the instructions about running embedded in the Application Server.

              The step-by-step instructions under section "Deployment in JBoss Application Server" are not complete. The information about how to modify JAVA_OPTS is actually found towards the end of the file in a different section "Running the agent", yet I could not "move" to the next step in the instructions because of the missing information.

              Thanks,
              Alex