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 plugin doesn't work on wildfly 12 #269

Closed
aekrylov opened this issue Oct 18, 2018 · 1 comment
Closed

Spring plugin doesn't work on wildfly 12 #269

aekrylov opened this issue Oct 18, 2018 · 1 comment

Comments

@aekrylov
Copy link

aekrylov commented Oct 18, 2018

I'm using hotswap agent 1.3.0 with Spring plugin enabled for war packaged web app on Wildfly 12. The agent is attached via the command line (i.e. -XXaltjvm=dcevm -javaagent:%JBOSS_HOME%\bin\webbpm-hotswap-agent.jar"). Classes are reloaded through JPDA. Core hotswap features work just fine, though the Spring plugin doesn't refresh components.
Spring is initialized through WebAppInitializers, with component scan enabled with annotations in config classes. I tried managed war and exploded deployments as well as unmanaged exploded deployment, neither of which works.
On the app startup, i see warnings like that in Wildfly logs:

HOTSWAP AGENT: 18:04:54.439 WARNING (org.hotswap.agent.watch.nio.TreeWatcherNIO) - Unable to watch for path vfs:/C:/jboss-home/standalone/data/managed-exploded/backend.war/WEB-INF/classes/service/, not a local regular file or directory.

Is there something else I should do to make the plugin work?

@aekrylov
Copy link
Author

When using exploded deployments, I see following errors during the hotswap:

 HOTSWAP AGENT: 18:07:00.881 ERROR (org.hotswap.agent.util.signature.ClassSignatureComparerHelper) - Error reading siganture
 org.hotswap.agent.javassist.NotFoundException: lib_package.LibClass
 	at org.hotswap.agent.javassist.ClassPool.get(ClassPool.java:445)
 	at org.hotswap.agent.javassist.CtClassType.getSuperclass(CtClassType.java:780)
 	at org.hotswap.agent.util.signature.CtClassSignature.getValue(CtClassSignature.java:69)
	at org.hotswap.agent.util.signature.ClassSignatureComparerHelper.getCtClassSignature(ClassSignatureComparerHelper.java:21)
 	at org.hotswap.agent.util.signature.ClassSignatureComparerHelper.isDifferent(ClassSignatureComparerHelper.java:37)
 	at org.hotswap.agent.util.signature.ClassSignatureComparerHelper.isPoolClassDifferent(ClassSignatureComparerHelper.java:64)
 	at org.hotswap.agent.plugin.spring.signature.ClassSignatureComparer.isPoolClassDifferent(ClassSignatureComparer.java:31)
	at org.hotswap.agent.plugin.spring.SpringChangesAnalyzer.classChangeNeedsReload(SpringChangesAnalyzer.java:43)
 	at org.hotswap.agent.plugin.spring.SpringChangesAnalyzer.isReloadNeeded(SpringChangesAnalyzer.java:36)
 	at org.hotswap.agent.plugin.spring.SpringPlugin$1.transform(SpringPlugin.java:108)
	at org.hotswap.agent.util.HotswapTransformer.transform(HotswapTransformer.java:189)
 	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
 	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)

The class in error is a superclass of a spring Component class being hotswapped, and is located in the jar under WEB-INF/lib

@skybber skybber closed this as completed in 0e3fa16 Mar 9, 2019
golovlyev pushed a commit to golovlyev/HotswapAgent that referenced this issue Aug 27, 2019
golovlyev pushed a commit to golovlyev/HotswapAgent that referenced this issue Aug 28, 2019
aekrylov pushed a commit to Micord/HotswapAgent that referenced this issue Aug 28, 2019
* WEBBPMNEXT-6025 removed custom spring plugin fix. Copied the HotswapProjects#269 issue fix from the HotswapAgent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant