cxf錯誤

嚴重: null
java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
	at com.sun.xml.bind.v2.util.XmlFactory.createDocumentBuilderFactory(XmlFactory.java:176)
	at com.sun.tools.xjc.reader.internalizer.DOMForest.<init>(DOMForest.java:162)
	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.resetSchema(SchemaCompilerImpl.java:215)
	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.<init>(SchemaCompilerImpl.java:114)
	at com.sun.tools.xjc.api.XJC.createSchemaCompiler(XJC.java:72)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompiler(JAXBUtils.java:639)
	at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompilerWithDefaultAllocator(JAXBUtils.java:655)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createSchemaCompiler(DynamicClientFactory.java:422)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:306)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:240)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:233)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:188)
	at cxfTest.TestCxfClent.main(TestCxfClent.java:20)
2014-9-15 14:45:13 org.apache.cxf.endpoint.dynamic.DynamicClientFactory hackInNewInternalizationLogic
警告: Cannot set a catalog resolver into the JDK internal XJC compiler.  Catalog resolved schemas may not work correctly
2014-9-15 14:45:13 org.apache.cxf.common.jaxb.JAXBUtils logGeneratedClassNames
信息: Created classes: cn.microvideo.oa.ws.dao.impl.ObjectFactory, cn.microvideo.oa.ws.dao.impl.SayHello, cn.microvideo.oa.ws.dao.impl.SayHelloResponse
Exception in thread "main" java.lang.IllegalStateException: Unable to write generated Java files for schemas: null
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:354)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:240)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:233)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:188)
	at cxfTest.TestCxfClent.main(TestCxfClent.java:20)
Caused by: java.lang.reflect.UndeclaredThrowableException
	at $Proxy29.build(Unknown Source)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:352)
	... 4 more
Caused by: java.lang.NoSuchMethodException: com.sun.codemodel.internal.JCodeModel.build(java.lang.Object)
	at java.lang.Class.getMethod(Class.java:1605)
	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:85)
	... 6 more
主要問題還是項目工程jar包比較多,找到報錯的地方,去官網下載最新的jar包替換,我是替換了xercesImpl.jar和xml-apis.jar
http://blog.csdn.net/vickychen89/article/details/6606655
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章