Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring complains that it needs to be started with agent when it actually is started that way [SPR-6147] #10815

Closed
spring-projects-issues opened this issue Apr 9, 2009 · 4 comments
Labels
type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Paul Schifferer opened SPR-6147 and commented

Spring complains that it needs to be started with an agent in order to use the InstrumentationLoadTimeWeaver even when it is, in fact, started with said agent.

[pschifferer@leo ~/Projects/workspaces/apps/torchlight/target/distributions/Torchlight-macosx-1.0.0/Torchlight.app/Contents/Resources/Java] java -Dosgi.requiredJavaVersion=1.5 -Xdock:icon=../torchlight.icns -XstartOnFirstThread -Xms40m -Xmx512m -XX:MaxPermSize=256m -Dorg.eclipse.swt.internal.carbon.smallFonts -javaagent:spring-agent-2.5.6.jar -jar plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar
log4j:WARN No appenders could be found for logger (org.springframework.osgi.extender.internal.activator.ContextLoaderListener).
log4j:WARN Please initialize the log4j system properly.
Discovered configurations {config/*} in bundle [Torchlight Core Application (net.sourceforge.torchlight.core.application;singleton:=true)]
Refreshing org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext@23cfcf: display name [OsgiBundleXmlApplicationContext(bundle=net.sourceforge.torchlight.core.application, config=config/)]; startup date [Thu Apr 09 22:52:01 PDT 2009]; root of context hierarchy
Unpublishing application context OSGi service for bundle Torchlight Core Application (net.sourceforge.torchlight.core.application;singleton:=true)
Loading XML bean definitions from URL [bundleentry://26/config/core-application-context.xml]
Bean factory for application context [org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext@23cfcf]: org.springframework.beans.factory.support.DefaultListableBeanFactory@d3509c
Loading properties file from OSGi resource[classpath:torchlight.properties|bnd.id=26|bnd.sym=net.sourceforge.torchlight.core.application]
Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=net.sourceforge.torchlight.core.application, config=config/
))
java.lang.IllegalStateException: Must start with Java agent to use InstrumentationLoadTimeWeaver. See Spring documentation.


Referenced from: commits ce800fb

@spring-projects-issues
Copy link
Collaborator Author

Costin Leau commented

Paul, this looks like a Spring problem rather then a Spring DM specific one. Most likely the class is loaded twice and is not considered valid somehow.

@spring-projects-issues
Copy link
Collaborator Author

Costin Leau commented

Affects Spring DM 1.2 RC1

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Our context bundle which includes InstrumentationLoadTimeWeaver has an optional import for org.springframework.instrument.*;version="[3.0.0, 3.0.1)"... Could it be that the agent specified on startup is actually being added to the system classpath and hence doesn't get imported here? I guess I'll change that version range to start from 0...

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Hopefully resolved through a version="0" import for that package. To be tested.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant