Actually I should post the full stack trace.  The problem seems to be the
"Get" element.  I've looked and looked and can't find the problem, why does
it want a URI?  Looks like I still need to get my head around EMF.

xception in thread "main" java.lang.RuntimeException: Parsing failed for
HTTP: java.lang.RuntimeException: Unable to set property: Get for eobject:
{http://www.opengis.net/wcs}DCPTypeType_HTTP
        at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:158)
        at
org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:208)
        at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:174)
        at
org.geotools.xml.impl.ElementHandlerImpl.endElement(ElementHandlerImpl.java:222)
        at 
org.geotools.xml.impl.ParserHandler.endElement(ParserHandler.java:603)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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:221)
        at org.geotools.xml.Parser.parse(Parser.java:149)
        at
uk.ac.glam.jbritton.data.wcs.response.WCSGetCapabilitiesResponse.parseCapabilities(WCSGetCapabilitiesResponse.java:40)
        at
uk.ac.glam.jbritton.data.wcs.response.WCSGetCapabilitiesResponse.<init>(WCSGetCapabilitiesResponse.java:29)
        at
org.geotools.data.wcs.WCS1_0_0$GetCapsRequest.createResponse(WCS1_0_0.java:101)
        at
org.geotools.data.ows.AbstractOpenWebService.internalIssueRequest(AbstractOpenWebService.java:421)
        at
org.geotools.data.ows.AbstractOpenWebService.issueRequest(AbstractOpenWebService.java:425)
        at
org.geotools.data.ows.AbstractOpenWebService.negotiateVersion(AbstractOpenWebService.java:222)
        at
org.geotools.data.ows.AbstractOpenWebService.<init>(AbstractOpenWebService.java:89)
        at
org.geotools.data.wcs.WebCoverageServer.<init>(WebCoverageServer.java:161)
        at uk.ac.glam.jbritton.test.WCSTest.main(WCSTest.java:25)
Caused by: java.lang.RuntimeException: Unable to set property: Get for
eobject: {http://www.opengis.net/wcs}DCPTypeType_HTTP
        at
org.geotools.xml.AbstractComplexEMFBinding.setProperty(AbstractComplexEMFBinding.java:284)
        at
org.geotools.xml.AbstractComplexEMFBinding.setProperties(AbstractComplexEMFBinding.java:202)
        at
org.geotools.xml.AbstractComplexEMFBinding.parse(AbstractComplexEMFBinding.java:143)
        at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:149)
        ... 23 more
Caused by: java.lang.ClassCastException: The feature 'get's type 'GetType'
does not permit a value of type 'java.net.URI'
        at
org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$BasicFeatureMapEntry.validate(EStructuralFeatureImpl.java:2843)
        at
org.eclipse.emf.ecore.util.FeatureMapUtil.createEntry(FeatureMapUtil.java:146)
        at
org.eclipse.emf.ecore.util.BasicFeatureMap.createEntry(BasicFeatureMap.java:94)
        at
org.eclipse.emf.ecore.util.BasicFeatureMap.addAll(BasicFeatureMap.java:1253)
        at
org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureEList.addAll(FeatureMapUtil.java:656)
        at org.geotools.xml.EMFUtils.add(EMFUtils.java:93)
        at
org.geotools.xml.AbstractComplexEMFBinding.setProperty(AbstractComplexEMFBinding.java:230)
        ... 26 more



Jon Britton wrote:
> 
> I'm just trying to do a GetCapabilities request on my local GeoServer
> instance now and I'm getting an exception:
> 
> Exception in thread "main" java.lang.RuntimeException: Parsing failed for
> HTTP: java.lang.RuntimeException: Unable to set property: Get for eobject:
> {http://www.opengis.net/wcs}DCPTypeType_HTTP
> 
> DCPTypeType_HTTP is mentioned in WCSConfiguration in the line
> "register(bindings, wcsFactory, WCS.DCPTypeType_HTTP);" but it is not
> mentioned in the factory.
> 
> I'm assuming this is because none of the bindings etc have been used in
> this direction before (to parse a getcapabilities request), is this
> correct?
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/How-to-load-a-WCS-capabilities-document-tp2598821p2683218.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to