java.lang.NullPointerException

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.

  • FULL PRODUCT VERSION : java version "1.8.0_05" Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) ADDITIONAL OS VERSION INFORMATION : WIndows & Enterprise Service Pack 1 A DESCRIPTION OF THE PROBLEM : I cannot use to lambdas in the same call - each lambda works seperately but not together. The commented out version works fine. As does partial substitution of each Callback. //Pointcut definition @Pointcut("execution(* com.tda.amv.batch.tasklet..execute(..))") public void retryable() { log.debug("In retryable() Pointcut"); } @Around("retryable()") public Object aroundRetryableMethods(ProceedingJoinPoint joinPoint) { try { return retryTemplate.execute(retryContext -> (RepeatStatus)joinPoint.proceed(), retryContext -> RepeatStatus.FINISHED); // return retryTemplate.execute(new RetryCallback<RepeatStatus, Throwable>(){ // // @Override // public RepeatStatus doWithRetry(RetryContext retryContext) throws Throwable // { // return (RepeatStatus) joinPoint.proceed(); // } // // }, new RecoveryCallback<RepeatStatus>(){ // // @Override // public RepeatStatus recover(RetryContext arg0) throws Exception // { // return RepeatStatus.FINISHED; // } // // }); } catch (Throwable e) { throw new RuntimeException(e); } } // junit test method @Test public void test() throws Exception { log.debug("In test() method..."); server.expect(requestTo(url)) .andExpect(method(HttpMethod.GET)) .andRespond(withSuccess("{\"totalCount\":3,\"failedCount\":0,\"completionCount\":0,\"processingCount\":2}", MediaType.APPLICATION_JSON)); getIrebalStatusTasklet.beforeStep(stepExecution); getIrebalStatusTasklet.execute(null, null); server.verify(); } //Tasklet class public class XYZTasklet implements Tasklet { Integer id; @Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { log.debug("In execute() method..."); String url = UriComponentsBuilder.newInstance() .scheme("http") .host(host) .port(port) .path(getIrebalStatusPath) .build(false) .toString(); ResponseEntity<XYZ> response = restTemplate.getForEntity(url, XYZ.class,id); return RepeatStatus.FINISHED; } } STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : run the junit test EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - test completes ERROR MESSAGES/STACK TRACES THAT OCCUR : An exception has occurred in the compiler (1.8.0_05). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. java.lang.NullPointerException at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.trackable(Flow.java:1476) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitVarDef(Flow.java:1801) at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitVarDef(Flow.java:2516) at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:846) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:389) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1367) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitLambda(Flow.java:2225) at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1618) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:389) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1367) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExpr(Flow.java:1596) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExprs(Flow.java:1608) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitApply(Flow.java:2205) at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1459) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:389) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1367) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.analyzeTree(Flow.java:2370) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.analyzeTree(Flow.java:2353) at com.sun.tools.javac.comp.Flow.analyzeLambdaThrownTypes(Flow.java:242) at com.sun.tools.javac.comp.Attr.visitLambda(Attr.java:2400) at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1618) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.DeferredAttr$2.complete(DeferredAttr.java:270) at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:231) at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:218) at com.sun.tools.javac.comp.Resolve$MethodResultInfo.check(Resolve.java:976) at com.sun.tools.javac.comp.Resolve$4.checkArg(Resolve.java:822) at com.sun.tools.javac.comp.Resolve$AbstractMethodCheck.argumentsAcceptable(Resolve.java:733) at com.sun.tools.javac.comp.Resolve$4.argumentsAcceptable(Resolve.java:831) at com.sun.tools.javac.comp.Infer.instantiateMethod(Infer.java:162) at com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:566) at com.sun.tools.javac.comp.Resolve.checkMethod(Resolve.java:603) at com.sun.tools.javac.comp.Attr.checkMethod(Attr.java:3777) at com.sun.tools.javac.comp.Attr.checkIdInternal(Attr.java:3583) at com.sun.tools.javac.comp.Attr.checkMethodIdInternal(Attr.java:3490) at com.sun.tools.javac.comp.Attr.checkMethodId(Attr.java:3469) at com.sun.tools.javac.comp.Attr.checkId(Attr.java:3456) at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3338) at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1891) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1828) at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1459) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.visitReturn(Attr.java:1689) at com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1378) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:681) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1127) at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:903) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665) at com.sun.tools.javac.comp.Attr.visitTry(Attr.java:1357) at com.sun.tools.javac.tree.JCTree$JCTry.accept(JCTree.java:1167) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:681) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1127) at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:903) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665) at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1020) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:772) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665) at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4305) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4215) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4149) at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4124) at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1251) at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:904) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:863) at com.sun.tools.javac.main.Main.compile(Main.java:523) at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129) at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138) at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126) at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169) at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785) at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) 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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- @Before public void setUp() { log.debug("In setUp() method..."); url = UriComponentsBuilder.newInstance() .scheme("http") .host(host) .port(port) .path(path) .build(false) .toString(); url = Pattern.compile("\\{id\\}").matcher(url).replaceAll(ID.toString()); server = MockRestServiceServer.createServer(restTemplate); stepExecution.setExecutionContext(new ExecutionContext()); stepExecution.getExecutionContext().put(SpringConfiguration.PACKAGE_ID_KEY, ID); } @Test public void test() throws Exception { log.debug("In test() method..."); server.expect(requestTo(url)) .andExpect(method(HttpMethod.GET)) .andRespond(withSuccess("{\"totalCount\":3,\"failedCount\":0,\"completionCount\":0,\"processingCount\":2}", MediaType.APPLICATION_JSON)); getIrebalStatusTasklet.beforeStep(stepExecution); getIrebalStatusTasklet.execute(null, null); server.verify(); } ---------- END SOURCE ----------
    via by Webbug Group,
  • FULL PRODUCT VERSION : javac 1.8.0_92 ADDITIONAL OS VERSION INFORMATION : Mac OS X 10.11.5 A DESCRIPTION OF THE PROBLEM : Have refactored my code, and wanted to make a clean&build with Maven. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Just a clean & build with Maven in Eclipse. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - no crash ACTUAL - see crash log ERROR MESSAGES/STACK TRACES THAT OCCUR : An exception has occurred in the compiler (1.8.0_92). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you. java.lang.NullPointerException at com.sun.tools.javac.comp.Attr.visitTypeParameter(Attr.java:4015) at com.sun.tools.javac.tree.JCTree$JCTypeParameter.accept(JCTree.java:2224) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:575) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:644) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:660) at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4295) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4271) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4200) at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4175) at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248) at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860) at com.sun.tools.javac.main.Main.compile(Main.java:523) at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129) at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138) at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:125) at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:171) at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:886) at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286) at org.apache.maven.cli.MavenCli.main(MavenCli.java:197) 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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/bojanantonovic/workspace-smood/picoterm/picoterm-nano/src/main/java/ch/antonovic/picoterm/nano/math/factory/NanoMathTermFactory.java:[50,8] cannot access ch.antonovic.picoterm.femto.util.FemtoMathTermFactory class file for ch.antonovic.picoterm.femto.util.FemtoMathTermFactory not found [ERROR] /Users/bojanantonovic/workspace-smood/picoterm/picoterm-nano/src/main/java/ch/antonovic/picoterm/nano/bool/factory/NanoBooleanTermFactory.java:[35,8] cannot access ch.antonovic.picoterm.femto.util.FemtoBooleanTermFactory class file for ch.antonovic.picoterm.femto.util.FemtoBooleanTermFactory not found REPRODUCIBILITY : This bug can be reproduced occasionally. ---------- BEGIN SOURCE ---------- https://github.com/bojanantonovic/picoterm ---------- END SOURCE ----------
    via by Webbug Group,
  • FULL PRODUCT VERSION : A DESCRIPTION OF THE PROBLEM : A compiler error happens when the provided code is compiled. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The program compiles ACTUAL - The compiler crashes ERROR MESSAGES/STACK TRACES THAT OCCUR : An exception has occurred in the compiler (1.8.0_25). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. java.lang.NullPointerException at com.sun.tools.javac.code.Scope.includes(Scope.java:296) at com.sun.tools.javac.comp.Flow$1.trackable(Flow.java:247) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitVarDef(Flow.java:1832) at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitVarDef(Flow.java:2569) at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:852) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1376) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitLambda(Flow.java:2256) at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1624) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1376) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExpr(Flow.java:1627) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExprs(Flow.java:1639) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitApply(Flow.java:2236) at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1376) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.analyzeTree(Flow.java:2423) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.analyzeTree(Flow.java:2406) at com.sun.tools.javac.comp.Flow.analyzeLambdaThrownTypes(Flow.java:250) at com.sun.tools.javac.comp.Attr.visitLambda(Attr.java:2423) at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1624) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607) at com.sun.tools.javac.comp.DeferredAttr$2.complete(DeferredAttr.java:284) at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:245) at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:232) at com.sun.tools.javac.comp.Resolve$MethodResultInfo.check(Resolve.java:993) at com.sun.tools.javac.comp.Resolve$4.checkArg(Resolve.java:826) at com.sun.tools.javac.comp.Resolve$AbstractMethodCheck.argumentsAcceptable(Resolve.java:731) at com.sun.tools.javac.comp.Resolve$4.argumentsAcceptable(Resolve.java:835) at com.sun.tools.javac.comp.Infer.instantiateMethod(Infer.java:162) at com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:564) at com.sun.tools.javac.comp.Resolve.checkMethod(Resolve.java:601) at com.sun.tools.javac.comp.Attr.checkMethod(Attr.java:3809) at com.sun.tools.javac.comp.Attr.checkIdInternal(Attr.java:3615) at com.sun.tools.javac.comp.Attr.checkMethodIdInternal(Attr.java:3522) at com.sun.tools.javac.comp.Attr.checkMethodId(Attr.java:3501) at com.sun.tools.javac.comp.Attr.checkId(Attr.java:3488) at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3370) at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1897) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607) at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1843) at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607) at com.sun.tools.javac.comp.DeferredAttr.attribSpeculative(DeferredAttr.java:386) at com.sun.tools.javac.comp.DeferredAttr$2.complete(DeferredAttr.java:279) at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:245) at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:232) at com.sun.tools.javac.comp.Resolve$MethodResultInfo.check(Resolve.java:993) at com.sun.tools.javac.comp.Resolve$4.checkArg(Resolve.java:826) at com.sun.tools.javac.comp.Resolve$AbstractMethodCheck.argumentsAcceptable(Resolve.java:731) at com.sun.tools.javac.comp.Resolve$4.argumentsAcceptable(Resolve.java:835) at com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:576) at com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1431) at com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1618) at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1689) at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1662) at com.sun.tools.javac.comp.Resolve$9.doLookup(Resolve.java:2415) at com.sun.tools.javac.comp.Resolve$BasicLookupHelper.lookup(Resolve.java:3074) at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3325) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2412) at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2406) at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:3395) at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3281) at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1897) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607) at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1843) at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607) at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:656) at com.sun.tools.javac.comp.Attr.visitExec(Attr.java:1611) at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1296) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:692) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1142) at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676) at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1035) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676) at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4342) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4252) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4181) at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4156) at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248) at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860) at com.sun.tools.javac.main.Main.compile(Main.java:523) at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129) at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138) at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126) at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169) at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785) at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286) at org.apache.maven.cli.MavenCli.main(MavenCli.java:197) 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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- package it.giacomobergami.datatypelang.utils; import java.util.function.Function; /** * Created by vasistas on 11/12/16. */ public interface ThrowableFunction<K,V,E extends Throwable> { V apply(K k) throws E; } //// package it.giacomobergami.datatypelang.utils; import java.util.function.Function; public class OnExcpt<X,K> { private final X elem; public OnExcpt(X e) { this.elem = e; } public <E extends Throwable> K as(ThrowableFunction<X,K,E> sup, Function<X,K> def) { try { return sup.apply(elem); } catch (Throwable throwable) { return def.apply(elem); } } public static void main(String args[]) { System.out.println(new OnExcpt<String,String>("ciao").as(s -> { throw new RuntimeException(); }, x -> "cicco")); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Not known
    via by Webbug Group,
  • How can I work around this bug in Java 8?
    via Stack Overflow by Adam Arold
    ,
  • FULL PRODUCT VERSION : java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows [Version 6.1.7601] A DESCRIPTION OF THE PROBLEM : I was running a mvn cobertura analysis on code and got the below error java.lang.NullPointerException at com.sun.tools.javac.code.Symbol$MethodSymbol.params(Symbol.java:1196) at com.sun.tools.javac.jvm.ClassReader.attachParameterAnnotations(ClassR eader.java:1111) at com.sun.tools.javac.jvm.ClassReader.readMemberAttr(ClassReader.java:8 71) at com.sun.tools.javac.jvm.ClassReader.readMemberAttrs(ClassReader.java: 1027) at com.sun.tools.javac.jvm.ClassReader.readMethod(ClassReader.java:1490) at com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:1586) at com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:16 58) at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1845) at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1777) at com.sun.tools.javac.code.Symbol.complete(Symbol.java:384) at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:766) at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1951) at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:867) at com.sun.tools.javac.comp.Resolve.findGlobalType(Resolve.java:926) at com.sun.tools.javac.comp.Resolve.findType(Resolve.java:982) at com.sun.tools.javac.comp.Resolve.findIdent(Resolve.java:1011) at com.sun.tools.javac.comp.Resolve.resolveIdent(Resolve.java:1187) at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:1714) at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:1547) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360) at com.sun.tools.javac.comp.Attr.attribType(Attr.java:390) at com.sun.tools.javac.comp.MemberEnter.visitVarDef(MemberEnter.java:607 ) at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:691 ) at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387 ) at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:399 ) at com.sun.tools.javac.comp.MemberEnter.finishClass(MemberEnter.java:410 ) at com.sun.tools.javac.comp.MemberEnter.finish(MemberEnter.java:1000) at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:967) at com.sun.tools.javac.code.Symbol.complete(Symbol.java:384) at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:766) at com.sun.tools.javac.comp.Enter.complete(Enter.java:464) at com.sun.tools.javac.comp.Enter.main(Enter.java:442) at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:82 2) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727) at com.sun.tools.javac.main.Main.compile(Main.java:353) at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:113) at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProces s(JavaxToolsCompiler.java:126) at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(Javac Compiler.java:169) at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(Abstrac tCompilerMojo.java:785) at org.apache.maven.plugin.compiler.TestCompilerMojo.execute(TestCompile rMojo.java:152) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default BuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecuti ons(MojoExecutor.java:364) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:198) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje ct(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje ct(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre adedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl eStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216) at org.apache.maven.cli.MavenCli.main(MavenCli.java:160) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun cher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav a:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La uncher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java: 356) REGRESSION. Last worked in version 6u43 REPRODUCIBILITY : This bug can be reproduced always.
    via by Webbug Group,
  • NullPointerException in javac
    via GitHub by jotomo
    ,
  • Fails to test the project
    via GitHub by taringamberini
    ,
    • java.lang.NullPointerException at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.trackable(Flow.java:1476) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitVarDef(Flow.java:1801) at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitVarDef(Flow.java:2516) at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:846) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:389) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1367) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitLambda(Flow.java:2225) at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1618) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:389) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1367) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExpr(Flow.java:1596) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExprs(Flow.java:1608) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitApply(Flow.java:2205) at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1459) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:389) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1367) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.analyzeTree(Flow.java:2370) at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.analyzeTree(Flow.java:2353) at com.sun.tools.javac.comp.Flow.analyzeLambdaThrownTypes(Flow.java:242) at com.sun.tools.javac.comp.Attr.visitLambda(Attr.java:2400) at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1618) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.DeferredAttr$2.complete(DeferredAttr.java:270) at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:231) at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:218) at com.sun.tools.javac.comp.Resolve$MethodResultInfo.check(Resolve.java:976) at com.sun.tools.javac.comp.Resolve$4.checkArg(Resolve.java:822) at com.sun.tools.javac.comp.Resolve$AbstractMethodCheck.argumentsAcceptable(Resolve.java:733) at com.sun.tools.javac.comp.Resolve$4.argumentsAcceptable(Resolve.java:831) at com.sun.tools.javac.comp.Infer.instantiateMethod(Infer.java:162) at com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:566) at com.sun.tools.javac.comp.Resolve.checkMethod(Resolve.java:603) at com.sun.tools.javac.comp.Attr.checkMethod(Attr.java:3777) at com.sun.tools.javac.comp.Attr.checkIdInternal(Attr.java:3583) at com.sun.tools.javac.comp.Attr.checkMethodIdInternal(Attr.java:3490) at com.sun.tools.javac.comp.Attr.checkMethodId(Attr.java:3469) at com.sun.tools.javac.comp.Attr.checkId(Attr.java:3456) at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3338) at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1891) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1828) at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1459) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.visitReturn(Attr.java:1689) at com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1378) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:681) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1127) at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:903) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665) at com.sun.tools.javac.comp.Attr.visitTry(Attr.java:1357) at com.sun.tools.javac.tree.JCTree$JCTry.accept(JCTree.java:1167) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:681) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1127) at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:903) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665) at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1020) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:772) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:596) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:665) at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4305) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4215) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4149) at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4124) at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1251) at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:904) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:863) at com.sun.tools.javac.main.Main.compile(Main.java:523) at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129) at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138) at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126) at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169) at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785) at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) 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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,