# Unable to instrument WebLogic Server with APM Java Agent

**URL:** <https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312>\
**Category:** APM\
**Created:** [August 7, 2018, 11:27am UTC](https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312 "2018-08-07T11:27:24Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![Madan](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Madan](https://discuss.elastic.co/u/Madan)\
**Post date:** [August 23, 2018, 11:08am UTC](https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312/21 "2018-08-23T11:08:29Z")

</div>

I'm getting below error after using new agent file.

2018-08-23 12:04:40.072 [[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG co.elastic.apm.impl.ElasticApmTracer - startTransaction '' 4609ba3f2808f709c90301028304f181 {  
2018-08-23 12:04:40.072 [[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'] TRACE co.elastic.apm.impl.ElasticApmTracer - starting transaction at  
java.lang.RuntimeException: this exception is just used to record where the transaction has been started from  
at co.elastic.apm.impl.ElasticApmTracer.startManualTransaction(ElasticApmTracer.java:142)  
at co.elastic.apm.impl.ElasticApmTracer.startTransaction(ElasticApmTracer.java:127)  
at co.elastic.apm.servlet.ServletTransactionHelper.onBefore(ServletTransactionHelper.java:98)  
at javax.servlet.http.HttpServlet.service(HttpServlet.java:680)  
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)  
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)  
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)  
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)  
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)  
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:247)  
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3679)  
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3649)  
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)  
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)  
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)  
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)  
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2433)  
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281)  
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2259)  
at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1691)  
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1651)  
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270)  
at weblogic.invocation.ComponentInvocationContextManager.\_runAs(ComponentInvocationContextManager.java:348)  
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)  
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)  
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)  
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)  
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)  
at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)  
2018-08-23 12:04:40.097 [[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG co.elastic.apm.impl.ElasticApmTracer - } endTransaction 'HEAD' 4609ba3f2808f709c90301028304f181

---

<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 23, 2018, 11:59am UTC](https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312/22 "2018-08-23T11:59:58Z")

</div>

This is not an error, it just prints out the current stacktrace whenever a transaction is started and stopped. Note the exception message is `this exception is just used to record where the transaction has been started from`. It is also only logged on `TRACE` level. I suggest setting the log level to `DEBUG` or `INFO` so that you don't see those "exceptions".

---

<div class="post-metadata">

**Author:** ![Madan](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Madan](https://discuss.elastic.co/u/Madan)\
**Post date:** [August 28, 2018, 5:04am UTC](https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312/23 "2018-08-28T05:04:13Z")

</div>

I didn't see any errors with the new agent file, but there is no metrics captured when i login to Kibana \> APM. Any ideas what to check for?

---

<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 28, 2018, 8:48am UTC](https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312/24 "2018-08-28T08:48:13Z")

</div>

Could you attach a complete debug log (without trace) with the current snapshot?

---

<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 28, 2018, 8:51am UTC](https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312/25 "2018-08-28T08:51:32Z")

</div>

FWIW, another user [reported](https://github.com/elastic/apm-agent-java/issues/109#issuecomment-416331739) that the agent seems to work for him with WebLogic 12.2.1.3.0.

---

<div class="post-metadata">

**Author:** ![Madan](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Madan](https://discuss.elastic.co/u/Madan)\
**Post date:** [September 11, 2018, 5:25am UTC](https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312/26 "2018-09-11T05:25:02Z")

</div>

With the updated Agent, we did see the sql queries related data. but our application has lots of EJB calls, and it doesn't show any details about. Can you help to check it?

Do you have any list of technologies or the instrumentation it supports currently? Is there a way to add custom instrumentation for user defined classes/methods?

---

<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:** [September 11, 2018, 6:51am UTC](https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312/27 "2018-09-11T06:51:45Z")

</div>

> [@Madan](#):
>
> With the updated Agent, we did see the sql queries related data.

That's great to hear!

> [@Madan](#):
>
> but our application has lots of EJB calls, and it doesn't show any details about.

Currently, EJB calls are not supported. [Here](https://www.elastic.co/guide/en/apm/agent/java/current/intro.html#supported-technologies) is a list of all currently supported technologies. Also, note the supported technologies in the [current development branch](https://www.elastic.co/guide/en/apm/agent/java/master/intro.html#supported-technologies).

> [@Madan](#):
>
> Is there a way to add custom instrumentation for user defined classes/methods?

There certainly is! Check out the [public API documentation](https://www.elastic.co/guide/en/apm/agent/java/master/public-api.html).

---

<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:** [October 2, 2018, 2:51am UTC](https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312/28 "2018-10-02T02:51:52Z")

</div>

Closed on October 2, 2018, 2:51am UTC

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

[Previous page](https://discuss.elastic.co/t/unable-to-instrument-weblogic-server-with-apm-java-agent/143312.md?page=1)
