While running Security for Java analysis you might encounter Fatal error in your Security for Java analysis log present in the LISA folder and no security rules are fired on dashboard:
In the analysis log file, you may find the following Warning message
Information MODULMSG ; Job execution [com.castsoftware.securityforjava] "18:31:50.786 [main] FATAL com.castsoftware.castil.translation.sources.DependencyManager - Fatal exception in JDT while generating ASTs: java.lang.NullPointerException
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] java.lang.NullPointerException
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:120)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.analyseCode(AllocationExpression.java:117)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.analyseCode(LocalDeclaration.java:87)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:124)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:737)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:261)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:118)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:776)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1005)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:636)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:990)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at com.castsoftware.castil.translation.sources.jdt.JDTTranslator.build(JDTTranslator.java:155)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at com.castsoftware.castil.translation.ApplicationTranslator.build(ApplicationTranslator.java:69)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at com.castsoftware.castil.translation.Main.loadConfigAndDo(Main.java:100)
Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at com.castsoftware.castil.translation.Main.main(Main.java:173)
For more information, refer to
- Official documentation
- Online-help : CAST Management Studio - Help > How To > Regular audience > Run analysis only
- TKB page for INFORMATION GUIDE > CMS Snapshot Analysis
Release | Yes/No |
---|---|
Security for Java-1.0 |
Follow the action plan as below:
- Once you notice the Warning in the analysis log. Navigate to your LISA folder where you have Security for Java logs, below is the location:
- Open notepad++ and search for the string "Fatal" in the above "Log" folder.
- You will get the log file in which we have the Fatal error raised. Just above the fatal error, you will have a java file that is responsible for the issue.
- Remove that Java file from the deploy folder.
- Relaunch analysis.
- If this does not solve the problem, contact CAST Technical Support with the following Relevant Input
.
Ticket #20887, #22229