NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

WildFly profiling error (ProfilerRuntimeObjLiveness class not found)

 
Post new topic   Reply to topic    NetBeans Forums -> Profiler Users
View previous topic :: View next topic  
Author Message
Creature



Joined: 01 Jul 2009
Posts: 22

PostPosted: Wed Jun 17, 2015 1:33 pm    Post subject: WildFly profiling error (ProfilerRuntimeObjLiveness class not found) Reply with quote

Hi. I'm trying to profile a web application in Netbeans 8.0.2 WildFly server (running 64bit java 7.0_72. Here's the error that I'm getting:

Code:
WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
java.lang.NoClassDefFoundError: org/netbeans/lib/profiler/server/ProfilerRuntimeObjLiveness
   at org.wildfly.security.manager.WildFlySecurityManager.<clinit>(WildFlySecurityManager.java:75)
   at org.jboss.as.server.Main.main(Main.java:97)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.jboss.modules.Module.run(Module.java:320)
   at org.jboss.modules.Main.main(Main.java:464)
Caused by: java.lang.ClassNotFoundException: org.netbeans.lib.profiler.server.ProfilerRuntimeObjLiveness from [Module "org.wildfly.security.manager:main" from local module loader @2c53cfe3 (finder: local module finder @327556d1 (roots: D:\WildFlyTC-8585\modules,D:\WildFlyTC-8585\modules\system\layers\base))]
   at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
   at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
   ... 8 more
Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib/profiler/server/ProfilerRuntimeObjLiveness
   at org.jboss.as.server.SystemExiter.getExiter(SystemExiter.java:45)
   at org.jboss.as.server.SystemExiter.exit(SystemExiter.java:41)
   at org.jboss.as.server.Main.abort(Main.java:113)
   at org.jboss.as.server.Main.main(Main.java:105)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.jboss.modules.Module.run(Module.java:320)
   at org.jboss.modules.Main.main(Main.java:464)
Caused by: java.lang.ClassNotFoundException: org.netbeans.lib.profiler.server.ProfilerRuntimeObjLiveness from [Module "org.jboss.as.server:main" from local module loader @2c53cfe3 (finder: local module finder @327556d1 (roots: D:\WildFlyTC-8585\modules,D:\WildFlyTC-8585\modules\system\layers\base))]
   at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
   at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
   at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
   ... 10 more


This happens at Wildfly startup way before the app is even deployed. The app deploys fine when not in profiling mode.

How would I solve this?

Thanks.

(originally posted to wrong subforum (twice. oops. Sorry!). re-posting)
Back to top
Tomas Hurka
Posted via mailing list.





PostPosted: Wed Jun 17, 2015 2:43 pm    Post subject: WildFly profiling error (ProfilerRuntimeObjLiveness class not found) Reply with quote

Hi Creature,
you need to modify WildFly startup script standalone.conf.bat. Replace:

set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman”

with:

set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,org.netbeans.lib.profiler.server”


Bye,
--
Tomas Hurka <mailto:address-removed>
NetBeans Profiler http://profiler.netbeans.org
VisualVM http://visualvm.java.net
Software Developer
Oracle, Praha Czech Republic

Quote:
On 17 Jun 2015, at 15:33, Creature <address-removed> wrote:

Hi. I'm trying to profile a web application in Netbeans 8.0.2 WildFly server (running 64bit java 7.0_72. Here's the error that I'm getting:


