java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • With STS 3.4.0 everything was fine, but when I updated today to STS 3.5.0, I get a compiler error. I am using Gradle 1.11 and Groovy 2.1. My project has both Java (src/main/java) and Groovy (src/main/groovy) and I have some CRaSH commands in src/main/resources that are Groovy scripts that get compiled at runtime. I've tried to revert my STS installation via "Installation History" but sadly that failed. I've also tried just a clean install of STS 3.5.0 and the Groovy-compiler and Gradle extensions with the same result. I tried installing the STS 3.4.0 from scratch again, but when I go to install the necessary extensions they just point to all the new 3.5.0 versions. So, I'm going to have to turn to a Time Machine backup to get my IDE back in working order. Here is the stacktrace from my IDE log: !ENTRY org.eclipse.jdt.ui 4 0 2014-04-03 16:00:23.219 !MESSAGE Error in JDT Core during AST creation !STACK 0 java.lang.IllegalStateException: Import reference alongside class com.amx.rms.scheduling.model.ResourceProfile will trigger later failure: org.crsh.cli.Command declSourceStart=2 declEnd=-1 at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.createImports(GroovyCompilationUnitDeclaration.java:384) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.populateCompilationUnitDeclaration(GroovyCompilationUnitDeclaration.java:277) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyParser.dietParse(GroovyParser.java:458) at org.codehaus.jdt.groovy.integration.internal.MultiplexingCommentRecorderParser.dietParse(MultiplexingCommentRecorderParser.java:60) at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:339) at org.eclipse.jdt.core.dom.CompilationUnitResolver.accept(CompilationUnitResolver.java:177) at org.eclipse.jdt.core.dom.CompilationUnitResolver.accept(CompilationUnitResolver.java:173) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:175) at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:201) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:548) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:613) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.resolveSingleImport(CompilationUnitScope.java:830) at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3322) at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3049) at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:50) at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:466) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:565) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveTypeArgument(TypeReference.java:583) at org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.internalResolveLeafType(ParameterizedSingleTypeReference.java:234) at org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.internalResolveType(ParameterizedSingleTypeReference.java:143) at org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.resolveType(ParameterizedSingleTypeReference.java:359) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveSuperType(TypeReference.java:543) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.findSupertype(ClassScope.java:1300) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperInterfaces(ClassScope.java:1063) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(ClassScope.java:1121) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(CompilationUnitScope.java:374) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:231) at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:804) at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:396) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1161) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:713) at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1183) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:809) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:544) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:537) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:480) at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:128) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:170) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:155) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
    via by Adam Harris,
  • With STS 3.4.0 everything was fine, but when I updated today to STS 3.5.0, I get a compiler error. I am using Gradle 1.11 and Groovy 2.1. My project has both Java (src/main/java) and Groovy (src/main/groovy) and I have some CRaSH commands in src/main/resources that are Groovy scripts that get compiled at runtime. I've tried to revert my STS installation via "Installation History" but sadly that failed. I've also tried just a clean install of STS 3.5.0 and the Groovy-compiler and Gradle extensions with the same result. I tried installing the STS 3.4.0 from scratch again, but when I go to install the necessary extensions they just point to all the new 3.5.0 versions. So, I'm going to have to turn to a Time Machine backup to get my IDE back in working order. Here is the stacktrace from my IDE log: !ENTRY org.eclipse.jdt.ui 4 0 2014-04-03 16:00:23.219 !MESSAGE Error in JDT Core during AST creation !STACK 0 java.lang.IllegalStateException: Import reference alongside class com.amx.rms.scheduling.model.ResourceProfile will trigger later failure: org.crsh.cli.Command declSourceStart=2 declEnd=-1 at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.createImports(GroovyCompilationUnitDeclaration.java:384) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.populateCompilationUnitDeclaration(GroovyCompilationUnitDeclaration.java:277) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyParser.dietParse(GroovyParser.java:458) at org.codehaus.jdt.groovy.integration.internal.MultiplexingCommentRecorderParser.dietParse(MultiplexingCommentRecorderParser.java:60) at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:339) at org.eclipse.jdt.core.dom.CompilationUnitResolver.accept(CompilationUnitResolver.java:177) at org.eclipse.jdt.core.dom.CompilationUnitResolver.accept(CompilationUnitResolver.java:173) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:175) at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:201) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:548) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:613) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.resolveSingleImport(CompilationUnitScope.java:830) at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3322) at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3049) at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:50) at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:466) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:565) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveTypeArgument(TypeReference.java:583) at org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.internalResolveLeafType(ParameterizedSingleTypeReference.java:234) at org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.internalResolveType(ParameterizedSingleTypeReference.java:143) at org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.resolveType(ParameterizedSingleTypeReference.java:359) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveSuperType(TypeReference.java:543) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.findSupertype(ClassScope.java:1300) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperInterfaces(ClassScope.java:1063) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(ClassScope.java:1121) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(CompilationUnitScope.java:374) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:231) at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:804) at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:396) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1161) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:713) at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1183) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:809) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:544) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:537) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:480) at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:128) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:170) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:155) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
    via by Adam Harris,
  • Simple Groovy POGO reference breaking the build. CANNOT fix the build: removed offending classes, local maven repo, target directory, rebuilt clean. Added completely new Groovy classes with same names/definitions, same broken build. Eventually all groovy POGOs are referenced as offending after subsequent builds. Definitely has something to do with creating a class, deleting it, and recreating it in STS with the same name without building in between (I was creating a new project so had Build Automatically off): !ENTRY org.eclipse.core.resources 4 75 2014-04-16 23:48:18.358 !MESSAGE Errors occurred during the build. !SUBENTRY 1 org.eclipse.jdt.core 4 75 2014-04-16 23:48:18.358 !MESSAGE Errors running builder 'Java Builder' on project 'gwujeel'. !STACK 0 java.lang.IllegalStateException: Import reference alongside class MailInfo will trigger later failure: org.crsh.command.ScriptException declSourceStart=2 declEnd=-1 at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.createImports(GroovyCompilationUnitDeclaration.java:384) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.populateCompilationUnitDeclaration(GroovyCompilationUnitDeclaration.java:277) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyParser.dietParse(GroovyParser.java:458) at org.codehaus.jdt.groovy.integration.internal.MultiplexingParser.dietParse(MultiplexingParser.java:44) at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:776) at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:396) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:482) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:390) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:183) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:327) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:62) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:255) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:179) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
    via by John Sullivan,
  • Simple Groovy POGO reference breaking the build. CANNOT fix the build: removed offending classes, local maven repo, target directory, rebuilt clean. Added completely new Groovy classes with same names/definitions, same broken build. Eventually all groovy POGOs are referenced as offending after subsequent builds. Definitely has something to do with creating a class, deleting it, and recreating it in STS with the same name without building in between (I was creating a new project so had Build Automatically off): !ENTRY org.eclipse.core.resources 4 75 2014-04-16 23:48:18.358 !MESSAGE Errors occurred during the build. !SUBENTRY 1 org.eclipse.jdt.core 4 75 2014-04-16 23:48:18.358 !MESSAGE Errors running builder 'Java Builder' on project 'gwujeel'. !STACK 0 java.lang.IllegalStateException: Import reference alongside class MailInfo will trigger later failure: org.crsh.command.ScriptException declSourceStart=2 declEnd=-1 at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.createImports(GroovyCompilationUnitDeclaration.java:384) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.populateCompilationUnitDeclaration(GroovyCompilationUnitDeclaration.java:277) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyParser.dietParse(GroovyParser.java:458) at org.codehaus.jdt.groovy.integration.internal.MultiplexingParser.dietParse(MultiplexingParser.java:44) at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:776) at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:396) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:482) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:390) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:183) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:327) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:62) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:255) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:179) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
    via by John Sullivan,
    • java.lang.IllegalStateException: Import reference alongside class com.amx.rms.scheduling.model.ResourceProfile will trigger later failure: org.crsh.cli.Command declSourceStart=2 declEnd=-1 at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.createImports(GroovyCompilationUnitDeclaration.java:384) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.populateCompilationUnitDeclaration(GroovyCompilationUnitDeclaration.java:277) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyParser.dietParse(GroovyParser.java:458) at org.codehaus.jdt.groovy.integration.internal.MultiplexingCommentRecorderParser.dietParse(MultiplexingCommentRecorderParser.java:60) at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:339) at org.eclipse.jdt.core.dom.CompilationUnitResolver.accept(CompilationUnitResolver.java:177) at org.eclipse.jdt.core.dom.CompilationUnitResolver.accept(CompilationUnitResolver.java:173) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:175) at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:201) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:548) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:613) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.resolveSingleImport(CompilationUnitScope.java:830) at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3322) at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3049) at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:50) at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:466) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:565) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveTypeArgument(TypeReference.java:583) at org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.internalResolveLeafType(ParameterizedSingleTypeReference.java:234) at org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.internalResolveType(ParameterizedSingleTypeReference.java:143) at org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.resolveType(ParameterizedSingleTypeReference.java:359) at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveSuperType(TypeReference.java:543) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.findSupertype(ClassScope.java:1300) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperInterfaces(ClassScope.java:1063) at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(ClassScope.java:1121) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(CompilationUnitScope.java:374) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:231) at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:804) at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:396) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1161) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:713) at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1183) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:809) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:544) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:537) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:480) at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:128) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:170) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:155) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
    No Bugmate found.