facebook

VisualVM problems with JBoss 5

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #316140 Reply

    Tom O’Neil
    Member

    I am having problems getting MyEclipe’s VisualVM profiling working with JBoss 5.0. I’m running MyEclipse 8.6.1, which uses VisualVM 1.1.1. Everything seems to work fine, but when JBoss tried to start my application WAR file, I get the following Exception.

    java.lang.NoClassDefFoundError: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
    at com.ds.dsforecast.presentation.util.ApplicationContextListener.<clinit>(ApplicationContextListener.java:28)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:264)
    at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:256)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3859)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
    at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
    at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
    at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
    at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
    at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
    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:597)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
    at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
    at $Proxy38.start(Unknown Source)
    at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
    at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
    at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
    at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
    at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
    at org.jboss.system.ServiceController.start(ServiceController.java:460)
    at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
    at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
    at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
    at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1440)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1158)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1179)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1099)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:782)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
    at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
    at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
    at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:775)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
    at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
    at org.jboss.Main.boot(Main.java:221)
    at org.jboss.Main$1.run(Main.java:556)
    at java.lang.Thread.run(Thread.java:619)

    Based on some postings I found on-line, I tried adding the jfluid-server.jar and jfluid-server-15.jar files to my JBoss classpath. That generates a different exception (listed below). What needs to be done to enable JBoss profiling with MyEclipse?

    15:50:05,266 ERROR [[/jdsf]] Error configuring application listener of class com.ds.dsforecast.presentation.util.ApplicationContextListener
    java.lang.IllegalAccessError: tried to access method org.netbeans.lib.profiler.server.ThreadInfo.getThreadInfo()Lorg/netbeans/lib/profiler/server/ThreadInfo; from class org.netbeans.lib.profiler.server.ProfilerRuntimeCPUFullInstr
    at org.netbeans.lib.profiler.server.ProfilerRuntimeCPUFullInstr.methodExit(ProfilerRuntimeCPUFullInstr.java:189)
    at com.ds.dsforecast.presentation.util.ApplicationContextListener.<clinit>(ApplicationContextListener.java:28)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:264)
    at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:256)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3859)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
    at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
    at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
    at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
    at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
    at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
    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:597)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
    at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
    at $Proxy38.start(Unknown Source)
    at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
    at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
    at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
    at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
    at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
    at org.jboss.system.ServiceController.start(ServiceController.java:460)
    at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
    at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
    at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
    at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1440)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1158)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1179)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1099)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:782)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
    at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
    at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
    at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:775)
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
    at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
    at org.jboss.Main.boot(Main.java:221)
    at org.jboss.Main$1.run(Main.java:556)
    at java.lang.Thread.run(Thread.java:619)

    #316150 Reply

    support-swapna
    Moderator

    reverendtom,

    1) Here are some tutorials which will help you get started with profiling in MyEclipse.

    http://www.myeclipseide.com/documentation/quickstarts/profiler/
    http://www.myeclipseide.com/htmlpages-func-display-pid-441.html

    2) Can you check something for me?

    From MyEclipse Menu click on MyEclipse Start Page. Click on [EXAMPLE PROJECTS]. This will open the Examples On-Demand Browser. Install any project, say MyBlogJSFJPAExample. Click on the [Install Project] button. This will get installed on your workspace. Now right click on this project – MyBlogJSFJPAExample and click on Profile As > MyEclipse Server Application. This should prompt you to accept the license for VisualVM, and opens the profiler for you. Let me know what you get here, if it errors out, please send me the error log file located at [your workspace dir]/.metadata/.log and also attach error screenshot.

    Here is an FAQ on how to attach the files :
    https://www.genuitec.com/forums/topic/troubleshooting-how-to-upload-attachments-on-forum/

    Let me know how this works for you

    #316171 Reply

    Tom O’Neil
    Member

    That particular project does not seem to generate profiling errors, although it does generate different errors when starting. If you look at the server output, however, you’ll see that other applications (such as admin-console) are generating the profiling error. I’m attaching the JBoss server log, MyEclipse .log file, and screen shots of my profiling configuring. Also, please note that I upgraded to MyEclipse 9 in an attempt to address the issue.

    #316221 Reply

    support-swapna
    Moderator

    reverendtom,

    Thank you for sending the files. I could replicate the issue at my end.
    I will ask a dev team member to look at it.
    Sorry for the inconvenience caused.

    #316226 Reply

    support-tony
    Keymaster

    reverendtom,

    I’ve seen some references to the jfluid-server.jar file having to be added to the boot class path. I got some success by adding it to the Bootstrap Entries of the Classpath of the launch configuration, after the default entry. To create a custom launch configuration for JBOSS, go to the JBOSS entry of the server settings in the MyEclipse preferences dialog; open the Launch page of those settings and click the Create Launch Configuration button. This actually just creates a normal Run Configuration and so it can be accessed, thereafter, by going to the Run/Debug Configurations dialog.

    In the configuration, go to the Classpath tab and add the jfluid-server.jar file after the existing entry in the Bootstrap entries.

    When you profile an application, select the Custom JBOSS server, rather than the standard one.

    Unfortunately, this new configuration doesn’t seem to have everything that the internally generated configuration has. There seems to be at least one VM argument missing, which specifies the file containing the profiling settings for the application you are profiling. What I did was launch a profiling session using the standard JBOSS launch, then checked the VM arguments listed on the summary panel of VisualVM. Then I shut down the server and VisualVM and launched the profiler with the incomplete custom JBOSS configuration, then seeing the VM arguments on VisualVM. Comparing the VM arguments from the two runs, I was able to add the missing argument to my custom launch configuration and did then manage a profile run without the error you were getting.

    We’re still looking at this issue, so this is not necessarily a complete answer, yet, but I hope it helps to get you going with profiling your application.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: VisualVM problems with JBoss 5

You must be logged in to post in the forum log in