*Purpose

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

Analysis log file

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

Observed in CAST Extension
Release
Yes/No
Security for Java-1.0(tick)


Action Plan

Follow the action plan as below:

  1. 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:
  2. Open notepad++ and search for the string "Fatal" in the above "Log" folder.
  3. 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.
  4. Remove that Java file from the deploy folder.
  5. Relaunch analysis.
  6. If this does not solve the problem, contact  CAST Technical Support with the following Relevant Input
    .
Notes/comments

 Ticket #20887, #22229

Related Pages