7 Replies Latest reply: Oct 12, 2010 12:32 PM by saad.i.khawaja RSS

    problem after installation

    Uwe Rasmus Newbie

      Hello all,

       

      I have a problem and cannot find anything in the forums. I've downloaded profiler Beta 5, extracted, went through installation, configuration and command-line client sections from UserGuide.pdf.

      I started my JBoss [EAP] 5.0.0.GA inside Eclipse, windows, the profiler seems to be running

       

      [Profiler] JBoss Profiler: ProfilerMBean started
      [Communicator] JBoss Profiler: Communicator for JBoss Profiler 2.0.0.Beta5
      [Communicator] JBoss Profiler: Socket=localhost:5400

       

      Then I tried to generate some snapshots. I run

      java -jar jboss-profiler-client.jar XXX from the directory, where I extracted the profiler beta 5.

      where XXX is any command

       

      I get exception in the console and also in the server log.

       

      this is the exception from console:

      2010-08-26 10:19:00,057 ERROR [org.jboss.remoting.transport.socket.SocketClientI

      nvoker] Got marshalling exception, exiting

      java.net.SocketException: end of file

              at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transpor

      t(MicroSocketClientInvoker.java:629)

              at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientI

      nvoker.java:122)

              at org.jboss.remoting.Client.invoke(Client.java:1634)

              at org.jboss.remoting.Client.invoke(Client.java:548)

              at org.jboss.remoting.Client.invoke(Client.java:536)

              at org.jboss.profiler.client.cmd.Client.main(Client.java:318)

      2010-08-26 10:19:00,073 ERROR [org.jboss.profiler.client.cmd.Client] Failed to c

      ommunicate.  Problem during marshalling/unmarshalling; nested exception is:

              java.net.SocketException: end of file

      java.rmi.MarshalException: Failed to communicate.  Problem during marshalling/un

      marshalling; nested exception is:

              java.net.SocketException: end of file

              at org.jboss.remoting.transport.socket.SocketClientInvoker.handleExcepti

      on(SocketClientInvoker.java:127)

              at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transpor

      t(MicroSocketClientInvoker.java:699)

              at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientI

      nvoker.java:122)

              at org.jboss.remoting.Client.invoke(Client.java:1634)

              at org.jboss.remoting.Client.invoke(Client.java:548)

              at org.jboss.remoting.Client.invoke(Client.java:536)

              at org.jboss.profiler.client.cmd.Client.main(Client.java:318)

      Caused by: java.net.SocketException: end of file

              at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transpor

      t(MicroSocketClientInvoker.java:629)

              ... 5 more

       

       

      and this exception in the server log:

       

      10:41:24,454 ERROR [ServerThread] WorkerThread#0[127.0.0.1:1419] exception occurred during first invocation

      java.lang.ClassNotFoundException: org.jboss.profiler.shared.Command

      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

      at java.security.AccessController.doPrivileged(Native Method)

      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java:247)

      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:292)

      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

      at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

      at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java:247)

      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)

      at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:172)

      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)

      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)

      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)

      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

      at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)

      at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)

      at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)

      at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:877)

      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:731)

      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:721)

      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)

      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

      10:41:24,454 ERROR [ServerThread] WorkerThread#0[127.0.0.1:1420] exception occurred during first invocation

      java.lang.ClassNotFoundException: org.jboss.profiler.shared.Command

      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

      at java.security.AccessController.doPrivileged(Native Method)

      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java:247)

      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:292)

      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

      at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

      at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java:247)

      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)

      at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:172)

      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)

      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)

      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)

      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

      at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)

      at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)

      at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)

      at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:877)

      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:731)

      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:721)

      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)

      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

      10:41:24,454 ERROR [ServerThread] WorkerThread#0[127.0.0.1:1421] exception occurred during first invocation

      java.lang.ClassNotFoundException: org.jboss.profiler.shared.Command

      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

      at java.security.AccessController.doPrivileged(Native Method)

      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java:247)

      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:292)

      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

      at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

      at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java:247)

      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)

      at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:172)

      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)

      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)

      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)

      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)

      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)

      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

      at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)

      at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)

      at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)

      at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:877)

      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:731)

      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:721)

      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)

      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

      Has anyone some clue what is missing? I'm pretty sure I did everything according the installation guide.
      Thanks a lot
      Uwe

        • 1. Re: problem after installation
          Jesper Pedersen Master

          And you did put the -javaagent: definition in run.conf - and pointed it towards the correct jar ?

          • 2. Re: problem after installation
            Uwe Rasmus Newbie

            As I am on Windows, editing of run.bat should be sufficient. However I found that when starting JBoss from Eclipse, it doesn't use run.bat. I added the java-opts parameters into VM arguments and it works.

             

            Still, I'm not sure, what is the usual profiling cycle after successfull start of JBoss.

            Somewhere I read -

             

            After installing the profiler use the
            * startProfiler
            * stopProfiler
            * getSnapshot
            but the stopProfiler command justs hangs and never returns to my cmdline.
            Any help?
            Thanks a lot
            Uwe
            • 3. Re: problem after installation
              Uwe Rasmus Newbie

              ok, I have found that

              startProfiler

              and snapshot snapshot snapshot

              will generate reports.

               

              But how to use it effectively, along with other commands?

              I was not successfull with getSnapshot X.

               

              Thanks for help

              Uwe

              • 4. Re: problem after installation
                Jesper Pedersen Master

                stopProfiler should work -- maybe it is taking a while to return due to component identification.

                 

                Try and turn off all component identification - e.g. ejb=no, ...

                 

                The sequence is:

                 

                1. startProfiler
                2. stopProfiler
                3. listSnaphots
                4. getSnapshot

                 

                HTH

                • 5. Re: problem after installation
                  saad.i.khawaja Newbie

                  Hi I tried "2.0 Beta5.zip" but I was having some of the problems mentioned above. like hanging client, JBossObjectInputStream class not found. Then i switched to 2.0 Beta4.zip and the profiler worked smoothly.

                  • 6. Re: problem after installation
                    Jesper Pedersen Master

                    Can you dig deeper and see if you can find out why it isn't working for you ?

                    • 7. Re: problem after installation
                      saad.i.khawaja Newbie

                      Here is what I did with 2.0 beta 5

                       

                      Step 1. Attach jboss profiler to test program. Execute the client snapshot command and got the following error in the output of the test program.

                      Exception in thread "WorkerThread#0[127.0.0.1:4024]" java.lang.NoClassDefFoundError: org/jboss/serial/io/JBossObjectInputStream
                          at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:398)
                          at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)

                       

                      The client program kept running after the exception, i killed after 30 seconds.

                       

                      Step 2. Looks like i did not have the jboss-serialization jar so I wrote a test with the following code.

                      Class.forName("org.jboss.serial.io.JBossObjectInputStream");

                      Got the same exception

                       

                      Then I included the following jar from $Jboss6Home\client\jboss-serialization.jar and ran the test again and got the following exception

                       

                      java.lang.NoClassDefFoundError: gnu/trove/TObjectHashingStrategy
                          at org.jboss.serial.io.JBossObjectInputStream.<clinit>(JBossObjectInputStream.java:56)
                          at java.lang.Class.forName0(Native Method)
                          at java.lang.Class.forName(Class.java:164)
                          at com.org.domain.JbossProfilerTest.testname(JbossProfilerTest.java:9)
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
                          at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
                          at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
                          at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
                          at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
                          at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
                          at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
                          at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
                          at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
                          at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
                          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
                          at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
                          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
                          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
                          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
                          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

                       

                       

                      Step 3. I found the trove jar at $Jboss6Home\client\trove.jar again ran the test in step 2 and it ran successfully.

                       

                      So I decided to run step 1 again but again i got the same behviour(execption and client not closing).  All jars from the profiler zip are also included in the classpath of the test program.

                       

                      Here is the

                      === jboss-profiler.properties ===

                      enable=yes
                      precompiled=no
                      cpu=yes
                      memory=yes
                      includes=org.jboss.profiler.*,com.org.domain.*
                      excludes=*
                      visibility=private
                      save=yes
                      savelocation=store
                      startup=yes
                      repository=no
                      remote=yes
                      store=file
                      location=store
                      host=localhost
                      port=5400
                      ejb=no
                      servlet=no
                      jsf=no
                      jmx=no
                      rmi=no
                      corba=no

                       

                      Here is the

                      === jboss-profiler-client.properties ===

                      protocol=socket
                      host=localhost
                      port=5400
                      threshold=1.0
                      savelocation=.

                       

                      let me know if there is anything else you would like me to try.

                      Thanks.