2

JAXBを使用する一連のクラスを含むConfluenceプラグインを使用しています。プラグインを実行すると、次のランタイム例外が発生します。

[INFO] [talledLocalContainer] javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory not found
[INFO] [talledLocalContainer]  - with linked exception:
[INFO] [talledLocalContainer] [java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
[INFO] [talledLocalContainer]   at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:152)
[INFO] [talledLocalContainer]   at javax.xml.bind.ContextFinder.find(ContextFinder.java:299)
[INFO] [talledLocalContainer]   at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
[INFO] [talledLocalContainer]   at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
[INFO] [talledLocalContainer]   at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)

私のpom.xmlファイルには次の依存関係があります。

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.6</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.confluence</groupId>
        <artifactId>confluence</artifactId>
        <version>${confluence.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.confluence.plugin</groupId>
        <artifactId>func-test</artifactId>
        <version>2.3-beta1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.sourceforge.jwebunit</groupId>
        <artifactId>jwebunit-htmlunit-plugin</artifactId>
        <version>2.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.sourceforge.nekohtml</groupId>
        <artifactId>nekohtml</artifactId>
        <version>1.9.12</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>2.1</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
</dependencies>

これを機能させる方法について何か提案はありますか?

4

1 に答える 1

0

pom.xml で JAXB への依存関係を削除してみてください。

これは、Confluence によって既に提供されている場合があります。

于 2011-03-11T10:06:06.497 に答える