Clear Filters
Clear Filters

NullPointerException error with Java

10 views (last 30 days)
Deepayan Bhadra
Deepayan Bhadra on 29 Aug 2019
Commented: Prashant Nirmal on 15 Nov 2019
I'm getting this error message when trying to run some unit tests. How do I fix this?
Error using print (line 102)
There was a problem while generating the output: Java exception occurred:
java.lang.NullPointerException
at com.mathworks.hg.print.FOPPDFVectorStrategy.endJob(FOPPDFVectorStrategy.java:127)
at com.mathworks.hg.util.HGVectorOutputHelper.close(HGVectorOutputHelper.java:239)
Error in saveas (line 168)
print( h, name, ['-d' dev{i}] )
Error in executeUnitTests (line 392)
saveas(fig,['.\test\unit\output\' StateFlowModelName '_UT_' t '\' Current_Test_Name '\'
Caption '.pdf']);
  1 Comment
Prashant Nirmal
Prashant Nirmal on 15 Nov 2019
Make sure your Java environment is correctly configured.
If the issue persists after configuring Java then uninstall MATLAB completely and install it again.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!