Why does MCR exit with a Java exception 'onCleanup' using xmlwrite in R2018b

I compiled my MATLAB code that uses "xmlwrite" into a Java package. It works fine in MATLAB and has worked as a compiled Java package with MCR up until R2018b, when it now exits with the following error. How can I fix this?
Warning: The following error was caught while executing 'onCleanup' class destructor:Error using xmlwrite>@()java.lang.System.setProperty(tfProp,origTF) (line 111)Java exception occurred:java.lang.NullPointerExceptionat java.util.Hashtable.put(Hashtable.java:460)at java.util.Properties.setProperty(Properties.java:166)at java.lang.System.setProperty(System.java:796)
Error in onCleanup/delete (line 60)
Error in xmlwrite>xmlWriteHelper (after line 183)
Error in xmlwrite (line 80)

 採用された回答

MathWorks Support Team
MathWorks Support Team 2020 年 11 月 24 日
In R2018b, the version of the SAXON library that xmlwrite uses was changed. It is possible that the thread that executes xmlwrite did not load the new version of SAXON at startup and hence the null pointer exception. To resolve this issue, enforce that MCR load the SAXON 9 definitions to the class path by adding the following environment variable:
MCR_CLASSPATH=$MCR_ROOT/java/jarext/saxon9-dom.jar:$MCR_ROOT/java/jarext/saxon9-dom4j.jar:$MCR_ROOT/java/jarext/saxon9-jdom.jar::$MCR_ROOT/java/jarext/saxon9-s9api.jar:$MCR_ROOT/java/jarext/saxon9-sql.jar:$MCR_ROOT/java/jarext/saxon9-xom.jar:$MCR_ROOT/java/jarext/saxon9-xpath.jar:$MCR_ROOT/java/jarext/saxon9-xqj.jar:$MCR_ROOT/java/jarext/saxon9.jar:$MCR_ROOT/java/jarext/saxon.jar
export MCR_CLASSPATH

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeploy to Java Applications Using MWArray Data API についてさらに検索

製品

リリース

R2018b

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by