Wildfly 8 doesn't work with elastic-apm-agent-0.5.1
See original GitHub issueHi I am trying to connect the java-apm-agent to wildfly but notice that wildfly won’t run correctly. If i comment out the -javaagent part wildfly runs normaly.
Caused by: java.lang.NoClassDefFoundError: co/elastic/apm/jdbc/StatementInstrumentation
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:266)
at org.postgresql.jdbc.PgConnection.execSQLQuery(PgConnection.java:455)
at org.postgresql.jdbc.PgConnection.execSQLQuery(PgConnection.java:449)
at org.postgresql.jdbc.PgConnection.getTransactionIsolation(PgConnection.java:833)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) [:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_161]
at org.postgresql.ds.PGPooledConnection$ConnectionHandler.invoke(PGPooledConnection.java:333)
at com.sun.proxy.$Proxy77.getTransactionIsolation(Unknown Source)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) [:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_161]
at org.postgresql.xa.PGXAConnection$ConnectionHandler.invoke(PGXAConnection.java:166)
at com.sun.proxy.$Proxy77.getTransactionIsolation(Unknown Source)
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.<init>(BaseWrapperManagedConnection.java:197)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.<init>(XAManagedConnection.java:68)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.newXAManagedConnection(XAManagedConnectionFactory.java:523)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:496)
standalone.conf
JBOSS_LOG_MANAGER_LIB="$(echo $JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-*.jar)" # resolve logmanager jar
JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:$JBOSS_LOG_MANAGER_LIB"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager"
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
JAVA_OPTS="$JAVA_OPTS -Delastic.apm.service_name=lnk-timetable-wf-b-f11"
JAVA_OPTS="$JAVA_OPTS -Delastic.apm.application_packages=se.linkon"
JAVA_OPTS="$JAVA_OPTS -Delastic.apm.server_url=http://192.168.72.1:8300"
JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=10.0.2.15:9090,server=y,suspend=n"
JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/monitoring/elastic-apm-agent-0.5.1.jar"
Wildfly 8 elastic-apm-agent-0.5.1.jar jre-1.8.0-openjdk
/Regards Fredrik
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
APM and wildfly integration. Couldn't get response from APM ...
APM Agent language and version: elastic-apm-agent-1.18.0.RC1.jar: ... The java application is started as a wildfly service: java-wildfly
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug:1523 - "[IDEA] Offload work by distributing trivial ebuild ... with custom FTP-port doesn't work" status:RESOLVED resolution:OBSOLETE severity:major ...
Read more >Administrators Guide - OpenNMS Projects
This documentation provides information and procedures on setup, configuration, and use of the OpenNMS Horizon platform. Using a task-based approach, chapters ...
Read more >Search Results - CVE
CVE-2022-46153, Traefik is an open source HTTP reverse proxy and load balancer. ... CVE-2019-7617, When the Elastic APM agent for Python versions before ......
Read more >FreeBSD Ports Collection Index
GiNaC-1.3.8 -- A C++ library for symbolic mathematical calculations ... bpatch-1.0_1 -- A hex editor that doesn't load the whole file at once...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
WildFly now works out-of-the-box without any configuration changes apart from adding the
-javaagent
flag 🙂@lk95jofr This problem related with OSGI class loading. You should configure specific setting to standalone.conf or domain.conf for install java agent. Maybe you can find parts below.
Try attach elastic package to there as like
JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman,co.elastic"
So WildFly will load all class of co.elastic package ignoring normal OSGI delegation.