Hmm, I've removed all vestiges of Eclipse by running this as a junit test rather than eclipse junit-plugin test. This removes the bundle resource stuff but now hits a null pointer:

Thread [main] (Suspended (exception NullPointerException))
        Schemas.getImports(XSDSchema) line: 819
ParserHandler.startElement(String, String, String, Attributes) line: 324 SAXParser(AbstractSAXParser).startElement(QName, XMLAttributes, Augmentations) line: not available
        XMLNSDocumentScannerImpl.scanStartElement() line: not available
XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook() line: not available XMLNSDocumentScannerImpl$NSContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean) line: not available XMLNSDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) line: not available XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) line: not available XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) line: not available
        SAXParser(XMLParser).parse(XMLInputSource) line: not available
SAXParser(AbstractSAXParser).parse(InputSource) line: not available
        Parser.parse(InputSource) line: 184
        Parser.parse(InputStream) line: 146
        OSmmSampleParsingTest.testFileReading() line: 84
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
        NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
        DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
        Method.invoke(Object, Object...) line: 597
        OSmmSampleParsingTest(TestCase).runTest() line: 154
        OSmmSampleParsingTest(TestCase).runBare() line: 127
        TestResult$1.protect() line: 106
        TestResult.runProtected(Test, Protectable) line: 124
        TestResult.run(TestCase) line: 109
        OSmmSampleParsingTest(TestCase).run(TestResult) line: 118
        TestSuite.runTest(Test, TestResult) line: 208
        TestSuite.run(TestResult) line: 203
        JUnit3TestReference.run(TestExecution) line: 128
        TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 460
        RemoteTestRunner.runTests(TestExecution) line: 673
        RemoteTestRunner.run() line: 386
        RemoteTestRunner.main(String[]) line: 196

Is that any easier?

Vince.

At 18:10 11/09/2007, Jesse Eichar wrote:
I don't know how the bundle resource stuff got in there it is the
URLs eclipse uses.  you can normally resolve the URLs using the
FileLocator class...

Jesse

On Sep 11, 2007, at 9:57 AM, Vince Darley wrote:

If I manually edit two of the .xsd files to insert schemaLocations
in 2 places each:

        <import namespace="http://www.opengis.net/gml";
schemaLocation="gml.xsd"/>
        <import namespace="http://www.w3.org/1999/xlink";
schemaLocation="xlink.xsd"/>

then things get a bit further, but I then get an error:

java.net.UnknownHostException: bundleresource

due to an attempt to open an input stream on this URL:

file://bundleresource://74/cache/www.w3.org/2001/datatypes.dtd

any thoughts on that?

Vince.

...and I thought xml was supposed to make things easy.

At 17:19 11/09/2007, Justin Deoliveira wrote:
Hi Guys,

Sorry to jump in late. Seems like you are making progress. This
import
seems strange to me:

<import namespace="http://www.opengis.net/gml"/>

Since it does not have any schemaLocation attribute? Which is most
likely the source of the null pointer exception. Since it is a
"well-known" namespace / schema to the parser, simply putting
schemaLocation="gml.xsd" should do the trick.

-Justin

Vince Darley wrote:
> At 11:05 11/09/2007, Gabriel Roldán wrote:
>> Configuration configuration = new
>> ApplicationSchemaConfiguration(namespace,
>> schemaLocation);
>> Parser parser = new Parser( configuration );
>
> Now that seems to work quite a lot better, except we hit null
pointer
> exceptions due to calls to 'resolveSchemaLocation':
>
> public String resolveSchemaLocation(XSDSchema schema, String
uri, String
> location) {
>
> where:
>    uri          "http://www.opengis.net/gml";
>    location    null
>
> It tries to look for a file in the directory that we supplied on
> construction, but with 'null' as a file name.
>
> This seems to be driven/triggered by lines like this:
>
>         <import namespace="http://www.opengis.net/gml"/>
>
> in the schema being parsed.
>
> any idea how to avoid that problem?
>
> Vince.
>
>
> !DSPAM:4007,46e671d1174873362379201!
>


--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.485 / Virus Database: 269.13.10/995 - Release Date:
08/09/2007 13:24

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



--
No virus found in this incoming message.
Checked by AVG Free Edition. Version: 7.5.485 / Virus Database: 269.13.10/995 - Release Date: 08/09/2007 13:24

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to