java.io.IOException: invalid constant type: 18 *Copy this class in an IDE of your choice to ease debugging: private class TemplateTester extends pdgf.generator.template.NextValueTemplate { public void getValue(pdgf.plugin.AbstractPDGFRandom rng,pdgf.core.dataGenerator.beans.FieldValueDTO fvdto, pdgf.core.dataGenerator.beans.GenerationContext gc) throws Exception{ fvdto.setBothValues(generator(0, rng, gc, fvdto) + " " + generator(1, rng,

Google Groups | Vikas Reddy Aravabhumi | 9 months ago
  1. 0

    java.lang.RuntimeException: java.io.IOException: invalid constant type: 18

    Google Groups | 9 months ago | Vikas Reddy Aravabhumi
    java.io.IOException: invalid constant type: 18 *Copy this class in an IDE of your choice to ease debugging: private class TemplateTester extends pdgf.generator.template.NextValueTemplate { public void getValue(pdgf.plugin.AbstractPDGFRandom rng,pdgf.core.dataGenerator.beans.FieldValueDTO fvdto, pdgf.core.dataGenerator.beans.GenerationContext gc) throws Exception{ fvdto.setBothValues(generator(0, rng, gc, fvdto) + " " + generator(1, rng,
  2. 0

    The initializationError test in the WebModuleUtilTest class throws an exception when running under Java 8. <error message="Failed to transform class with name org.openmrs.module.web.WebModuleUtilTest. Reason: java.io.IOException: invalid constant type: 18" type="java.lang.IllegalStateException">java.lang.IllegalStateException: Failed to transform class with name org.openmrs.module.web.WebModuleUtilTest. Reason: java.io.IOException: invalid constant type: 18 at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:219) at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:147) at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:67) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:340) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:132) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.createDelegatorFromClassloader(JUnit4TestSuiteChunkerImpl.java:39) at org.powermock.tests.utils.impl.AbstractTestSuiteChunkerImpl.createTestDelegators(AbstractTestSuiteChunkerImpl.java:217) at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.&lt;init&gt;(JUnit4TestSuiteChunkerImpl.java:59) at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.&lt;init&gt;(AbstractCommonPowerMockRunner.java:32) at org.powermock.modules.junit4.PowerMockRunner.&lt;init&gt;(PowerMockRunner.java:33) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:51) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102) at org.apache.maven.surefire.Surefire.run(Surefire.java:180) 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:483) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021) 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.bytecode.stackmap.TypeData$TypeName.update(TypeData.java:274) at javassist.bytecode.stackmap.TypeData$TypeName.setType(TypeData.java:203) at javassist.bytecode.stackmap.TypeData.setType(TypeData.java:46) at javassist.bytecode.stackmap.Tracer.checkParamTypes(Tracer.java:913) at javassist.bytecode.stackmap.Tracer.doInvokeMethod(Tracer.java:818) at javassist.bytecode.stackmap.Tracer.doOpcode148_201(Tracer.java:615) at javassist.bytecode.stackmap.Tracer.doOpcode(Tracer.java:101) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:182) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:141) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:96) at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:416) at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:398) at javassist.expr.ExprEditor.doit(ExprEditor.java:112) at javassist.CtClassType.instrument(CtClassType.java:1374) at org.powermock.core.transformers.impl.MainMockTransformer.transform(MainMockTransformer.java:75) at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:215) ... 31 more Caused by: java.io.IOException: invalid constant type: 18 at javassist.bytecode.ConstPool.readOne(ConstPool.java:1090) at javassist.bytecode.ConstPool.read(ConstPool.java:1033) at javassist.bytecode.ConstPool.&lt;init&gt;(ConstPool.java:149) at javassist.bytecode.ClassFile.read(ClassFile.java:737) at javassist.bytecode.ClassFile.&lt;init&gt;(ClassFile.java:108) at javassist.CtClassType.getClassFile2(CtClassType.java:190) ... 83 more </error>

    JIRA | 2 years ago | Wesley Brown
    java.io.IOException: invalid constant type: 18" type="java.lang.IllegalStateException">java.lang.IllegalStateException: Failed to transform class with name org.openmrs.module.web.WebModuleUtilTest. Reason: java.io.IOException: invalid constant type: 18
  3. 0

    RE: java.io.IOException: CreateProcess ... error=193

    apache.org | 11 months ago
    java.io.IOException: CreateProcess ... error=193 Does anyone have a possible solution to this problem? I've read quite a few postings with this exception but error=2 instead of 193. I'm aware that there have been issues with slashes when using environment variables. I tried forward slashes, back slashes, double or single slashes as environment variables or hard coded strings. Same results. I don't think slashes are the problem. The syntax as outputed by ant runs fine outside of ant. The syntax appears correct. The VSS executable as specified in the build runs fine. The base VSS task "vssget", runs fine as well. My environment is the following: ======================= 1) Windows 2000 2) Ant 1.5.4 3) Sun jdk 1.3.1_09 4) A Custom VSS Task implementation (code pasted below) 5) Build target using custom task (build code pasted below) Java Source: ========== package org.twia.util; import org.apache.tools.ant.taskdefs.optional.vss.MSVSSGET; import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.BuildException; public class AntVSSExtensions extends MSVSSGET { public static final String FLAG_COMPARE_DATE_TIME = "-GCD"; private boolean compareDateTime = false; /** * Executes the task. * <p> * Builds a command line to execute ss and then calls Exec's run method * to execute the command line. */ public void execute() throws BuildException { System.out.println("AntVSSExtensions.execute() - begin."); Commandline commandLine = new Commandline(); int result = 0; // first off, make sure that we've got a command and a vssdir ... if (getVsspath() == null) { String msg = "vsspath attribute must be set!"; throw new BuildException(msg, location); } // now look for illegal combinations of things ... // build the command line from what we got the format is // ss Get VSS items [-G] [-H] [-I-] [-N] [-O] [-R] [-V] [-W] [-Y] [-?] // as specified in the SS.EXE help commandLine.setExecutable(getSSCommand()); commandLine.createArgument().setValue(COMMAND_GET); // VSS items commandLine.createArgument().setValue(getVsspath()); // -GL getLocalpathCommand(commandLine); // -GCD getCompareDateTimeCommand(commandLine); // -I- or -I-Y or -I-N getAutoresponse(commandLine); // -O- // getQuietCommand(commandLine); // -R getRecursiveCommand(commandLine); // -V getVersionCommand(commandLine); // -W getWritableCommand(commandLine); // -Y getLoginCommand(commandLine); System.out.println("AntVSSExtensions.execute() - just before run()."); try { result = run(commandLine); } catch (BuildException be) { be.printStackTrace(); throw be; } System.out.println("AntVSSExtensions.execute() - run result code = " + result); System.out.println("AntVSSExtensions.execute() - end."); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); throw new BuildException(msg, location); } } /** * Extract files using a date/time comparison; optional, default false. */ public final void setCompareDateTime(boolean compareDateTime) { this.compareDateTime = compareDateTime; } /** * Make the 'compare date time' command if the attribute was 'true', otherwise an empty string */ public void getCompareDateTimeCommand(Commandline cmd) { if (!compareDateTime) { return; } else { cmd.createArgument().setValue(FLAG_COMPARE_DATE_TIME); } } } Build File Excerpts: =============== <taskdef name="twiavssget" classname="org.twia.util.AntVSSExtensions" classpath="E:/WorkingDocuments/AntVSSExtractExtensions/antVSSExtensions.jar" /> <!-- ===== TARGET: extract ============================================== --> <target name="extract" if="ss.extract.enabled" description="Clean build tree and extract everything from VSS."> <twiavssget localPath="E:/WorkingTBOT/CI" compareDateTime="true" recursive="true" vsspath="/" ssdir="E:/Program Files/Microsoft Visual Studio/VSS/win32" serverPath="//Tomcat/VSS/TBOT/TBOT Development" writable="true"/> </target> Output: =============== E:\WorkingTBOT\DEV>ant extract Buildfile: build.xml extract: AntVSSExtensions.execute() - begin. AntVSSExtensions.execute() - just before run(). file:E:/WorkingTBOT/DEV/build.xml:449: java.io.IOException: CreateProcess: "E:\Program Files\Microsoft Visu al Studio\VSS\win32\ss" Get $/ -GLE:\WorkingTBOT\CI -GCD -I- -R -W error=193 at org.apache.tools.ant.taskdefs.optional.vss.MSVSS.run(MSVSS.java:195) at org.twia.util.AntVSSExtensions.execute(AntVSSExtensions.java:65)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ImageJ ij = new ImageJ() fails

    GitHub | 1 year ago | reckbo
    java.lang.IllegalArgumentException: Cannot handle app name in ij.ImageJ's public <init>(java.applet.Applet applet, int mode)
  6. 0

    [TRUNK-4597] Exception when running WebModuleUtilTest under Java 8 - OpenMRS Issues

    openmrs.org | 1 year ago
    java.io.IOException: invalid constant type: 18" type="java.lang.IllegalStateException">java.lang.IllegalStateException: Failed to transform class with name org.openmrs.module.web.WebModuleUtilTest. Reason: java.io.IOException: invalid constant type: 18

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      invalid constant type: 18 *Copy this class in an IDE of your choice to ease debugging: private class TemplateTester extends pdgf.generator.template.NextValueTemplate { public void getValue(pdgf.plugin.AbstractPDGFRandom rng,pdgf.core.dataGenerator.beans.FieldValueDTO fvdto, pdgf.core.dataGenerator.beans.GenerationContext gc) throws Exception{ fvdto.setBothValues(generator(0, rng, gc, fvdto) + " " + generator(1, rng,

      at pdgf.generator.template.NextValueTemplate.instance()
    2. pdgf.generator.template
      NextValueTemplate.instance
      1. pdgf.generator.template.NextValueTemplate.instance(NextValueTemplate.java:97)
      1 frame
    3. pdgf.generator
      TemplateGenerator.initialize
      1. pdgf.generator.TemplateGenerator.initialize(TemplateGenerator.java:102)
      1 frame
    4. pdgf.core.dbSchema
      Project.initStage8_initialize_
      1. pdgf.core.dbSchema.Element.initStage8_initialize_(Element.java:514)
      2. pdgf.core.dbSchema.Element.initStage8_initialize_(Element.java:528)
      3. pdgf.core.dbSchema.Element.initStage8_initialize_(Element.java:528)
      4. pdgf.core.dbSchema.Element.initStage8_initialize_(Element.java:528)
      5. pdgf.core.dbSchema.Element.initStage8_initialize_(Element.java:528)
      6. pdgf.core.dbSchema.Project.initStage8_initialize_(Project.java:722)
      6 frames
    5. pdgf.core.dataGenerator
      DataGenerator.start
      1. pdgf.core.dataGenerator.DataGenerator.initRootProject(DataGenerator.java:171)
      2. pdgf.core.dataGenerator.DataGenerator.initialize(DataGenerator.java:139)
      3. pdgf.core.dataGenerator.DataGenerator.start(DataGenerator.java:214)
      3 frames
    6. pdgf.actions
      ActionPrioritySortObject.execute
      1. pdgf.actions.StartAction.execute(StartAction.java:112)
      2. pdgf.actions.ActionPrioritySortObject.execute(ActionPrioritySortObject.java:50)
      2 frames
    7. pdgf
      Controller.main
      1. pdgf.Controller.parseCmdLineArgs(Controller.java:1248)
      2. pdgf.Controller.start(Controller.java:1385)
      3. pdgf.Controller.main(Controller.java:1226)
      3 frames