Why do I get a Java exception error when trying to launch the results of a Polyspace Bug Finder project?

2 次查看(过去 30 天)
I'm using MATLAB R2019a and following the MathWorks example on using the Polyspace Bug Finder results class by using the following command in the MATLAB command window:
>> web(fullfile(docroot, 'bugfinder/ref/polyspace.bugfinderresults-class.html'))
I receive a Java Exception error at the line "bfSummary = proj.Results.getResults('readable');":
----------------------------------------------------------------------------------------------------------
Error using PolySpaceResult/Initialise
Java exception occurred:
java.lang.NoClassDefFoundError:
com/polyspace/mwsqlite4java/SQLiteException
 at
    com.polyspace.util.RTEFileParser.getGlobalInformationFromDB(RTEFileParser.java:188)
 at
    com.polyspace.util.RTEFileParser.parseRTEFile(RTEFileParser.java:133)
 at
    com.polyspace.util.RTEFileParser.<init>(RTEFileParser.java:52)
 at
    com.polyspace.util.ReportInterface.ReportInterface.setResultsFolder(ReportInterface.java:284)
 at
    com.polyspace.util.ReportInterface.ReportInterface.<init>(ReportInterface.java:134)
Caused by:
java.lang.ClassNotFoundException:
com.polyspace.mwsqlite4java.SQLiteException
-------------------------------------------------------------------------------------------------------------
Why do I observe this error, and how do I fix it?

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2025-3-26
There are two cases where such an error can occur:
1) MATLAB was not restarted after calling "polyspacesetup"
OR
2) MATLAB release was updated to a new update version and Polyspace was not setup again
To fix this, follow the steps mentioned below:
1) In the MATLAB command window, enter:
>> polyspacesetup('uninstall') >> polyspacesetup('install')
2) After the commands are executed, restart MATLAB.
3) To verify, run the command "javaclasspath" in MATLAB Command Window and make sure that you have mwsqlite4java.jar listed in the STATIC java path. If this is listed, then there should not be any java exception.
 

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by