使用JBoss中的MOXy创建JAXBContext时出现StackOverflow错误

时间:2015-01-06 19:46:54

标签: java json jaxb moxy

我使用MOXy 2.6使用MOXy JAXB上下文生成JSON。在使用jaxbContext = JAXBContextFactory.createContext(beanArray,null)创建JAXB上下文时;我低于错误。请帮我解决这个问题。

引起:java.lang.StackOverflowError     at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:464)[rt.jar:1.7.0_80-ea]     在java.lang.ClassLoader.loadClass(ClassLoader.java:405)[rt.jar:1.7.0_80-ea]     at sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:308)[rt.jar:1.7.0_80-ea]     在java.lang.ClassLoader.loadClass(ClassLoader.java:358)[rt.jar:1.7.0_80-ea]     在org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:370)[jboss-modules.jar:1.3.0.Final-redhat-2]     在org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)[jboss-modules.jar:1.3.0.Final-redhat-2]     在org.eclipse.persistence.internal.jaxb.JaxbClassLoader.loadClass(JaxbClassLoader.java:107)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.javamodel.reflection.JavaModelImpl.getClass(JavaModelImpl.java:97)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.javamodel.Helper.getJavaClass(Helper.java:214)[eclipselink.jar:2.6.0.v20141224-924f6b4]     在org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processChoiceProperty(AnnotationsProcessor.java:2485)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processPropertyTypes(AnnotationsProcessor.java:1193)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.buildNewTypeInfo(AnnotationsProcessor.java:4948)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processReferencedClass(AnnotationsProcessor.java:918)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processChoiceProperty(AnnotationsProcessor.java:2511)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processPropertyTypes(AnnotationsProcessor.java:1193)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.buildNewTypeInfo(AnnotationsProcessor.java:4948)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processReferencedClass(AnnotationsProcessor.java:918)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processChoiceProperty(AnnotationsProcessor.java:2511)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processPropertyTypes(AnnotationsProcessor.java:1193)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.buildNewTypeInfo(AnnotationsProcessor.java:4948)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processReferencedClass(AnnotationsProcessor.java:918)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processChoiceProperty(AnnotationsProcessor.java:2511)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processPropertyTypes(AnnotationsProcessor.java:1193)[eclipselink.jar:2.6.0.v20141224-924f6b4]     at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.buildNewTypeInfo(AnnotationsProcessor.java:4948)[eclipselink.jar:2.6.0.v20141224-924f6b4]

1 个答案:

答案 0 :(得分:1)

我为此问题创建了以下错误:

您是否可以在此问题中添加其他详细信息以及上面关于您正在使用的模型的错误,这将有助于我们为您解决此问题。