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

2 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 26 Mar 2025
Modificato: MathWorks Support Team il 26 Mar 2025
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.
 

Più risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by