0

I am trying to convert MPP file to MS XML format using MPXJ library and Jpype

def convert(inputFile, outputFile):
   reader = ProjectReaderUtility.getProjectReader(inputFile)
   project = ProjectFile()
   project = reader.read(inputFile)
   writer = ProjectWriter
   writer = ProjectWriterUtility.getProjectWriter(outputFile)
   writer.write(project, outputFile)

This works fine if I try to convert to json format. However, there is always an error related to xml file. I get an error related to java xml library

java.io.IOException: java.io.IOException: javax.xml.bind.JAXBException: 
Implementation of JAXB-API has not been found on module path or classpath.
 with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]

Would anyone be able to assist in this issue. I am using Python 3.8 with jdk-15.0.2

4

1 に答える 1

0

Jon Illes の応答に触発されたように、それは間違った依存関係でした。正しい依存関係ではない jaxb-api を使用していました。依存関係のリストを確認したところ、必要な正しいパッケージは jaxb-runtime であることがわかりました。ダウンロードすると、スクリプトが機能します。

迅速な対応と解決策への指示をくれたジョンに感謝します

于 2021-03-04T07:39:18.707 に答える