I'm trying to attach the netbeans profiler to a remote installation of V2ur1
using JDK 1.6, unfortunately glassfish fails to load the LogManager and
MBeanServerBuilder class and then everything goes to hell.
After poking about on the internet I found
this<
http://forums.java.net/jive/thread.jspa?threadID=34517>and
this<
http://www.nabble.com/Profiling-with-Netbeans-td10878907.html#a10878907>which
reference bug
1409 <
https://glassfish.dev.java.net/issues/show_bug.cgi?id=1409> which says
it's resolved but sure looks a lot like my problem. Anybody else having
this problem, anyone know of a work around for it?
Thanks,
Loren
Mar 25, 2008 3:09:03 PM
com.sun.enterprise.admin.servermgmt.launch.ASLauncher buildCommand
INFO:
/usr/java/jdk1.6.0_03/jre/../bin/java
-Dcom.sun.aas.instanceRoot=/opt/glassfish/domains/domain1
-Dcom.sun.aas.ClassPathPrefix=
-Dcom.sun.aas.ClassPathSuffix=
-Dcom.sun.aas.ServerClassPath=
-Dcom.sun.aas.classloader.appserverChainJars.ee=
-Dcom.sun.aas.classloader.appserverChainJars=admin-cli.jar,admin-cli-ee.jar,
j2ee-svc.jar
-Dcom.sun.aas.classloader.excludesList=admin-cli.jar,appserv-upgrade.jar,
sun-appserv-ant.jar
-Dcom.sun.aas.classloader.optionalOverrideableChain.ee=
-Dcom.sun.aas.classloader.optionalOverrideableChain=webservices-rt.jar,
webservices-tools.jar
-Dcom.sun.aas.classloader.serverClassPath.ee=/lib/hadbjdbc4.jar
,/opt/glassfish/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,/lib/dbstate.jar,/lib/hadbm.jar,/lib/hadbmgt.jar,/lib/mfwk_instrum_tk.jar
-
Dcom.sun.aas.classloader.serverClassPath=/opt/glassfish/lib/install/applications/jmsra/imqjmsra.jar
,/opt/glassfish/imq/lib/jaxm-api.jar
,/opt/glassfish/imq/lib/fscontext.jar,/opt/glassfish/imq/lib/imqbroker.jar,/opt/glassfish/imq/lib/imqjmx.jar,/opt/glassfish/lib/ant/lib/ant.jar,/opt/glassfish/lib/SUNWjdmk/5.1/lib/jdmkrt.jar
-Dcom.sun.aas.classloader.sharedChainJars.ee=appserv-se.jar,appserv-ee.jar,
jesmf-plugin.jar,/lib/dbstate.jar,/lib/hadbjdbc4.jar,jgroups-all.jar
,/lib/mfwk_instrum_tk.jar
-Dcom.sun.aas.classloader.sharedChainJars=javaee.jar
,/usr/java/jdk1.6.0_03/jre/../lib/tools.jar,install/applications/jmsra/imqjmsra.jar,
com-sun-commons-launcher.jar,com-sun-commons-logging.jar
,/opt/glassfish/imq/lib/jaxm-api.jar
,/opt/glassfish/imq/lib/fscontext.jar,/opt/glassfish/imq/lib/imqbroker.jar,/opt/glassfish/imq/lib/imqjmx.jar,/opt/glassfish/imq/lib/imqxm.jar,
webservices-rt.jar,webservices-tools.jar,mail.jar,appserv-jstl.jar
,jmxremote_optional.jar,/opt/glassfish/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,
activation.jar,appserv-rt.jar,appserv-admin.jar,appserv-cmp.jar
,/opt/glassfish/updatecenter/lib/updatecenter.jar,/opt/glassfish/jbi/lib/jbi.jar,/opt/glassfish/imq/lib/imqjmx.jar,/opt/glassfish/lib/ant/lib/ant.jar,
dbschema.jar
-Dcom.sun.aas.configName=server-config
-Dcom.sun.aas.configRoot=/opt/glassfish/config
-Dcom.sun.aas.defaultLogFile=/opt/glassfish/domains/domain1/logs/server.log
-Dcom.sun.aas.domainName=domain1
-Dcom.sun.aas.installRoot=/opt/glassfish
-Dcom.sun.aas.instanceName=server
-Dcom.sun.aas.processLauncher=SE
-Dcom.sun.aas.promptForIdentity=true
-
Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dcom.sun.enterprise.overrideablejavaxpackages=javax.help,javax.portlet
-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
-Dcom.sun.enterprise.taglisteners=jsf-impl.jar
-Dcom.sun.updatecenter.home=/opt/glassfish/updatecenter
-Ddomain.name=domain1
-Djava.endorsed.dirs=/opt/glassfish/lib/endorsed
-
Djava.ext.dirs=/usr/java/jdk1.6.0_03/jre/../lib/ext:/usr/java/jdk1.6.0_03/jre/../jre/lib/ext:/opt/glassfish/domains/domain1/lib/ext:/opt/glassfish/javadb/lib
-Djava.library.path=/opt/glassfish/lib:/opt/glassfish/lib:/opt/glassfish/lib
-
Djava.security.auth.login.config=/opt/glassfish/domains/domain1/config/login.conf
-Djava.security.policy=/opt/glassfish/domains/domain1/config/server.policy
-
Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager
-
Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
-Djavax.net.ssl.keyStore=/opt/glassfish/domains/domain1/config/keystore.jks
-Djavax.net.ssl.trustStore=/opt/glassfish/domains/domain1/config/cacerts.jks
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djmx.invoke.getters=true
-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
-client
-XX:+UnlockDiagnosticVMOptions
-agentpath:/opt/nb-profiler/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so=/opt/nb-profiler/lib,5140
-XX:MaxPermSize=192m
-Xmx512m
-XX:NewRatio=2
-XX:+LogVMOutput
-XX:LogFile=/opt/glassfish/domains/domain1/logs/jvm.log
-cp
/opt/glassfish/lib/jhall.jar:/opt/glassfish/lib/appserv-launch.jar
com.sun.enterprise.server.PELaunch
start
Profiler Agent: Initializing...
Profiler Agent: Options: >/opt/nb-profiler/lib,5140<
Profiler Agent: Initialized succesfully
Could not load Logmanager "
com.sun.enterprise.server.logging.ServerLogManager"
java.lang.ClassNotFoundException:
com.sun.enterprise.server.logging.ServerLogManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.util.logging.LogManager$1.run(LogManager.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:156)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.sun.jmx.trace.Trace.initDestination(Trace.java:46)
at com.sun.jmx.trace.Trace.<clinit>(Trace.java:25)
at javax.management.MBeanServerFactory.debug(MBeanServerFactory.java
:524)
at javax.management.MBeanServerFactory.checkMBeanServerBuilder(
MBeanServerFactory.java:483)
at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(
MBeanServerFactory.java:511)
at javax.management.MBeanServerFactory.newMBeanServer(
MBeanServerFactory.java:298)
at javax.management.MBeanServerFactory.createMBeanServer(
MBeanServerFactory.java:213)
at javax.management.MBeanServerFactory.createMBeanServer(
MBeanServerFactory.java:174)
at sun.management.ManagementFactory.createPlatformMBeanServer(
ManagementFactory.java:302)
at java.lang.management.ManagementFactory.getPlatformMBeanServer(
ManagementFactory.java:504)
at org.netbeans.lib.profiler.server.system.HeapDump.initialize16(
HeapDump.java:102)
at org.netbeans.lib.profiler.server.system.HeapDump.initialize(
HeapDump.java:78)
at
org.netbeans.lib.profiler.server.ProfilerInterface.initProfilerInterface(
ProfilerInterface.java:464)
at
org.netbeans.lib.profiler.server.ProfilerServer.initSupportingFunctionality(
ProfilerServer.java:973)
at org.netbeans.lib.profiler.server.ProfilerServer.doActivate(
ProfilerServer.java:904)
at org.netbeans.lib.profiler.server.ProfilerServer.activate(
ProfilerServer.java:512)
Failed to load MBeanServerBuilder class
com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder:
java.lang.ClassNotFoundException:
com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
Profiler Agent: Redefining 100 classes at idx 0, out of total 307
Profiler Agent: Redefining 100 classes at idx 100, out of total 307
Profiler Agent: Redefining 100 classes at idx 200, out of total 307
Profiler Agent: Redefining 7 classes at idx 300, out of total 307
Profiler Agent: 250 classes cached.
Mar 25, 2008 3:09:16 PM com.sun.enterprise.server.PEMain main
INFO: Starting Sun Java System Application Server 9.1_01 (build b09d-fcs)
...
Mar 25, 2008 3:09:17 PM com.sun.enterprise.server.PEMain$LoadMBeanServerdoRun
INFO: MBeanServer started: com.sun.enterprise.interceptor.DynamicInterceptor
Profiler Agent: 250 classes cached.
Profiler Agent: 250 classes cached.
Mar 25, 2008 3:09:21 PM
com.sun.enterprise.server.ApplicationServerprintStartupInfo
INFO: CORE5076: Using [Java HotSpot(TM) 64-Bit Server VM, Version 1.6.0_03]
from [Sun Microsystems Inc.]
Mar 25, 2008 3:09:21 PM com.sun.enterprise.jms.JmsProviderLifecycle <clinit>
INFO: Using MQ RA for Broker lifecycle control
Mar 25, 2008 3:09:21 PM com.sun.enterprise.security.SecurityLifecycle <init>
INFO: SEC1002: Security Manager is OFF.
Profiler Agent: 250 classes cached.
Mar 25, 2008 3:09:25 PM
com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStreamflush
INFO: /opt/glassfish/domains/domain1/config/.__com_sun_appserv_pid
Exception in thread "main" Mar 25, 2008 3:09:25 PM
com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStreamflush
WARNING: java.lang.NullPointerException
at org.netbeans.lib.profiler.server.ClassBytesLoader.getClassFileBytes(
ClassBytesLoader.java:72)
at org.netbeans.lib.profiler.server.ProfilerInterface.classLoadHook(
ProfilerInterface.java:860)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2391)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getConstructor(Class.java:1657)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:588)
at com.sun.enterprise.admin.util.proxy.ProxyFactory.createProxy(
ProxyFactory.java:69)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.<init>(
SunoneInterceptor.java:171)
at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.createInstance(
SunoneInterceptor.java:187)
at com.sun.enterprise.admin.server.core.AdminService.init(
AdminService.java:312)
at
com.sun.enterprise.admin.server.core.AdminServiceLifeCycle.onInitialization(
AdminServiceLifeCycle.java:118)
at com.sun.enterprise.server.ApplicationServer.onInitialization(
ApplicationServer.java:271)
at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(
OnDemandServer.java:104)
at com.sun.enterprise.server.PEMain.run(PEMain.java:403)
at com.sun.enterprise.server.PEMain.main(PEMain.java:356)
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 com.sun.enterprise.server.PELaunch.main(PELaunch.java:417)
Mar 25, 2008 3:09:25 PM com.sun.enterprise.server.PEMain run
SEVERE: CORE5071: An error occured during initialization
java.lang.NullPointerException
at java.lang.Class.getConstructor0(Class.java:2700)
at java.lang.Class.getConstructor(Class.java:1657)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:588)
at com.sun.enterprise.admin.util.proxy.ProxyFactory.createProxy(
ProxyFactory.java:69)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.<init>(
SunoneInterceptor.java:171)
at
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.createInstance(
SunoneInterceptor.java:187)
at com.sun.enterprise.admin.server.core.AdminService.init(
AdminService.java:312)
at
com.sun.enterprise.admin.server.core.AdminServiceLifeCycle.onInitialization(
AdminServiceLifeCycle.java:118)
at com.sun.enterprise.server.ApplicationServer.onInitialization(
ApplicationServer.java:271)
at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(
OnDemandServer.java:104)
at com.sun.enterprise.server.PEMain.run(PEMain.java:403)
at com.sun.enterprise.server.PEMain.main(PEMain.java:356)
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 com.sun.enterprise.server.PELaunch.main(PELaunch.java:417)
Mar 25, 2008 3:09:25 PM com.sun.enterprise.server.PEMain run
SEVERE: Server Startup failed. Exiting...
Mar 25, 2008 3:09:25 PM com.sun.enterprise.server.PEMain run
INFO: Server shutdown in progress...
Profiler Agent: 250 classes cached.
Mar 25, 2008 3:09:25 PM com.sun.enterprise.server.ApplicationServeronShutdown
WARNING: CORE5061: Exception :
com.sun.appserv.server.ServerLifecycleException
at com.sun.enterprise.admin.server.core.JmxConnectorLifecycle.onShutdown
(JmxConnectorLifecycle.java:173)
at com.sun.enterprise.server.ApplicationServer.onShutdown(
ApplicationServer.java:549)
at com.sun.enterprise.server.ondemand.OnDemandServer.onShutdown(
OnDemandServer.java:131)
at com.sun.enterprise.server.PEMain.run(PEMain.java:434)
at com.sun.enterprise.server.PEMain.main(PEMain.java:356)
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 com.sun.enterprise.server.PELaunch.main(PELaunch.java:417)
Mar 25, 2008 3:09:25 PM
com.sun.enterprise.admin.server.core.AdminServicedeleteTempDir
WARNING: core.tmp_folder_deletion_failed
Profiler Agent: 250 classes cached.
Mar 25, 2008 3:09:27 PM com.sun.enterprise.server.PEMain run
SEVERE: Server stopped due to Server startup failure.