[ http://jira.codehaus.org/browse/XFIRE-235?page=comments#action_64895 ] 

Mika Goeckel commented on XFIRE-235:
------------------------------------

Jep, the Error-Reporting is poor, we will put more effort on this!

I haven't tracked down the problem completely, but it seems that we introduced 
an error between beta-1 and rc1 that creates a NPE when 
AbstractReferenceFinderImpl tries to locate "http://www.w3.org/2001/xml.xsd"; 
but I don't understand why this happens.

I've got a working WsGen Testcase on wsrp with beta-1 and a non working with 
rc-1. Both stack traces are identical and both method arguments in the call 
where rc1 fails are identical, so I reckon it has something to do with 
reference resolvers.

The NPE is at

Thread [main] (Suspended (exception NullPointerException))
        URI$Parser.parse(boolean) line: not available
        URI.<init>(String) line: not available
        
XMLSchemaInternalizationLogic$ReferenceFinder(AbstractReferenceFinderImpl).startElement(String,
 String, String, Attributes) line: 72
        SAXParser(AbstractSAXParser).startElement(QName, XMLAttributes, 
Augmentations) line: not available
        SAXParser(AbstractXMLDocumentParser).emptyElement(QName, XMLAttributes, 
Augmentations) line: not available
        XMLNSDocumentScannerImpl.scanStartElement() line: not available
        
XMLNSDocumentScannerImpl$NSContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean)
 line: not available
        
XMLNSDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) 
line: not available
        JAXPConfiguration(XML11Configuration).parse(boolean) line: not available
        JAXPConfiguration(XML11Configuration).parse(XMLInputSource) line: not 
available
        SAXParser(XMLParser).parse(XMLInputSource) line: not available
        SAXParser(AbstractSAXParser).parse(InputSource) line: not available
        DOMForest.parse(String, InputSource, boolean) line: 360
        DOMForest.parse(String, boolean) line: 267
        
XMLSchemaInternalizationLogic$ReferenceFinder(AbstractReferenceFinderImpl).startElement(String,
 String, String, Attributes) line: 76
        DOMForest$1(XMLFilterImpl).startElement(String, String, String, 
Attributes) line: not available
        DOMScanner.visit(Element) line: 224
        DOMScanner.visit(Node) line: 261
        DOMScanner.visit(Element) line: 230
        DOMScanner.scan(Element) line: 107
        SchemaCompilerImpl.parseSchema(String, Element) line: 110
        JAXBSchemaSupport.initialize(GenerationContext) line: 65
        Wsdl11Generator.generate() line: 81
        WsGenTask.execute() line: 37
        WsGenTest.testWsGen() line: 14
        NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not 
available [native method]
        NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
        DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not 
available
        Method.invoke(Object, Object...) line: not available
        WsGenTest(TestCase).runTest() line: 154
        WsGenTest(TestCase).runBare() line: 127
        TestResult$1.protect() line: 106
        TestResult.runProtected(Test, Protectable) line: 124
        TestResult.run(TestCase) line: 109
        WsGenTest(TestCase).run(TestResult) line: 118
        TestSuite.runTest(Test, TestResult) line: 208
        TestSuite.run(TestResult) line: 203
        RemoteTestRunner.runTests(String[], String) line: 478
        RemoteTestRunner.run() line: 344
        RemoteTestRunner.main(String[]) line: 196


I'll have a look on the generator code and try to spot something there now.

> "Couldn't find schema for part:" exception when generating client code from 
> BookService wsdl
> --------------------------------------------------------------------------------------------
>
>          Key: XFIRE-235
>          URL: http://jira.codehaus.org/browse/XFIRE-235
>      Project: XFire
>         Type: Bug

>   Components: Generator
>     Versions: 1.0-M6
>  Environment: Windows XP
> JDK 1.5.0_04
> ANT 1.6.5 compiled on June 2 2005
>     Reporter: Joseph Culjak
>     Assignee: Mika Goeckel
>      Fix For: 1.0-RC
>  Attachments: BookService.wsdl
>
>
> An org.codehaus,xfire.XFireRuntimeException _: Couldn't find schema for part: 
> {http://xfire.codehaus.org/BookService}getBooks is throw when executing the 
> wsgen task in an ant build file.  Moreover, using xfire-all-1.0-SNAPSHOT.jar 
> (downloaded on Jan 16th) and also 
> http://dist.codehaus.org/xfire/jars/xfire-all-1.0-20060110.191103.jar 
> produced the same stacktrace.
> The wsdl used is attached.  It was created by saving 
> http://localhost:8080/sandbox/services/BookService.wsdl to a file and naming 
> it BookService.wsdl.  This is for the demo book service that comes with the 
> distribution.  When I run the WsGenTask the follow error happens:
> org.codehaus.xfire.XFireRuntimeException: Couldn't find schema for part: 
> {http://xfire.codehaus.org/BookService}getBooks
>         at 
> org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.isWrapped(WSDLServiceBuilder.java:412)
>         at 
> org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.visit(WSDLServiceBuilder.java:265)
>         at 
> org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.walkTree(WSDLServiceBuilder.java:160)
>         at 
> org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:52)
>         at org.codehaus.xfire.gen.WsGenTask.execute(WsGenTask.java:29)
>         at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at 
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>         at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>         at org.apache.tools.ant.Main.runBuild(Main.java:668)
>         at org.apache.tools.ant.Main.startAnt(Main.java:187)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> Here is the ant task snippet.
> <path id="wsgen.classpath">
> <fileset id="lib.xfire" dir="lib">
> <patternset>
>       <include name="xfire/1.0-M6a/xfire-all-1.0-M6a.jar" />
>       <include name="sun/jaf/jaf-1.0.2/activation.jar"/>
>       <include name="jakarta/commons/codec/1.3/commons-codec-1.3.jar" />
>       <include 
> name="xfire/1.0-M6a/libs/runtime/commons-httpclient-3.0-rc3.jar" />
>       <include name="jakarta/commons/logging/1.0.4/commons-logging.jar" />
>       <include name="jdom/1.0/jdom.jar" />
>       <include name="logging/log4j/1.2.9/dist/lib/log4j-1.2.9.jar" />
>       <include name="spring/1.2.6/dist/spring.jar" />
>       <include name="xfire/1.0-M6a/libs/runtime/stax-api-1.0.jar" />
>       <include name="webservices/wsdl4j-1_5_2/lib/wsdl4j.jar" />
>       <include name="jakarta/velocity/1.4/velocity-1.4.jar" />
>       <include name="xfire/1.0-M6a/libs/runtime/xbean-2.0.0-beta1.jar" />
>       <include name="xml/stax/woodstock/2.0.4/wstx-asl-2.0.4.jar" />
>       <include name="xfire/1.0-M6a/xfire-generator-1.0-M6a.jar" />
> </patternset>
> </fileset>
> </path>
> <taskdef name="wsgen" classname="org.codehaus.xfire.gen.WsGenTask" 
> classpathref="wsgen.classpath" />
> <target name="genclient">
>       <wsgen outputdirectory="src-client" 
> wsdl="${build.dir}/BookService.wsdl" binding="xmlbeans"/>
> </target>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to