Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

NoSuchMethod Error AgentBuilder - Can't Start Web Application #444

Open
echua opened this issue Feb 28, 2019 · 5 comments
Open

NoSuchMethod Error AgentBuilder - Can't Start Web Application #444

echua opened this issue Feb 28, 2019 · 5 comments

Comments

@echua
Copy link

echua commented Feb 28, 2019

Spring MVC
SpringBoot 2.1.2

Trying to use the PetClinic example but still cannot get this work. I get errors. Also, for the application, I am using the SpringBootServletInitializer rather than the ServletContextInitializer like in the PetClinic example.

@SpringBootApplication
@EnableScheduling
public class Application extends SpringBootServletInitializer {

public static void main(String[] args) {
	// Stagemonitor.init();  ****
	SpringApplication.run(Application.class, args);
}

public Application() {
	super();
	setRegisterErrorPageFilter(false);
}

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
	return application.sources(Application.class);
}

@Override
public void onStartup(ServletContext servletContext) throws ServletException {
	super.onStartup(servletContext);
	......
}

[m java.lang.NoSuchMethodError: net.bytebuddy.agent.builder.AgentBuilder$Identified$Extendable.asDecorator()Lnet/bytebuddy/agent/builder/AgentBuilder;
at org.stagemonitor.core.instrument.AgentAttacher.initByteBuddyClassFileTransformer(AgentAttacher.java:217) ~[stagemonitor-core-0.88.9.jar:0.88.9]
at org.stagemonitor.core.instrument.AgentAttacher.performRuntimeAttachment(AgentAttacher.java:85) ~[stagemonitor-core-0.88.9.jar:0.88.9]
at org.stagemonitor.core.Stagemonitor.reset(Stagemonitor.java:315) ~[stagemonitor-core-0.88.9.jar:0.88.9]
at org.stagemonitor.core.Stagemonitor.reset(Stagemonitor.java:297) ~[stagemonitor-core-0.88.9.jar:0.88.9]
at org.stagemonitor.core.Stagemonitor.init(Stagemonitor.java:58) [stagemonitor-core-0.88.9.jar:0.88.9]
at org.stagemonitor.web.servlet.ServletPlugin$Initializer.onStartup(ServletPlugin.java:503) [stagemonitor-web-servlet-0.88.9.jar:0.88.9]

POM file, I copied from the example.

org.stagemonitor
stagemonitor-web-servlet
${stagemonitor.version}


org.stagemonitor
stagemonitor-tracing-elasticsearch
${stagemonitor.version}


org.stagemonitor
stagemonitor-logging
${stagemonitor.version}


org.stagemonitor
stagemonitor-os
${stagemonitor.version}


org.stagemonitor
stagemonitor-alerting
${stagemonitor.version}


net.sf.uadetector
uadetector-resources
2014.10

@jpfourny
Copy link

Can you confirm the version of ByteBuddy? That method was removed in later versions.

@echua
Copy link
Author

echua commented Feb 28, 2019

Checking the lib directory.

byte-buddy-1.9.7.jar
byte-buddy-agent-1.9.7.jar

@jpfourny
Copy link

That explains it. Stagemonitor will not work with anything above 1.8.11, in my experience. 1.9.x contains binary incompatible changes and 1.8.12+ seems to cause test failures and JVM crashes (at least with IBM OpenJ9).

@echua
Copy link
Author

echua commented Feb 28, 2019

What do you suggest to fix this?

@jpfourny
Copy link

jpfourny commented Mar 1, 2019

Down-grade ByteBuddy to 1.8.11.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants