[Geoserver-users] REST Configuration API

Justin,

While running the parent pom through mvn, I get the following error:

There's some step missing or the pom at that location is corrupted??

E:\eclipse\workspace\Geoserver\src>mvn install -Prestconfig
[INFO] Scanning for projects...
[WARNING] Overriding profile: 'geosearch' (source: pom) with new
instance from s
ource: pom
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] The projects in the reactor contain a cyclic reference: Edge
between 'Ver
tex{label='org.geoserver.maven:build-configs'}' and
'Vertex{label='org.geoserver
.maven:build-configs'}' introduces to cycle in the graph
org.geoserver.maven:bui
ld-configs --> org.geoserver.maven:build-configs
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Apr 20 14:32:01 PDT 2009
[INFO] Final Memory: 4M/8M
[INFO]
------------------------------------------------------------------------
E:\eclipse\workspace\Geoserver\src>mvn --version
Apache Maven 2.1.0 (r755702; 2009-03-18 12:10:27-0700)
Java version: 1.6.0_13
Java home: E:\jdk1.6.0_13\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
E:\eclipse\workspace\Geoserver\src>

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Monday, April 20, 2009 1:20 PM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net; Froumis, James A (US SSA)
Subject: Re: [Geoserver-users] REST Configuration API

Patel,

That would be great if you could help debug. The source is available
here:

http://svn.codehaus.org/geoserver/branches/1.7.x/src/extension/restconfi
g/

I am not sure if you are an eclipse user, but the easiest way to set up
a debug environment:

1) svn co http://svn.codehaus.org/geoserver/branches/1.7.x/ gs-1.7.x
2) cd gs-1.7.x/src
3) mvn clean install -P restconfig
5) mvn eclipse:eclipse -P restconfig

Then import the modules into eclipse. Starting geoserver is then as
simple as running Start.java in the web module.

More descriptive (but a little out of date) documents available here:

http://geoserver.org/display/GEOSDOC/2+Maven+Quickstart
http://geoserver.org/display/GEOSDOC/3+Eclipse+Quickstart

-Justin

Patel, Ronak Avinash (US SSA) wrote:

Justin,

I reported the problem to JIRA.

Would it be possible for me to look at the source code and help debug
the problem?

Where can I find the source for the plugin?

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Tuesday, April 14, 2009 12:24 PM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net; Froumis, James A (US SSA)
Subject: Re: [Geoserver-users] REST Configuration API

Ok, I was able to replicate the issue. Can you file a bug report in
jira?

Patel, Ronak Avinash (US SSA) wrote:

Justin,

It seemed that it created the image the first time, but when I tried

to

upload the same image again, it barfed.

6600 [main] INFO /geoserver - Initializing WebApplicationContext for
Struts ActionServlet 'action', module ''
6629 [main] INFO org.mortbay.log - Opened
/opt/geoserver-1.7.3/logs/2009_04_14.request.log
6640 [main] INFO org.mortbay.log - Started
SelectChannelConnector@anonymised.com:8080
14 Apr 11:36:27 DEBUG [geoserver.filters] - filtering

http://patel-dev.irad.net:8080/geoserver/rest/workspaces/leia11/coverage

stores/blah/file.geotiff
14 Apr 11:36:27 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - Converted

URL

