Saturday, February 1, 2014

Oracle ADF WebService LoadGrammer Error

Following error might be encountered while regenerating web service JAX-WS proxy either by directly right clicking on service and selecting "Regenerate WebService Proxy" or by opening the service properties windows and clicking "Ok".

oracle.jdeveloper.webservices.tools.WsdlValidationException: Error creating model from wsdl "http://localhost:9001/soa-infra/services/default/SyncService/syncprocess_client_ep?WSDL": org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/parser/XMLInputSource;)V
    at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.newWsdlValidationException(WsaAdaptor.java:825)
    at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.createProxy(WsaAdaptor.java:295)
    at oracle.jdeveloper.webservices.tools.WebServiceTools.createProxy(WebServiceTools.java:293)
    at ....
Caused by: java.lang.NoSuchMethodError: org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/parser/XMLInputSource;)V
    at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
    at com.sun.tools.xjc.reader.internalizer.DOMForest.weakSchemaCorrectnessCheck(DOMForest.java:487)
    at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:227)
    at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
    at ...

An unofficial solution to above issue is to remove "ADF Model Runtime" and "ADF Model Generic Runtime" libraries from the project properties (the project in which proxy is getting generated).


After removing the libraries, the proxy should get regenerated by using either of the above two ways,