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

JBossModulesPlugin on JBoss Wildfly 10 #124

Closed
t1 opened this issue Apr 17, 2016 · 0 comments
Closed

JBossModulesPlugin on JBoss Wildfly 10 #124

t1 opened this issue Apr 17, 2016 · 0 comments

Comments

@t1
Copy link

t1 commented Apr 17, 2016

I'm trying to launch a JBoss Wildfly 10.0.0 with the HotSwapAgent from within IntelliJ IDEA.

I pass -ea -XXaltjvm=dcevm -javaagent:<path-to>/hotswap-agent.jar (where <path-to> is my real path) as VM options, but I get this stacktrace during startup:

HOTSWAP AGENT:7:59:21.869INFO(org.hotswap.agent.HotswapAgent)-Loading Hotswap agent{0.3.0-SNAPSHOT}-unlimited runtime class redefinition.
HOTSWAP AGENT:7:59:22.385INFO(org.hotswap.agent.config.PluginRegistry)-Discovered plugins:[Hotswapper,AnonymousClassPatch,WatchResources,Hibernate,Spring,Jersey2,Jetty,Tomcat,ZK,Logback,JSF,Seam,ELResolver,OsgiEquinox,Proxy,WebObjects,Weld,JBossModules,Resteasy,Gae]
HOTSWAP AGENT:7:59:22.505ERROR(org.hotswap.agent.annotation.handler.OnClassLoadedHandler)-InvocationTargetException in transform method on plugin'class org.hotswap.agent.plugin.jbossmodules.JBossModulesPlugin'class'org/jboss/modules/ModuleClassLoader'.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.annotation.handler.OnClassLoadedHandler.transform(OnClassLoadedHandler.java:157)
at org.hotswap.agent.annotation.handler.OnClassLoadedHandler$1.transform(OnClassLoadedHandler.java:76)
at org.hotswap.agent.util.HotswapTransformer.transform(HotswapTransformer.java:129)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by:org.hotswap.agent.javassist.CannotCompileException:[source error]setResourceLoaders(java.lang.Object,org.jboss.modules.ResourceLoaderSpec[])not found in org.jboss.modules.ModuleClassLoader
at org.hotswap.agent.javassist.CtBehavior.setBody(CtBehavior.java:432)
at org.hotswap.agent.javassist.CtBehavior.setBody(CtBehavior.java:400)
at org.hotswap.agent.plugin.jbossmodules.ModuleClassLoaderTransformer.patchModuleClassLoader(ModuleClassLoaderTransformer.java:91)
...28more
Caused by:compile error:setResourceLoaders(java.lang.Object,org.jboss.modules.ResourceLoaderSpec[])not found in org.jboss.modules.ModuleClassLoader
at org.hotswap.agent.javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:684)
at org.hotswap.agent.javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:651)
at org.hotswap.agent.javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:147)
at org.hotswap.agent.javassist.compiler.ast.CallExpr.accept(CallExpr.java:43)
at org.hotswap.agent.javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:241)
at org.hotswap.agent.javassist.compiler.CodeGen.atDeclarator(CodeGen.java:725)
at org.hotswap.agent.javassist.compiler.ast.Declarator.accept(Declarator.java:117)
at org.hotswap.agent.javassist.compiler.CodeGen.atStmnt(CodeGen.java:352)
at org.hotswap.agent.javassist.compiler.ast.Stmnt.accept(Stmnt.java:51)
at org.hotswap.agent.javassist.compiler.CodeGen.atStmnt(CodeGen.java:352)
at org.hotswap.agent.javassist.compiler.ast.Stmnt.accept(Stmnt.java:51)
at org.hotswap.agent.javassist.compiler.CodeGen.atMethodBody(CodeGen.java:296)
at org.hotswap.agent.javassist.compiler.Javac.compileBody(Javac.java:204)
at org.hotswap.agent.javassist.CtBehavior.setBody(CtBehavior.java:425)
...30more

... and the deployment fails.

I understand that the JBossModules plugin is available, but it doesn't seem to be able do it's job. Briefly looking at the source of org.jboss.modules.ModuleClassLoader I have the impression this could be an incompatibility with Wildfly 10.

I had this posted on the mailing list, and Vladimir replied:

I didn't test it on Wildfly 10.x. It looks there is something new that break the HA functionality. We should fix it.

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