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.(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.(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

你可能感兴趣的:(webservice)