首页 > 解决方案 > Jrebel 不适用于 weblogic 12.X

问题描述

问题描述: 无法使用 JRebel 反弹 weblogic 服务器

错误: 当我尝试退回服务器时出现以下错误

JRebel: ERROR Class 'java.lang.ClassLoader' could not be processed by com.zeroturnaround.javarebel.bv@null: org.zeroturnaround.bundled.javassist.bytecode.DuplicateMemberException: duplicate method: _jr$defineClass in java.lang.ClassLoader
        at org.zeroturnaround.bundled.javassist.bytecode.ClassFile.testExistingMethod(SourceFile:721)
        at org.zeroturnaround.bundled.javassist.bytecode.ClassFile.addMethod(SourceFile:696)
        at org.zeroturnaround.bundled.javassist.CtClassType.addMethod(SourceFile:1411)
        at com.zeroturnaround.javarebel.bv.process(SourceFile:40)
        at org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(SourceFile:79)
        at com.zeroturnaround.javarebel.vu.a(SourceFile:376)
        at com.zeroturnaround.javarebel.vu.a(SourceFile:365)
        at com.zeroturnaround.javarebel.vu.a(SourceFile:350)
        at com.zeroturnaround.javarebel.f.runBootClassProcessors(SourceFile:245)
        at com.zeroturnaround.javarebel.bl.a(SourceFile:115)
        at com.zeroturnaround.javarebel.gib.a(SourceFile:63)
        at com.zeroturnaround.javarebel.gfc.a(SourceFile:59)
        at com.zeroturnaround.javarebel.gfc.doTransform(SourceFile:39)
        at com.zeroturnaround.jrebelbase.reorder.a.transform(SourceFile:182)
        at com.zeroturnaround.jrebelbase.reorder.a.transform(SourceFile:148)
        at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java)
        at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
        at sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:170)
        at com.mercury.opal.capture.jdk15.agent.ProbeClassFileTransformer.instrumentAndReplace(ProbeClassFileTransformer.java:369)
        at com.mercury.opal.capture.jdk15.agent.ProbeClassFileTransformer.reinstrumentClass(ProbeClassFileTransformer.java:331)
        at com.mercury.opal.capture.jdk15.agent.ProbeClassFileTransformer.patchClassLoaders(ProbeClassFileTransformer.java:137)
        at com.mercury.opal.capture.jdk15.agent.ProbeClassFileTransformer.<init>(ProbeClassFileTransformer.java:98)
        at com.mercury.opal.capture.jdk15.agent.InstrumentationAgent.premain(InstrumentationAgent.java:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at sun.instrument.InstrumentationImpl._jrLoadClassAndStartAgent(InstrumentationImpl.java:386)
        at com.zeroturnaround.jrebelbase.reorder.b.a(SourceFile:31)
        at com.zeroturnaround.jrebelbase.reorder.a.c(SourceFile:129)
        at com.zeroturnaround.jrebelbase.reorder.a.a(SourceFile:118)
        at com.zeroturnaround.javarebel.gec.a(SourceFile:309)
        at com.zeroturnaround.javarebel.gec.deferredInitHook(SourceFile:149)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java)

配置详情:

基于 Jrebel 根文件夹的启动脚本中的以下行

export REBEL_HOME=[JRebel root folder]
export JAVA_OPTIONS="-agentpath:$REBEL_HOME/lib/libjrebel64.so -Drebel.remoting_plugin=true $JAVA_OPTIONS"

版本:

网络逻辑:12.2.1.2.0

杰瑞贝尔:7.1.2

谁能帮我过来?

标签: weblogicweblogic12cjrebel

解决方案


请尝试使用最新版本的 JRebel 而不是7.1.2在https://zeroturnaround.com/software/jrebel/download/prev-releases/下载它。

如果由于某种原因结果仍然相同,请删除REBEL_HOME/bootcache 并重试。如果您仍然看到异常,请连同来自REBEL_HOME的jrebel.log一起写信至 support@zeroturnaround.com ,他们将能够帮助您。


推荐阅读