Code:
WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
java.lang.NoClassDefFoundError: org/netbeans/lib/profiler/server/ProfilerRuntimeObjLiveness
at org.wildfly.security.manager.WildFlySecurityManager.<clinit>(WildFlySecurityManager.java:75)
at org.jboss.as.server.Main.main(Main.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.modules.Module.run(Module.java:320)
at org.jboss.modules.Main.main(Main.java:464)
Caused by: java.lang.ClassNotFoundException: org.netbeans.lib.profiler.server.ProfilerRuntimeObjLiveness from [Module "org.wildfly.security.manager:main" from local module loader @2c53cfe3 (finder: local module finder @327556d1 (roots: D:\WildFlyTC-8585\modules,D:\WildFlyTC-8585\modules\system\layers\base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
... 8 more
Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib/profiler/server/ProfilerRuntimeObjLiveness
at org.jboss.as.server.SystemExiter.getExiter(SystemExiter.java:45)
at org.jboss.as.server.SystemExiter.exit(SystemExiter.java:41)
at org.jboss.as.server.Main.abort(Main.java:113)
at org.jboss.as.server.Main.main(Main.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.modules.Module.run(Module.java:320)
at org.jboss.modules.Main.main(Main.java:464)
Caused by: java.lang.ClassNotFoundException: org.netbeans.lib.profiler.server.ProfilerRuntimeObjLiveness from [Module "org.jboss.as.server:main" from local module loader @2c53cfe3 (finder: local module finder @327556d1 (roots: D:\WildFlyTC-8585\modules,D:\WildFlyTC-8585\modules\system\layers\base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
... 10 more



This happens at Wildfly startup way before the app is even deployed. The app deploys fine when not in profiling mode.

How would I solve this?

Thanks.

(originally posted to wrong subforum (twice. oops. Sorry!). re-posting)



Back to top
Creature



Joined: 01 Jul 2009
Posts: 22

PostPosted: Wed Jun 17, 2015 6:22 pm    Post subject: Reply with quote

Unfortunately, that did not work.

Final java_opts from the attempted profile deploy:

JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms128m -Xmx512m -XX:MaxPermSize=256m -server -Dhttp.nonProxyHosts=localhost,127.0.0.1,ComputerName -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -agentpath:D:\NetBeans8.0.2\profiler\lib\deployed\jdk16\windows-amd64\profilerinterface.dll=D:\NetBeans8.0.2\profiler\lib,5140 -Dnbprofiler.agentid=1908283263"

Also, this happens when I right-click project > Profile. If I start the server/project first, then attach profiler this error doesn't happen, but the server freezes and simply doesn't work instead. This is if I choose to do "Advanced (instrumented)" and check Record full object lifecycle and Record stack trace for allocations. The Quick (sampled) works when I attach the profiler after the fact. But I really need the stack trace and the lifecycle.
Back to top
Tomas Hurka
Posted via mailing list.





PostPosted: Mon Jun 22, 2015 1:15 pm    Post subject: WildFly profiling error (ProfilerRuntimeObjLiveness class not found) Reply with quote

Hi Creature,

Quote:
On 17 Jun 2015, at 20:22, Creature <address-removed> wrote:

Unfortunately, that did not work.

Final java_opts from the attempted profile deploy:

JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms128m -Xmx512m -XX:MaxPermSize=256m -server -Dhttp.nonProxyHosts=localhost,127.0.0.1,ComputerName -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -agentpath:D:\NetBeans8.0.2\profiler\lib\deployed\jdk16\windows-amd64\profilerinterface.dll=D:\NetBeans8.0.2\profiler\lib,5140 -Dnbprofiler.agentid=1908283263”
It did not work, since there is
-Djboss.modules.system.pkgs=org.jboss.byteman
instead of
-Djboss.modules.system.pkgs=org.jboss.byteman,org.netbeans.lib.profiler.server

Unfortunately I am not familiar with WildFly startup, so I could only suggest to search for jboss.modules.system.pkgs in startup scripts and replace all occurrences do have
-Djboss.modules.system.pkgs=org.jboss.byteman,org.netbeans.lib.profiler.server
instead of
-Djboss.modules.system.pkgs=org.jboss.byteman


Bye,
--
Tomas Hurka <mailto:address-removed>
NetBeans Profiler http://profiler.netbeans.org
VisualVM http://visualvm.java.net
Software Developer
Oracle, Praha Czech Republic
Back to top
Jess Holle
Posted via mailing list.





PostPosted: Mon Jun 22, 2015 1:21 pm    Post subject: WildFly profiling error (ProfilerRuntimeObjLiveness class not found) Reply with quote

Last I checked Wildfly had some bugs in this regard in its startup scripts.

In the end you have to be sure all packages you want shared and visible
to all, e.g. agent packages, are listed via -Djboss.modules.system.pkgs,
but I don't think the monkey-see-monkey-do search/replace approach
suffices due to some unresolved oversights in the scripts.

On 6/22/2015 8:14 AM, Tomas Hurka wrote:
Quote:
Hi Creature,

Quote:
On 17 Jun 2015, at 20:22, Creature <address-removed> wrote:

Unfortunately, that did not work.

Final java_opts from the attempted profile deploy:

JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms128m -Xmx512m -XX:MaxPermSize=256m -server -Dhttp.nonProxyHosts=localhost,127.0.0.1,ComputerName -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -agentpath:D:\NetBeans8.0.2\profiler\lib\deployed\jdk16\windows-amd64\profilerinterface.dll=D:\NetBeans8.0.2\profiler\lib,5140 -Dnbprofiler.agentid=1908283263”
It did not work, since there is
-Djboss.modules.system.pkgs=org.jboss.byteman
instead of
-Djboss.modules.system.pkgs=org.jboss.byteman,org.netbeans.lib.profiler.server

Unfortunately I am not familiar with WildFly startup, so I could only suggest to search for jboss.modules.system.pkgs in startup scripts and replace all occurrences do have
-Djboss.modules.system.pkgs=org.jboss.byteman,org.netbeans.lib.profiler.server
instead of
-Djboss.modules.system.pkgs=org.jboss.byteman


Bye,
--
Tomas Hurka <mailto:address-removed>
NetBeans Profiler http://profiler.netbeans.org
VisualVM http://visualvm.java.net
Software Developer
Oracle, Praha Czech Republic

Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Profiler Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo