# APM java agent on JBoss 6

**URL:** <https://discuss.elastic.co/t/apm-java-agent-on-jboss-6/144066>\
**Category:** APM\
**Created:** [August 13, 2018, 5:27am UTC](https://discuss.elastic.co/t/apm-java-agent-on-jboss-6/144066 "2018-08-13T05:27:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)\
**Post date:** [August 13, 2018, 5:27am UTC](https://discuss.elastic.co/t/apm-java-agent-on-jboss-6/144066/1 "2018-08-13T05:27:43Z")

</div>

Hello all,

i have problems to use the apm-java-agent within a jboss6 application server. I know this server isn't listed in the officaly supported webservers, but i hope someone can help.  
The problem lies probably not with the apm-java-agent itself but with the way i integrated the agent.

I can add the java agent to the start configuration of the jboss server and it instruments the parts that should be instrument (JDBC and Servlet container).

The problem comes when i try to call a url from an app that is deployed in the jboss 6 server. With a call there is always a NoClassDefFound Error in the Logs for the Elastic APM Classes. But this is only the case for the JDBC Span, i get a transaction for this request in the apm server.

> <https://gist.github.com/Shaoranlaos/5740cd106d6f2ed3e4b0cadb5435292e>

I have set the java agent argument in the run.conf.bat

```auto
set "JAVA_OPTS=%JAVA_OPTS% -javaagent:U:\Projects\ElkStack\apm\elastic-apm-agent-0.6.1.jar"

```

I also tried to include the agent jar in the classpath but that was not helpfull (server not starting).

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [August 13, 2018, 7:47am UTC](https://discuss.elastic.co/t/apm-java-agent-on-jboss-6/144066/2 "2018-08-13T07:47:58Z")

</div>

Hi and thanks for the report!

I'm afraid there is not easy fix or workaround for this. The problem lies in the way JBoss loads classes.  
But I'll look into that problem and see how easy it is to add support for JBoss.

Could you tell me the exact version you are using?

Thanks,  
Felix

---

<div class="post-metadata">

**Author:** ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)\
**Post date:** [August 13, 2018, 8:04am UTC](https://discuss.elastic.co/t/apm-java-agent-on-jboss-6/144066/3 "2018-08-13T08:04:36Z")

</div>

We are using jboss 6.1.0 (I known not the newest version 😁)  
apm-agent: 0.6.1  
Elastic Stack (ES+Kibana+APM-Server): 6.2.4

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [August 14, 2018, 10:20am UTC](https://discuss.elastic.co/t/apm-java-agent-on-jboss-6/144066/4 "2018-08-14T10:20:01Z")

</div>

Is JBoss 6.1.0 Java 7 compatible? I could not find information about that, but I think it might not be. The Java agent only supports Java 7+ applications.

---

<div class="post-metadata">

**Author:** ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)\
**Post date:** [August 14, 2018, 10:53am UTC](https://discuss.elastic.co/t/apm-java-agent-on-jboss-6/144066/5 "2018-08-14T10:53:22Z")

</div>

don't know if it is officialy supported but when i use a JVM Version 7 it starts and the applications are working  
(can't say if that is true for all features)

edit: [https://access.redhat.com/articles/111663](https://access.redhat.com/articles/111663)  
here is till java 7 for jboss 6.1

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [August 14, 2018, 12:00pm UTC](https://discuss.elastic.co/t/apm-java-agent-on-jboss-6/144066/6 "2018-08-14T12:00:46Z")

</div>

But that page is about JBoss EAP, the enterprise version of JBoss. JBoss AS is the community version and is called WildFly as of version 8. I could not find any information about JBoss AS Java compatibility so far 🤔

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 4, 2018, 8:00am UTC](https://discuss.elastic.co/t/apm-java-agent-on-jboss-6/144066/7 "2018-09-04T08:00:57Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
