Hallo,

thanks for the answer. I work with GT 2.4-RC0. I build the project using
maven. Code and bindings were generated using maven and saxb. 
The good thing is, now the test ran well after some code modifications:
> I changed the NAMESPACE in Po class to local directory.
> I changed the return value in POSchemaLocation.resolveSchemaLocation from
> null to schemaLocationURI
> I changed int declerations to BigInteger (in the Items class).
With that the test() result throws a nice green bar and no errors. Next step
will be writing a xml. Another thing, I never did before. 

Best wishes,
Steffen


Justin Deoliveira-4 wrote:
> 
> Hi,
> 
> Can you tell me which version of geotools you are using? Are you working
> form a release? a nightly snapshot? or svn?
> 
> Thanks,
> 
> -Justin
> 
> sgebh wrote:
>> Hi,
>> I tried the purchase order parsing tutorial for xml parsing. Everything
>> worked well except for the test and I have no idea how to solve the
>> problem
>> because I don't understand it (ERROR1). I guess it is caused by the
>> namespace definition.  I also tried to change the namespace to the local
>> directory with the po.xsd file. but still there are errors (ERROR2). I
>> pasted the errors below this message. Please if anybody can help me
>> getting
>> rid of the errors. I'm already start getting crazy because I'm not able
>> to
>> run simple tutorials. 
>> 
>> Thanks,
>> Steffen.
>> 
>> ERROR 1:
>> 10.09.2007 17:10:20 org.geotools.xml.SchemaLocator locateSchema
>> WARNUNG: Failed to create schema: http://www.geotools.org/po
>> java.io.FileNotFoundException: http://geotools.codehaus.org/po
>> 
>> ERROR2
>> 10.09.2007 17:17:13 org.geotools.xml.impl.ParserHandler startElement
>> WARNUNG: Error parsing: http://www.geotools.org/po
>> 
>> Within the junit runner the following errors occur.
>> org.xml.sax.SAXException: Error parsing: http://www.geotools.org/po
>>      at
>> org.geotools.xml.impl.ParserHandler.startElement(ParserHandler.java:294)
>>      at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
>> Source)
>>      at
>> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>> Source)
>>      at
>> org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
>> Source)
>>      at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>> Source)
>>      at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>>      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>>      at org.geotools.xml.Parser.parse(Parser.java:184)
>>      at org.geotools.xml.Parser.parse(Parser.java:146)
>>      at org.geotools.po.POTest.test(POTest.java:29)
>>      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 junit.framework.TestCase.runTest(TestCase.java:154)
>>      at junit.framework.TestCase.runBare(TestCase.java:127)
>>      at junit.framework.TestResult$1.protect(TestResult.java:106)
>>      at junit.framework.TestResult.runProtected(TestResult.java:124)
>>      at junit.framework.TestResult.run(TestResult.java:109)
>>      at junit.framework.TestCase.run(TestCase.java:118)
>>      at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>      at junit.framework.TestSuite.run(TestSuite.java:203)
>>      at
>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>>      at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>      at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>>      at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>>      at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>>      at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>> Caused by: java.io.FileNotFoundException: http://geotools.codehaus.org/po
>>      at
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243)
>>      at
>> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createURLInputStream(URIConverterImpl.java:566)
>>      at
>> org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createInputStream(URIConverterImpl.java:453)
>>      at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:897)
>>      at org.geotools.xml.Schemas.parse(Schemas.java:230)
>>      at org.geotools.xml.Schemas.parse(Schemas.java:197)
>>      at
>> org.geotools.xml.impl.ParserHandler.startElement(ParserHandler.java:290)
>>      ... 30 more
>> 
>> 
>> 
> 
> 
> -- 
> Justin Deoliveira
> The Open Planning Project
> http://topp.openplans.org
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-xml-binding-example-tf4415555.html#a12609394
Sent from the geotools-gt2-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to