java.lang.IllegalArgumentException

tip

If you're using multiple frameworks on your project, check if this is not a problem between mismatched versions of javassist between them.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • GitHub comment 1886#215060402
    via GitHub by shntnu
    ,
  • GitHub comment 1886#215061702
    via GitHub by shntnu
    ,
  • GitHub comment 1886#215224680
    via GitHub by shntnu
    ,
  • GitHub comment 1573#140740649
    via GitHub by braymp
    ,
  • Full Text Bug Listing
    via by Unknown author,
  • ImageJ ij = new ImageJ() fails
    via GitHub by reckbo
    ,
  • Maven Jenkins Build Failure
    via Stack Overflow by user3474468
    ,
    • java.lang.IllegalArgumentException: Cannot handle replace call to list in ij.Menus's public static synchronized java.lang.String[] getPlugins() at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:725) at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:650) at net.imagej.patcher.LegacyExtensions.addExtraPlugins(LegacyExtensions.java:477) at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:175) at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:308) at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:109) at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:101) at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:495) at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:397) at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:376) at net.imagej.patcher.JavaAgent.preinit(JavaAgent.java:147) at net.imagej.patcher.JavaAgent.premain(JavaAgent.java:95) 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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401) Caused by: java.lang.RuntimeException: java.io.IOException: invalid constant type: 18 at javassist.CtClassType.getClassFile2(CtClassType.java:203) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:110) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:96) at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:704) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:681) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45) at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:241) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:329) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.CodeGen.atIfStmnt(CodeGen.java:390) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:354) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.Javac.compileStmnt(Javac.java:568) at javassist.expr.MethodCall.replace(MethodCall.java:234) at net.imagej.patcher.CodeHacker$7.edit(CodeHacker.java:686) at javassist.expr.ExprEditor.loopBody(ExprEditor.java:191) at javassist.expr.ExprEditor.doit(ExprEditor.java:90) at javassist.CtBehavior.instrument(CtBehavior.java:618) at net.imagej.patcher.CodeHacker$EagerExprEditor.instrument(CodeHacker.java:1278) at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:670) ... 17 more Caused by: java.io.IOException: invalid constant type: 18 at javassist.bytecode.ConstPool.readOne(ConstPool.java:1027) at javassist.bytecode.ConstPool.read(ConstPool.java:970) at javassist.bytecode.ConstPool.<init>(ConstPool.java:127) at javassist.bytecode.ClassFile.read(ClassFile.java:693) at javassist.bytecode.ClassFile.<init>(ClassFile.java:85) at javassist.CtClassType.getClassFile2(CtClassType.java:190) ... 37 more

    Users with the same issue

    treefolk
    11 times, last one,
    Unknown visitor1 times, last one,
    andyglick
    8 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    27 more bugmates