2

テキスト ファイルから KML ファイルを生成しようとしていました。メモリ ファイルをマーシャリングしようとすると、次の例外が発生します。どんな手掛かり?

javax.xml.bind.PropertyException: name: com.sun.xml.bind.namespacePrefixMapper value: de.micromata.opengis.kml.v_2_2_0.Kml$NameSpaceBeautyfier@1cfa4b2
    at javax.xml.bind.helpers.AbstractMarshallerImpl.setProperty(Unknown Source)
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.setProperty(Unknown Source)
    at de.micromata.opengis.kml.v_2_2_0.Kml.createMarshaller(Kml.java:642)
    at de.micromata.opengis.kml.v_2_2_0.Kml.marshal(Kml.java:682)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.reflect.misc.Trampoline.invoke(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
4

1 に答える 1

0

を使用する場合は、クラス パスにJAXB RI (またはEclipseLink JAXB (MOXy))com.sun.xml.bind.namespacePrefixMapperがあることを確認する必要があります。

JDK には、JAXB RI の名前が変更されたバージョンのパッケージが含まれているため、代わりに次のプロパティ名を試すことができます。

com.sun.xml.internal.bind.namespacePrefixMapper

詳細については

于 2012-12-18T19:58:22.857 に答える