to lowercase, from:
'/rest/workspaces/leia11/coveragestores/blah/file.geotiff'; to:
'/rest/workspaces/leia11/coveragestores/blah/file.geotiff' and
httpMethod= PUT
14 Apr 11:36:27 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~
antPath= /** methodList= [Ljava.lang.String;@d0726d
14 Apr 11:36:27 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[0]:
GET
14 Apr 11:36:27 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate

is:

'/rest/workspaces/leia11/coveragestores/blah/file.geotiff'; antPath

is

/**; matchedPath=true; matchedMethods=false
14 Apr 11:36:27 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~
antPath= /** methodList= [Ljava.lang.String;@1ccf342
14 Apr 11:36:27 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[0]:
POST
14 Apr 11:36:27 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[1]:
DELETE
14 Apr 11:36:27 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[2]:
PUT
14 Apr 11:36:27 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate

is:

'/rest/workspaces/leia11/coveragestores/blah/file.geotiff'; antPath

is

/**; matchedPath=true; matchedMethods=true
13637 [btpool0-8] INFO /geoserver - Initializing Spring

FrameworkServlet

'dispatcher'
14 Apr 11:36:27 DEBUG [gdal.erdasimg] - NITFFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gdal.jp2ecw] - JP2ECWFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gdal.ehdr] - EsriHdrFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gdal.jp2mrisd] - JP2MrSIDFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gdal.erdasimg] - ErdasImgFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gdal.dted] - DTEDFormatFactory is not

availaible.

14 Apr 11:36:27 DEBUG [gdal.mrsid] - MrSIDFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gce.arcgrid] - ArcGridFormatFactory is
availaible.
14 Apr 11:36:27 DEBUG [gdal.jp2k] - JP2KFormatFactory is not

availaible.

14 Apr 11:36:27 DEBUG [gdal.ecw] - ECWFormatFactory is not

availaible.

14 Apr 11:36:27 DEBUG [gce.arcgrid] - Creating a new ArcGriFormat.
14 Apr 11:36:27 INFO [catalog.rest] - PUT file, mimetype:

image/geotiff

14 Apr 11:36:27 INFO [catalog.rest] - Auto-configuring coverage

store:

blah
14 Apr 11:36:27 INFO [geotools.factory] - Factory implementations for
category GridCoverageFactory:
  org.geotools.coverage.grid.GridCoverageFactory
14 Apr 11:36:27 DEBUG [gdal.erdasimg] - NITFFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gdal.jp2ecw] - JP2ECWFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gdal.ehdr] - EsriHdrFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gdal.jp2mrisd] - JP2MrSIDFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gdal.erdasimg] - ErdasImgFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gdal.dted] - DTEDFormatFactory is not

availaible.

14 Apr 11:36:27 DEBUG [gdal.mrsid] - MrSIDFormatFactory is not
availaible.
14 Apr 11:36:27 DEBUG [gce.arcgrid] - ArcGridFormatFactory is
availaible.
14 Apr 11:36:27 DEBUG [gdal.jp2k] - JP2KFormatFactory is not

availaible.

14 Apr 11:36:27 DEBUG [gdal.ecw] - ECWFormatFactory is not

availaible.

14 Apr 11:36:27 DEBUG [gce.arcgrid] - Creating a new ArcGriFormat.
14 Apr 11:36:27 DEBUG [geoserver.global] - In method store DataDTO
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeFormat
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeFormat
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeFormat
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeFormat
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeFormat
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeFormat
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeCoverages
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeCoverage
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeCoverage
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeCoverage
14 Apr 11:36:27 DEBUG [geoserver.global] - In method storeCoverage
14 Apr 11:36:28 DEBUG [geoserver.global] - In method storeCoverage
14 Apr 11:36:28 DEBUG [geoserver.global] - In method storeCoverage

ERROR HERE

14 Apr 11:36:46 DEBUG [geoserver.filters] - filtering

http://patel-dev.irad.net:8080/geoserver/rest/workspaces/leia11/coverage

stores/blah/file.geotiff
14 Apr 11:36:46 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - Converted

URL

to lowercase, from:
'/rest/workspaces/leia11/coveragestores/blah/file.geotiff'; to:
'/rest/workspaces/leia11/coveragestores/blah/file.geotiff' and
httpMethod= PUT
14 Apr 11:36:46 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~
antPath= /** methodList= [Ljava.lang.String;@d0726d
14 Apr 11:36:46 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[0]:
GET
14 Apr 11:36:46 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate

is:

'/rest/workspaces/leia11/coveragestores/blah/file.geotiff'; antPath

is

/**; matchedPath=true; matchedMethods=false
14 Apr 11:36:46 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~
antPath= /** methodList= [Ljava.lang.String;@1ccf342
14 Apr 11:36:46 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[0]:
POST
14 Apr 11:36:46 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[1]:
DELETE
14 Apr 11:36:46 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[2]:
PUT
14 Apr 11:36:46 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate

is:

'/rest/workspaces/leia11/coveragestores/blah/file.geotiff'; antPath

is

/**; matchedPath=true; matchedMethods=true
14 Apr 11:36:46 DEBUG [gdal.erdasimg] - NITFFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gdal.jp2ecw] - JP2ECWFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gdal.ehdr] - EsriHdrFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gdal.jp2mrisd] - JP2MrSIDFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gdal.erdasimg] - ErdasImgFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gdal.dted] - DTEDFormatFactory is not

availaible.

14 Apr 11:36:46 DEBUG [gdal.mrsid] - MrSIDFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gce.arcgrid] - ArcGridFormatFactory is
availaible.
14 Apr 11:36:46 DEBUG [gdal.jp2k] - JP2KFormatFactory is not

availaible.

14 Apr 11:36:46 DEBUG [gdal.ecw] - ECWFormatFactory is not

availaible.

14 Apr 11:36:46 DEBUG [gce.arcgrid] - Creating a new ArcGriFormat.
14 Apr 11:36:46 INFO [catalog.rest] - PUT file, mimetype:

image/geotiff

14 Apr 11:36:46 INFO [catalog.rest] - Using existing coverage store:
blah
14 Apr 11:36:46 DEBUG [gdal.erdasimg] - NITFFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gdal.jp2ecw] - JP2ECWFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gdal.ehdr] - EsriHdrFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gdal.jp2mrisd] - JP2MrSIDFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gdal.erdasimg] - ErdasImgFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gdal.dted] - DTEDFormatFactory is not

availaible.

14 Apr 11:36:46 DEBUG [gdal.mrsid] - MrSIDFormatFactory is not
availaible.
14 Apr 11:36:46 DEBUG [gce.arcgrid] - ArcGridFormatFactory is
availaible.
14 Apr 11:36:46 DEBUG [gdal.jp2k] - JP2KFormatFactory is not

availaible.

14 Apr 11:36:46 DEBUG [gdal.ecw] - ECWFormatFactory is not

availaible.

14 Apr 11:36:46 DEBUG [gce.arcgrid] - Creating a new ArcGriFormat.
14 Apr 11:36:46 ERROR [geoserver.rest] - Error auto-configuring
coverage:java.lang.NullPointerException
14 Apr 11:36:46 DEBUG [geoserver.rest] -
org.geoserver.rest.RestletException: java.lang.RuntimeException:
java.lang.NullPointerException
        at

org.geoserver.catalog.rest.CoverageStoreFileResource.handlePut(CoverageS

toreFileResource.java:165)
        at org.restlet.Finder.handle(Finder.java:298)
        at

org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet.ja

va:38)
        at org.restlet.Filter.doHandle(Filter.java:105)
        at org.restlet.Filter.handle(Filter.java:134)
        at org.restlet.Router.handle(Router.java:444)
        at

com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverte

r.java:129)
        at

org.geoserver.rest.RESTDispatcher.handleRequestInternal(RESTDispatcher.j

ava:79)
        at

org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abs

tractController.java:153)
        at

org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handl

e(SimpleControllerHandlerAdapter.java:48)
        at

org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherS

ervlet.java:875)
        at

org.springframework.web.servlet.DispatcherServlet.doService(DispatcherSe

rvlet.java:809)
        at

org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor

kServlet.java:571)
        at

org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.

java:521)
        at

javax.servlet.http.HttpServlet.service(HttpServlet.java:730)

        at

javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

        at

org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

        at

org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan

dler.java:1093)
        at

org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharac

terEncodingFilter.java:108)
        at

org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan

dler.java:1084)
        at

org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt

erChainProxy.java:264)
        at

org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterS

ecurityInterceptor.java:107)
        at

org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(Filte

rSecurityInterceptor.java:72)
        at

org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt

erChainProxy.java:274)
        at

org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTransl

ationFilter.java:110)
        at

org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt

erChainProxy.java:274)
        at

org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter

(AnonymousProcessingFilter.java:125)
        at

org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt

erChainProxy.java:274)
        at

org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProce

ssingFilter.java:178)
        at

org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt

erChainProxy.java:274)
        at

org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(H

ttpSessionContextIntegrationFilter.java:229)
        at

org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt

erChainProxy.java:274)
        at

org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:1

48)
        at

org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java

:98)
        at

org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan

dler.java:1084)
        at
org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
        at

org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan

dler.java:1084)
        at

org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.jav

a:163)
        at

org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan

dler.java:1084)
        at

org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)

        at

org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan

dler.java:1084)
        at

org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

        at

org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:2

16)
        at

org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

        at

org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

        at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at

org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler

Collection.java:206)
        at

org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav

a:114)
        at

org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

        at org.mortbay.jetty.Server.handle(Server.java:324)
        at

org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

        at

org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j

ava:842)
        at

org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)

        at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
        at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at

org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:

395)
        at

org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja

va:450)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
        at
org.geoserver.catalog.CatalogBuilder.update(CatalogBuilder.java:232)
        at

org.geoserver.catalog.CatalogBuilder.updateCoverage(CatalogBuilder.java:

155)
        at

org.geoserver.catalog.rest.CoverageStoreFileResource.handlePut(CoverageS

toreFileResource.java:132)
        ... 56 more
Caused by: java.lang.NullPointerException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native

Method)

        at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav

a:39)
        at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor

Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at

org.geoserver.catalog.CatalogBuilder.updateMapProperty(CatalogBuilder.ja

va:251)
        at
org.geoserver.catalog.CatalogBuilder.update(CatalogBuilder.java:224)
        ... 58 more

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Tuesday, April 14, 2009 11:29 AM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net; Froumis, James A (US SSA)
Subject: Re: [Geoserver-users] REST Configuration API

Both, they both contain a few related bug fixes not in the 1.7.3
release.

Patel, Ronak Avinash (US SSA) wrote:

The nightly build of geoserver? Or the plugin?

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Tuesday, April 14, 2009 11:26 AM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net; Froumis, James A (US SSA)
Subject: Re: [Geoserver-users] REST Configuration API

Ok, this fix went in after 1.7.3. Is there any chance you could try

it

out with the latest nightly build? That will at least give us the
exception that is occurring. Sorry for the inconvenience.

-Justin

Patel, Ronak Avinash (US SSA) wrote:

I downloaded the latest stable build 1.7.3a. I just downloaded that

and

the REST plugin from geoserver.org today.

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Tuesday, April 14, 2009 11:24 AM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net; Froumis, James A (US

SSA)

Subject: Re: [Geoserver-users] REST Configuration API

Hmmm... I am still not seeing the exception in the logs. Come to

think

of it I think i added the logging statement in my latest patch to

fix

the related issue. What build are you running?

Patel, Ronak Avinash (US SSA) wrote:

Hi Justin,

I set the logs to verbose like you said and I get the following

error:

14 Apr 11:13:33 DEBUG [geoserver.filters] - filtering

http://patel-dev.irad.net:8080/geoserver/rest/workspaces/leia11/coverage

stores/blah/file.geotiff
14 Apr 11:13:33 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] -

Converted

URL

to lowercase, from:
'/rest/workspaces/leia11/coveragestores/blah/file.geotiff'; to:
'/rest/workspaces/leia11/coveragestores/blah/file.geotiff' and
httpMethod= PUT
14 Apr 11:13:33 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] -

~~~~~~~~~~

antPath= /** methodList= [Ljava.lang.String;@893918
14 Apr 11:13:33 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] -

method[0]:

GET
14 Apr 11:13:33 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] -

Candidate

is:

'/rest/workspaces/leia11/coveragestores/blah/file.geotiff';

antPath

is

/**; matchedPath=true; matchedMethods=false
14 Apr 11:13:33 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] -

~~~~~~~~~~

antPath= /** methodList= [Ljava.lang.String;@327236
14 Apr 11:13:33 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] -

method[0]:

POST
14 Apr 11:13:33 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] -

method[1]:

DELETE
14 Apr 11:13:33 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] -

method[2]:

PUT
14 Apr 11:13:33 DEBUG
[security.RESTfulPathBasedFilterInvocationDefinitionMap] -

Candidate

is:

'/rest/workspaces/leia11/coveragestores/blah/file.geotiff';

antPath

is

/**; matchedPath=true; matchedMethods=true
14 Apr 11:13:33 DEBUG [gce.arcgrid] - ArcGridFormatFactory is
availaible.
14 Apr 11:13:33 DEBUG [gce.arcgrid] - Creating a new ArcGriFormat.
14 Apr 11:13:33 INFO [catalog.rest] - PUT file, mimetype:

image/geotiff

14 Apr 11:13:33 INFO [catalog.rest] - Using existing coverage

store:

blah
14 Apr 11:13:33 DEBUG [gce.arcgrid] - ArcGridFormatFactory is
availaible.
14 Apr 11:13:33 DEBUG [gce.arcgrid] - Creating a new ArcGriFormat.
14 Apr 11:13:33 ERROR [geoserver.rest] - Error auto-configuring
coverage:java.lang.NullPointerException

Like you said, I blow away the contents of the
/opt/geoserver-1.7.3/data_dir/data/coveragestorename to get rid of

my

geotiff file.

I see that the HTTP PUT does indeed upload my file to geoserver

fine.

The problem seems to be with processing the geotiff file after a
successfull upload.

Hopefully this is helpful.

Thanks,

Ronak Patel

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Tuesday, April 14, 2009 10:43 AM
To: Patel, Ronak Avinash (US SSA)
Cc: geoserver-users@lists.sourceforge.net; Froumis, James A (US

SSA)

Subject: Re: [Geoserver-users] REST Configuration API

Hi Patel,

Can you log into the admin console and turn on verbose logging.

Config -> Server and change logging to GEOSERVER_DEVELOPER. And

then

try

again including the stack trace from the error log.

Also, when files are uploaded they get put into the "data"

directory

under neath GEOSERVER_DATA_DIR, you may want to try clearing out

the

appropriate sub directories to ensure a "fresh" start. Which

reminds

me

I fixed an issue recently with files not being able to overwrite
existing files, that might be coming into play here.

Thanks,

-Justin

Patel, Ronak Avinash (US SSA) wrote:

Justin,

By the way, I am actually PUTing the image to the server and NOT
POSTing.

I keep getting this error when I try to upload a png or jpg:

14 Apr 10:00:08 INFO [catalog.rest] - PUT file, mimetype:

image/jpeg

14 Apr 10:00:08 INFO [catalog.rest] - Using existing coverage

store:

blah
14 Apr 10:00:08 ERROR [geoserver.rest] - Error auto-configuring
coverage:Unsupported file format
14 Apr 10:00:22 INFO [catalog.rest] - PUT file, mimetype:

image/png

14 Apr 10:00:22 INFO [catalog.rest] - Using existing coverage

store:

blah
14 Apr 10:00:22 ERROR [geoserver.rest] - Error auto-configuring
coverage:Unsupported file format

When I try to upload a GeoTiff, I always get the following error:

14 Apr 10:03:49 INFO [catalog.rest] - PUT file, mimetype:

image/tif

14 Apr 10:03:49 INFO [catalog.rest] - Using existing coverage

store:

blah
14 Apr 10:03:49 ERROR [geoserver.rest] - Error auto-configuring
coverage:java.lang.NullPointerException

I hope that helps in debugging the situation.

Thanks a million!!

Ronak Patel

-----Original Message-----
From: Patel, Ronak Avinash (US SSA)
Sent: Tuesday, April 14, 2009 9:50 AM
To: 'Justin Deoliveira'
Cc: geoserver-users@lists.sourceforge.net; Froumis, James A (US

SSA)

Subject: RE: [Geoserver-users] REST Configuration API

Justin,

I desperately tried all day yesterday to try to POST a coverage

and

get

Geoserver to accept my image (a GeoTiff).

I am POSTing to a CoverageStore and Workspace that I create using

the

REST API.

I am POSTing the following:

URL:

/geoserver/rest/workspaces/testWorkspace/coveragestores/testStore/file.g

eotiff

POST ContentType image/tif and the POST content is the file.

I noticed that if I set the configure=none&coverageName=test

flags

in

the URL, then the file is ingested by Geoserver without

complaining.

When I don't set these cgi parameters, things fail and complain.

Why does this happen?

Also, do I have to create a layer to host the image in the WMS?

Or

is

this done automatically?

Thanks a million!!

Ronak Patel

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.