java.lang.IllegalArgumentException

Cannot handle app name in ij.ImageJ's public <init>(java.applet.Applet applet, int mode)

Samebug tips1

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

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web11227

  • via GitHub by shntnu
    , 1 year ago
    Cannot handle app name in ij.ImageJ's public <init>(java.applet.Applet applet, int mode)
  • via GitHub by reckbo
    , 1 year ago
    Cannot handle app name in ij.ImageJ's public <init>(java.applet.Applet applet, int mode)
  • via fiji.sc by Unknown author, 1 year ago
    Cannot handle app name in ij.ImageJ's public <init>(java.applet.Applet applet, int mode)
  • Stack trace

    • java.lang.IllegalArgumentException: Cannot handle app name in ij.ImageJ's public <init>(java.applet.Applet applet, int mode) at net.imagej.patcher.CodeHacker.replaceAppNameInCall(CodeHacker.java:446) at net.imagej.patcher.LegacyExtensions.insertAppNameHooks(LegacyExtensions.java:406) at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:291) 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.CtClassType.subtypeOf(CtClassType.java:303) at javassist.CtClassType.subtypeOf(CtClassType.java:318) at javassist.compiler.MemberResolver.compareSignature(MemberResolver.java:247) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:119) 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.Javac.compileStmnt(Javac.java:568) at javassist.expr.MethodCall.replace(MethodCall.java:234) at net.imagej.patcher.CodeHacker$4.edit(CodeHacker.java:427) at net.imagej.patcher.CodeHacker$4.edit(CodeHacker.java:441) at javassist.expr.ExprEditor.loopBody(ExprEditor.java:219) 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.replaceAppNameInCall(CodeHacker.java:402) ... 16 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

    Write tip

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

    Users with the same issue

    11 times, 6 months ago
    Unknown user
    Once, 8 months ago
    29 times, 8 months ago
    Unknown user
    Once, 10 months ago
    Unknown user
    Once, 10 months ago
    27 more bugmates