java.lang.IllegalStateException

Expected to have a deferred type but got Object

Samebug tips1

Check if there is no nexus running. If not, delete sonatype-work/nexus/nexus.lock .


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

Solutions on the web17719

  • Expected to have a deferred type but got Object
  • Expected to have a deferred type but got Throwable
  • Expected object type but found bottom
  • Stack trace

    • java.lang.IllegalStateException: Expected to have a deferred type but got Object at com.google.common.base.Preconditions.checkState(Preconditions.java:145)[sonar-plugin-api-deps2147618160911810946jar:na] at org.sonar.java.model.AbstractTypedTree.setInferedType(AbstractTypedTree.java:60)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.TypeAndReferenceSolver.setInferedType(TypeAndReferenceSolver.java:232)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.TypeAndReferenceSolver.inferArgumentTypes(TypeAndReferenceSolver.java:654)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:223)[java-frontend-3.14.jar:na] at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:82)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitLambdaExpression(BaseTreeVisitor.java:343)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.TypeAndReferenceSolver.visitLambdaExpression(TypeAndReferenceSolver.java:449)[java-frontend-3.14.jar:na] at org.sonar.java.model.expression.LambdaExpressionTreeImpl.accept(LambdaExpressionTreeImpl.java:91)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.TypeAndReferenceSolver.setInferedType(TypeAndReferenceSolver.java:233)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.TypeAndReferenceSolver.inferArgumentTypes(TypeAndReferenceSolver.java:654)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethodInvocation(TypeAndReferenceSolver.java:223)[java-frontend-3.14.jar:na] at org.sonar.java.model.expression.MethodInvocationTreeImpl.accept(MethodInvocationTreeImpl.java:82)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitExpressionStatement(BaseTreeVisitor.java:101)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.TypeAndReferenceSolver.visitExpressionStatement(TypeAndReferenceSolver.java:628)[java-frontend-3.14.jar:na] at org.sonar.java.model.statement.ExpressionStatementTreeImpl.accept(ExpressionStatementTreeImpl.java:65)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitBlock(BaseTreeVisitor.java:85)[java-frontend-3.14.jar:na] at org.sonar.java.model.statement.BlockTreeImpl.accept(BlockTreeImpl.java:77)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.TypeAndReferenceSolver.visitMethod(TypeAndReferenceSolver.java:129)[java-frontend-3.14.jar:na] at org.sonar.java.model.declaration.MethodTreeImpl.accept(MethodTreeImpl.java:218)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.TypeAndReferenceSolver.visitClass(TypeAndReferenceSolver.java:138)[java-frontend-3.14.jar:na] at org.sonar.java.model.declaration.ClassTreeImpl.accept(ClassTreeImpl.java:198)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:43)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:37)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.api.tree.BaseTreeVisitor.visitCompilationUnit(BaseTreeVisitor.java:55)[java-frontend-3.14.jar:na] at org.sonar.java.resolve.SemanticModel.createFor(SemanticModel.java:63)[java-frontend-3.14.jar:na] at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:112)[java-frontend-3.14.jar:na] at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:84)[java-frontend-3.14.jar:na] at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:67)[java-frontend-3.14.jar:na] at org.sonar.java.JavaSquid.scanTests(JavaSquid.java:149)[java-frontend-3.14.jar:na] at org.sonar.java.JavaSquid.scan(JavaSquid.java:138)[java-frontend-3.14.jar:na] at org.sonar.plugins.java.JavaSquidSensor.analyse(JavaSquidSensor.java:95)[sonar-java-plugin-3.14.jar:na] at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:72)[org.sonarsource.sonarlint.core.sonarlint-core_2.3.2.jar:na] at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.execute(SensorsExecutor.java:62)[org.sonarsource.sonarlint.core.sonarlint-core_2.3.2.jar:na] at org.sonarsource.sonarlint.core.analyzer.sensor.PhaseExecutor.execute(PhaseExecutor.java:45)[org.sonarsource.sonarlint.core.sonarlint-core_2.3.2.jar:na] at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:137)[org.sonarsource.sonarlint.core.sonarlint-core_2.3.2.jar:na] at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)[org.sonarsource.sonarlint.core.sonarlint-core_2.3.2.jar:na] at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:110)[org.sonarsource.sonarlint.core.sonarlint-core_2.3.2.jar:na] at org.sonarsource.sonarlint.core.container.standalone.StandaloneGlobalContainer.analyze(StandaloneGlobalContainer.java:117)[org.sonarsource.sonarlint.core.sonarlint-core_2.3.2.jar:na] at org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl.analyze(StandaloneSonarLintEngineImpl.java:93)[org.sonarsource.sonarlint.core.sonarlint-core_2.3.2.jar:na] at org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl.analyze(StandaloneSonarLintEngineImpl.java:83)[org.sonarsource.sonarlint.core.sonarlint-core_2.3.2.jar:na] at org.sonarlint.eclipse.core.internal.jobs.StandaloneSonarLintClientFacade.startAnalysis(StandaloneSonarLintClientFacade.java:58)[org.sonarlint.eclipse.core_2.1.0.20160603-1122-RELEASE.jar:na] at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob$1.run(AnalyzeProjectJob.java:377)[org.sonarlint.eclipse.core_2.1.0.20160603-1122-RELEASE.jar:na]

    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

    2 times, 7 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    2 times, 1 year ago
    84 more bugmates