4
使用莫西我可以打平我的对象模型的零件在我的JSON输出你怎么莫西OXML映射文件来识别静态类
即
<java-type name="Medium">
<java-attributes>
<xml-element java-attribute="trackList" xml-path="."/>
</java-attributes>
</java-type>
但是当我想折叠类这是一个静态类的儿童如下
<java-type name="Medium.TrackList">
<java-attributes>
<xml-element java-attribute="artistList" xml-path="."/>
</java-attributes>
</java-type>
它抱怨
Exception Description: Could not load class [Medium.TrackList] declared in the external metadata file. Please ensure that the class name is correct, and that the correct ClassLoader has been set.
at org.eclipse.persistence.exceptions.JAXBException.couldNotLoadClassFromMetadata(JAXBException.java:376)
at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.getXmlBindingsClasses(JAXBContext.java:979)
at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:879)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:157)
我该如何解决?
三江源这是问题 – 2012-07-16 11:43:18