AppD Archive

ClassDefNotFoundError

CommunityUser
Splunk Employee
Splunk Employee

Hi.

I have installed the viewer and the agent. But when i deploy my project's war file, im getting thefollowing error.

java.lang.NoClassDefFoundError: com/singularity/ee/agent/appagent/entrypoint/bciengine/MethodExecutionEnvironment

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

It's also possible to get this error when the app server doesn't have correct permissions to the javaagent.jar

0 Karma

Arun_Dasetty
Super Champion

Hi,

Thanks for the agent specific error stack trace, we see earlier similar errors when com.singularity package is not added to server with osgi framework, We understood that you are configuring server using OSGI framework, let us know if any disconnect.

"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."

Can you please add the -D JVM property with com.singularity value in entry and restart server, refer steps to configure agent for osgi framework for jboss in addition to -javagenet entry:
=================
To add the javaagent command in a Windows environment for JBoss AS 7.x

 

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:

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.

=============



refer docs:  http://litedocs.appdynamics.com/display/ADLite/OSGi+Infrastructure

If you still see the issue, please let us know server(Ex: jboss, glaasfish) and server version you are using, so that we will send application server specific instructions to configure agent.

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi,

Today i tried to set up the java agent on Jboss-eap-6.1 version as per the steps mentioned in the below fourm.

http://docs.appdynamics.com/display/PRO14S/JBoss+and+Wildfly+Startup+Settings#JBossandWildflyStartup...

After doing the chagnes mentioned in the forum, I restarted the server and could see the message that "Started AppDynamics Java Agent Successfully.".

How ever when i try to access my deployed application from browser, I see the below exception in logs.

java.lang.NoClassDefFoundError: com/singularity/ee/agent/appagent/entryp
oint/bciengine/MethodExecutionEnvironment

The complete log is attached to this request.

Can you please help me to solve the issue? 

0 Karma

Arun_Dasetty
Super Champion

Hi,

We see you are seeing the noclassdeffounderror in jboss startup console logs due to lite version of agent:

=======================================

Using Agent Version [Server Agent Lite v2.1.1 GA Build Date 2010-05-12 09:30]

...
ERROR [org.apache.catalina.connector] (http-/127.0.0.1:8080-1) JBWE B001018: An exception or error occurred in the container during the request processing: java.lang.NoClassDefFoundError: com/singularity/ee/agent/appagent/entrypoint/bciengine/MethodExecutionEnvironment

=====================================

We would like to inform that we officially do not support LiteViewer version of AD agent and also we would like to inform that this agent error is already address in our pro version of product and you can get over this error by adding

org.osgi.framework.bootdelegation=com.singularity.* Or by adding similar steps earlier suggested:

set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,com.singularity"

But the above steps will work only for our Pro version of agent, we request you to try the agent config using our pro version of agent and see how it goes. Hope that information helps.

Regards,

Arun

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

Thanks for your quick response. It really saved my time.

As you suggessted i took the AppDynamicsPRO agent for this and done the set up. Now i am not getting this error.

As with PRO agent we have to either SAAS or On-Premise to monitor the application performance i choose SAAS and tried to monitor the application performance.

First i am doing this in my local system with a simle hellow.jsp deploying as a war file in the JBOSS server.

When i hit the jsp like http://localhost:8080/hello/ i dont see any call in the SAAS monitoring screen. I am wondering if i miss any step while configuring.

I have attached SAAS screenshot to this.

I also observed one error while start up log of the jboss server.

Running obfuscated agent
Registered app server agent with Node ID[13823] Component ID[4304] Application I
D [1240]
Started AppDynamics Java Agent Successfully.
Error: Could not find or load main class ^
The filename, directory name, or volume label syntax is incorrect.
15:30:23,827 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.Final-
redhat-1.....

Thanks again for your help on this. If i am able to set up properly on my local then i will move this to test and production.

Thanks,

Satheesh

0 Karma

Arun_Dasetty
Super Champion

Hi Satheesh,

From the error we could confirm that we see such errors when the referred jar does not contain main class we wonder the error  liste belwo capture from provided logs is related:

JAVA_OPTS already set in environment; overriding default settings with values:
-Xms256m -Xmx512m

Can you confirm whether you could start jboss without agent configured fine using same standalone.bat file ?

Can you quickly send the following details we suspect that somehow wrong jar/startup script referred which does not have main method as startup jar program and that resulting in appserver to fail to start:

- zipped version of logs under path

    "D:\Satheesh\Satheesh_SystemExcellence\AppDynamicsPRO\Ap pServerAgent\logs\Node c5fc"

- jboss startup scripts (standaline.bat and standalone.conf) in which you did changes as per docs to configure jboss

- output of command:

echo %PATH%
echo %JAVA_OPTS%

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

Thanks for the quick reply.

I attached the log files and the start up scripts to this message.

Below are the output for the commands:

echo %PATH%

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind
owsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Oracle\ins
tantclient_11_2

echo %JAVA_OPTS%

-Xms256m -Xmx512m

I have done this configuration as per the steps mentioned in the below link.

http://docs.appdynamics.com/display/PRO12S/JBoss+Startup+Settings#JBossStartupSettings-Toaddthejavaa...

Thanks,

Satheesh

0 Karma

Arun_Dasetty
Super Champion

Hi Satheesh,

Can you take a backup of standalone.bat, standalone.conf and standalone.conf.bat under your jboss directory and try to run the standalone.bat after replacing the files attached at <jboss_install_dir> and see how it goes after restart in new command console?

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

Yes, Now it is working. What was the reason for not working earlier?

Looking at the changes, I observe that the difference is as i created the below Java min and max memory values in my environment variables and also the Restart command settings in the standalone.bat files.

echo %JAVA_OPTS%

-Xms256m -Xmx512m

Thanks,

Satheesh

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Thanks Arun. It works fine now. Was stuck with this during weekend. Thanks again. Great product, awesome support 🙂

0 Karma
Get Updates on the Splunk Community!

Cisco Catalyst Center Meets Splunk ITSI: From 'Payments Are Down' to Root Cause in ...

The Problem: When Networks and Services Don't Talk Payment systems fail at a retail location. Customers are ...

Print, Leak, Repeat: UEBA Insider Threats You Can't Ignore

Are you ready to uncover the threats hiding in plain sight? Join us for "Print, Leak, Repeat: UEBA Insider ...

New Year, New Changes for Splunk Certifications

As we embrace a new year, we’re making a small but important update to the Splunk Certification ...