Subpackages and Oracle metadata not getting captured when using APM in Tomcat 7

Kibana version: 7.7.1

Elasticsearch version: 7.7.1

APM Server version: 7.7.1

APM Agent language and version: Java, elastic-apm-agent-1.16.0.jar

Browser version:

Original install method (e.g. download page, yum, deb, from source, etc.) and version: yum (for apm server)

Fresh install or upgraded from other version? Fresh

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. No

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
We are using Tomcat version : 7, Oracle version 12.2.x

The subpackages are not getting captured. Only The top level servlet and the method are shown. The other subpackages are not displayed. The Oracle meta data is not getting captured. Only hibernate queries are shown. i.e from the servlet controller, it directly shows the queries.

Steps to reproduce:

  1. Created setenv.sh
    2.Added the following
    export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/path/to/elastic-apm-agent-1.16.0.jar"
    export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.service_name=xyz-service"
    export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.application_packages=com.xyz"
    export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.server_urls=http://xx.xx.xx.xx:8200"
    export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.log_level=TRACE"

Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
2020-07-03 09:48:28.314 [main] WARN co.elastic.apm.agent.bci.bytebuddy.ErrorLoggingListener - org.slf4j.impl.Log4jLoggerAdapter uses an unsupported class file version (pre Java 5) and can't be instrumented. Consider updating to a newer version of that library.
2020-07-03 09:48:58.744 [localhost-startStop-1] WARN co.elastic.apm.agent.bci.bytebuddy.ErrorLoggingListener - org.jibx.ws.http.servlet.WsSpringServlet uses an unsupported class file version (pre Java 5) and can't be instrumented. Consider updating to a newer version of that library.
2020-07-08 08:56:16.193 [localhost-startStop-1] WARN co.elastic.apm.agent.bci.bytebuddy.ErrorLoggingListener - org.apache.axis.transport.http.AxisServlet uses an unsupported class file version (pre Java 5) and can't be instrumented. Consider updating to a newer version of that library.
2020-07-07 11:42:13.793 [http-bio-9080-exec-4] WARN co.elastic.apm.agent.jdbc.helper.ConnectionMetaData - Failed to parse address from this address list: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST = xx.xx.xx.xx)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=test)(METHOD=basic))))

Hi @Bhavani_Ananth

The XXX uses an unsupported class file version warning messages indicate that bytecode of the XXX class was compiled for a java version that predates Java 5, thus likely 1.4 or 1.3.

Currently our agent is not able to instrument those classes, thus we just ignore them.
Updating your dependencies to more recent versions might not be possible because the Axis 1.x project hasn't had any release since 14 years.

That explains why you only see transactions through your top-level servlets, as those are supported, and it's not an issue as long as the servlet that wraps the whole transaction execution is supported (if you are using spring MVC, the dispatcher servlet works will have this role).

If you want to see what is in-between your top-most servlet and database as spans, you need to apply one of those strategies to create spans that reflect what your application is doing.

For Oracle Metadata, I think that our parsing does not support spaces in this part of the jdbc connection URL, can you confirm us that the full JDBC url is in this format: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST = 1.2.3.4)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=test)(METHOD=basic))))

After checking in more detail, the issue with Oracle metadata is that you seem to have an extra ) at the end of your JDBC url, and Oracle driver is likely ignoring it.

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