I deployed one dummy web application in JBoss-eap-6.0 standalone mode, the dummy web-app was working fine but when I tried to monitor this with Appdynamics by adding “set "JAVA_OPTS=%JAVA_OPTS% -javaagent:D:/Serveragent/javaagent.jar" in standalone.conf.bat file of JBoss-eap-6.0 the web application JSP page wasn’t getting opened in browser.
I was getting the below error in JBoss server logs :
12:46:40,124 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/WebApplication1_1].[jsp]] (http-/127.0.0.1:8080-1) Servlet.service() for servlet jsp threw exception: java.lang.ClassNotFoundException: com.singularity.ee.agent.appagent.entrypoint.bciengine.FastMethodInterceptorDelegator from [Module "org.jboss.as.web:main" from local module loader @2a2cc (roots: D:\jboss-eap-6.0\modules)]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java) [jbossweb-7.0.17.Final-redhat-1.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-2.jar:1.0.1.Final-redhat-2]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.17.Final-redhat-1.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-2.jar:1.0.1.Final-redhat-2]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.17.Final-redhat-1.jar:]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]
12:46:40,124 ERROR [org.apache.catalina.connector.CoyoteAdapter] (http-/127.0.0.1:8080-1) An exception or error occurred in the container during the request processing: java.lang.NoClassDefFoundError: com/singularity/ee/agent/appagent/entrypoint/bciengine/FastMethodInterceptorDelegator
at org.apache.catalina.connector.Response.reset(Response.java) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.17.Final-redhat-1.jar:]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]
Caused by: java.lang.ClassNotFoundException: com.singularity.ee.agent.appagent.entrypoint.bciengine.FastMethodInterceptorDelegator from [Module "org.jboss.as.web:main" from local module loader @2a2cc (roots: D:\jboss-eap-6.0\modules)]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.3.GA-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA-redhat-1]
... 8 more
Hi,
Yes, AD pro version supports JBoss EAP 6 (as JBoss EAP 6 is from JBoss 7 community and AD support JBoss 7.x), Can you please configure agent as per instructions at doc and let us know how it goes with lite and pro version of agent:
add the -D JVM property entry and restart JBoss server:
-Djboss.modules.system.pkgs=org.jboss.byteman,com.singularity
http://litedocs.appdynamics.com/display/ADLite/OSGi+Infrastructure
By default, OSGi containers follow a specific model for bootstrap class delegation. Classes that are not specified in the container's CLASSPATH are not delegated to the bootstrap classloader; therefore you must configure the OSGi containers for the App Server Agent classes.
Please let us know if you need further information
Thanks,
Arun
Thanks for very usefull information. This post help me a lot.
But I'm getting now another error: it looks like instrumentation conflicted with jboss CDI??
Thank you!
Alex
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.objectplus.pmo.occ.FileUploadServlet with ClassLoader ModuleClassLoader for Module "deployment.pmo-occ-ear.ear.pmo-occ-web-0.0.1-SNAPSHOT.war:main" from Service Module Loader at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4] at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4] ... 5 more Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 254 in method com.objectplus.pmo.occ.FileUploadServlet.fileUploadWithDesiredFilePathAndName(Ljavax/servlet/http/HttpServletRequest;)V at offset 0 at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_17] at java.lang.Class.privateGetDeclaredFields(Class.java:2317) [rt.jar:1.7.0_17] at java.lang.Class.getDeclaredFields(Class.java:1762) [rt.jar:1.7.0_17] at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.(ClassReflectionIndex.java:57) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4] at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
Hi Alex,
Apologies for the delay in resonse, we have seen such issues earlier with JDK 7.
Can you please add the following option to the JVM start-up script and let us know how it goes after JVM restart:
-XX:-UseSplitVerifier
The jvm option -XX:-UseSplitVerifier disable the byte code verification after the byte code transformation happens by the agent (or any other byte code modifier tools). All these are related to StackMapTable verification by JVM. If that verification fails then the verify error occurs.
Please refer to the below link for more information
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
Let us know if that helps
Thanks,
Arun
Thank you.
Now all is working.
Kind regards,
Alex
Hi,
Yes, AD pro version supports JBoss EAP 6 (as JBoss EAP 6 is from JBoss 7 community and AD support JBoss 7.x), Can you please configure agent as per instructions at doc and let us know how it goes with lite and pro version of agent:
add the -D JVM property entry and restart JBoss server:
-Djboss.modules.system.pkgs=org.jboss.byteman,com.singularity
http://litedocs.appdynamics.com/display/ADLite/OSGi+Infrastructure
By default, OSGi containers follow a specific model for bootstrap class delegation. Classes that are not specified in the container's CLASSPATH are not delegated to the bootstrap classloader; therefore you must configure the OSGi containers for the App Server Agent classes.
Please let us know if you need further information
Thanks,
Arun
Hi Arun,
I am installing appdynamics pro for glassfish 3.1 and I get the same NoClassDefFoundError - java.lang.NoClassDefFoundError: com/singularity/ee/agent/appagent/entrypoint/bciengine/FastMethodInterceptorDelegator
I understand that this is related to the OSGI configuration. Can you let me know what jvm property do I need to add for glassfish?
Hi,
You would need to add the following argument in the correspind file as per your gllasfish osgi container used stated in doc:
org.osgi.framework.bootdelegation=com.singularity.*
http://docs.appdynamics.com/display/PRO39/OSGi+Infrastructure+Configuration
Do restart agent and see how it goes.
Regards,
Arun
Thanks a lot Arun... it worked for me
Hi,
I am using the lite version with JBOSS EAP 6.0
In my standalone.conf i have the following settings
set "JAVA_OPTS=%JAVA_OPTS% -javaagent:C:\swdev\AppDynamicsLite\AppDynamicsLite\AppServerAgentLite\javaagent.jar"
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,com.singularity"
but still the issue is not resolved , i am not able to click on the original link
java.lang.NoClassDefFoundError: com/singularity/ee/agent/appagent/entrypoint/bciengine/FastMethodInterceptorDelegator
Hi ,
Can you add "org.jboss.logmanager" to -D JVM property -Djboss.modules.system.pkgs as mentioned below and let us know how it goes:
1. Open the bin\standalone.conf file.
2. Search for the line JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman" and the com.singularity ad org.jboss.logmanager packages to that line as follows:
JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman,com.singularity,org.jboss.logmanager"
3. Open the bin\standalone.conf.bat file.
4. Search for the following line:
[code}
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman
Add the package com.singularity to that line as follows:
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,com.singularity"
5. Save the file.
6. Open the standalone.bat file.
7. Add the following javaagent argument to the standalone.bat file.
:RESTART
"%JAVA%" -javaagent:<AGENT-DIR>javaagent.jar %JAVA_OPTS% ^
"-Dorg.jboss.boot.log.file=%JBOSS_HOME%\standalone\log\boot.log" ^
"-Dlogging.configuration=file:%JBOSS_HOME%/standalone/configuration/logging.properties" ^
-jar "%JBOSS_HOME%\jboss-modules.jar" ^
8. Save the file.
If you still see the issue, please send the jboss server console agent error stack tracke and also logs under "C:\swdev\AppDynamicsLite\AppDynamicsLite\AppServerAgentLite\logs", and also attached standalone.conf and standalone.bat file to debug further
Thanks,
Arun
Hi ,
Thanks for the logs and script files, Can you please try the following:
1)We see that you are using lite version of agent, so you do not need to provide the following properties and also seems this values are invalid:
-Dappdynamics.agent.accountName=customer1
-Dappdynamics.agent.accountAccessKey=customer1 (and the default customer1 account name password is not customer1)
Can you confirm whether you are have started liteviewer, as we see the following error in agent logs:
==================================
[AD Thread Pool-Global1] 04 Jun 2013 16:42:38,530 ERROR ConfigurationChannel - Fatal transport error: Connection refused: connect
[AD Thread Pool-Global1] 04 Jun 2013 16:42:38,531 WARN ConfigurationChannel - Could not connect to the controller/invalid response from controller, cannot get initialization information, controller host [127.0.0.1], port[8990], exception [Fatal transport error: Connection refused: connect]
=========================================
refer docs for steps to install lite viewer: http://litedocs.appdynamics.com/display/ADLite/Installing+the+Viewer
2) Once the lite viewer is accessible at http://localhost:8990 (admin/admin), Can you please add the following jvm option to the jvm opts to the jboss startup jvm args:
-XX:-UseSplitVerifier,
===============================
we suggested the above option as we see the following error:
Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 28 in method edu.darden.registrar.servlet.AdminStartupServlet.init(Ljavax/servlet/ServletConfig;)V at offset 0
===============================
3) Can you take the backup of the standalone.bat under the <jboss_install_dir>/bin directory and update the standalone.bat as follows:
search for string: "SET JAVA_PROFILER=C:/projects/AppDynamicsLite/AppServerAgentLite/javaagent.jar"
and comment as follows:
rem SET JAVA_PROFILER=C:/projects/AppDynamicsLite/AppServerAgentLite/javaagent.jar
and update the below section as follows:
before update:
============
:RESTART
"%JAVA%" -javaagent:%JAVA_PROFILER% %JAVA_OPTS% ^
"-Dorg.jboss.boot.log.file=%JBOSS_LOG_DIR%\server.log" ^
"-Dlogging.configuration=file:%JBOSS_CONFIG_DIR%/logging.properties" ^
-jar "%JBOSS_HOME%\jboss-modules.jar" ^
=================================
after update:
================
:RESTART
"%JAVA%" %JAVA_OPTS% ^
"-Dorg.jboss.boot.log.file=%JBOSS_LOG_DIR%\boot.log" ^
"-Dlogging.configuration=file:%JBOSS_CONFIG_DIR%/logging.properties" ^
-javaagent:"C:\projects\AppDynamicsLite\AppServerAgentLite\javaagent.jar" ^
-jar "%JBOSS_HOME%\jboss-modules.jar" ^
======================
now restart jboss and let us know how it goes.
If you still see the issue, please provide the standalone.conf.bat file as well and console output of jboss server with agent starting with jboss server in addition to latest agent logs.
Thanks,
Arun
Hi!
I have similiar problems when I try to start Jboss with Agent Lite.
Version:
JBossAS [6.0.0.Final "Neo"]
Server Agent Lite v3.3.4.0 RC Build Date 2013-03-20 20:23
I have tired diffrent settings in run.bat, but I always get the MSG "Running obfuscated agent" at startup and then it crash.
I attach log-files and run.bat. Can you see what settings I perhaps should change?
Best regards,
Markus
Hi Markus,
Thanks for writing to us. We confirm that our Pro version of product officially support JBoss EAP 6.0.
We see the issue from agent logs that lite agent is not able to connect to liteviewer and does not register. Can you please make sure that liteviewer is running on same agent lite machine where jboss installed and is running at localhost:8990 as we see the following error, restart agent lite once liteivewer is up:
[AD Thread Pool-Global0] 03 okt 2013 16:40:08,030 WARN ConfigurationChannel - Could not connect to the controller/invalid response from controller, cannot get initialization information, controller host [127.0.0.1], port[8990], exception [Fatal transport error: Connection refused: connect]
Regarding the crash issue, can you please configure agent as we suggested in this post earlier and send the error stack trace you are seeing on jboss server console if any errors while starting with lite agent.
refer lite docs for supported server vesions: http://litedocs.appdynamics.com/display/ADLite/Supported+Applications+and+Frameworks+for+Java#Suppor...
Let us know if that clarifies your query.
Thanks,
Arun
Hi!
The lite viewer and agent is running on same server.
In run.bat these lines is added (hope that is the posts you referred to):
set JAVA_OPTS=%JAVA_OPTS% -XX:-UseSplitVerifier
set JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,com.singularity
set JAVA_OPTS=%JAVA_OPTS% -javaagent:"E:\JavaProgram\AppDynamicsLite\AppServerAgentLite\javaagent.jar"
I attach the log-files from JBoss.
Best Regards,
Markus
Hi Markus,
Can you please confirm the JDK version you are using , we see such errors using particular JDK version 1.7.0_24?
Also can you update the jvm args in addition to other -D properties and let us know how it goes:
We understood that you are using windows environment. Can you please try the following:
1. Open the server run.bat file, located at <jboss_version_install_dir>/bin.
2. Add the following Java environment variables to the server start script.
JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
JAVA_ARGS=%JAVA_OPTS% -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl
JBOSS_CLASSPATH=<path_to>"jboss-logmanager.jar"
3. Add the following javaagent argument to the server start script.
set JAVA_OPTS=%JAVA_OPTS% -javaagent:"E:\AppDynamicsLite\AppServerAgentLite\javaagent.jar"
4. Restart the application server. The application server must be restarted for the changes to take effect.
5. If the issue persists check if adding the following -D property helps:
-Dappdynamics.bciengine.class.lookahead=!*
If you still the issue. Please provide the run.bat, application server logs and error stack-trace to debug further.
Thanks,
Arun
Hi Markus,
Though lite does not officially support jboss eap 6.0 but we expect to work, as we see it is working fine in our local,
Can you try the following:
- upgrade to higher minor version of jdk 1.6 and try if that makes any diff from 1.6.0_24 build
- remove all other -D and -javaagent agent parameters and check whether ClassCircularityError error raises in jboss server_start.log and attach to ticket
- and now add only -javaagent agent arg to run.bat and try starting jboss and check whether circulatory error raises in jboss logs
- also try adding part from -javaagent parameters in run.conf.bat instead in run.bat and check how it goes.
Keep us posted how it goes
Thanks,
Arun
Kumar,
I am trying to get the AppServerAgentLite running on EAP6.
My app deploys fine without the Agent
If I follow the directions here, I get the errors in the attached files
I ran my logging in debug mode on EAP6.
Please help as I need to find a method that is slowing down my system fast.
Thank you!
What is the dependency on org.jboss.logmanager? I have the agent collecting data on JBoss EAP 6.0.1 without the logmanager included as part of the -Djboss.modules.system.pkgs option. How will this come back to haunt me in the future?