[Geoserver-users] feature types and schema changes

Hello everyone,

I have a question about feature types… I have a feature type inside of my geoserver configuration that I’m using to deliver data. (It’s pulling from a view in oracle through the Oracle NG connector). I modified the schema of the table (changed a float type column to a number type column) and suddenly I can no longer use the feature type. (going into the openlayers demo of said layer, geoserver renders nothing…only a blank image after a very long period of time) I went as far as deleting and recreating the feature type with the same specification as the other one, hoping that it would resolve the issue…it hasn’t. I then created a new feature type with a different name – which worked fine. I’m not going to need to create a new feature type (with a unique name) every time I make changes to the underlying schema am I?

Has anyone experienced anything like this? Is there an elephant in the room I’m not taking into account here? Let me know…

Aaron

Hi Aaron,

Aaron_Gundel@anonymised.com wrote:

Hello everyone,

I have a question about feature types.... I have a feature type inside of my geoserver configuration that I'm using to deliver data. (It's pulling from a view in oracle through the Oracle NG connector). I modified the schema of the table (changed a float type column to a number type column) and suddenly I can no longer use the feature type. (going into the openlayers demo of said layer, geoserver renders nothing...only a blank image after a very long period of time) I went as far as deleting and recreating the feature type with the same specification as the other one, hoping that it would resolve the issue....it hasn't. I then created a new feature type with a different name -- which worked fine. I'm not going to need to create a new feature type (with a unique name) every time I make changes to the underlying schema am I?

Hmmm... not sure exactly off the top of my head. Are you doing a restart of geoserver somewhere in the mix. Or are you trying to change the underlying feature type while geoserver is live?

Has anyone experienced anything like this? Is there an elephant in the room I'm not taking into account here? Let me know....

Aaron

------------------------------------------------------------------------

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

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

Aaron_Gundel@anonymised.com ha scritto:

Hello everyone,

I have a question about feature types.... I have a feature type inside of my geoserver configuration that I'm using to deliver data. (It's pulling from a view in oracle through the Oracle NG connector). I modified the schema of the table (changed a float type column to a number type column) and suddenly I can no longer use the feature type. (going into the openlayers demo of said layer, geoserver renders nothing...only a blank image after a very long period of time) I went as far as deleting and recreating the feature type with the same specification as the other one, hoping that it would resolve the issue....it hasn't.

It would be useful to have the geoserver.log file contained in the
geoserver data directory. At least we could see what kind of errors
were contained there. Make sure the time you got errors is actually
covered withing the file (each record is timestamped), if not,
look into the previous versions of that file (there should be up
to 4 backup copies).

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Here’s the log of what happens…

2009-05-06 10:32:19,738 ERROR [geotools.rendering] - class java.math.BigDecimal is not supported by this method
java.lang.IllegalArgumentException: class java.math.BigDecimal is not supported by this method
at org.geotools.data.DataUtilities.defaultValue(DataUtilities.java:802)
at org.geotools.feature.simple.SimpleFeatureBuilder.convert(SimpleFeatureBuilder.java:312)
at org.geotools.feature.simple.SimpleFeatureBuilder.set(SimpleFeatureBuilder.java:293)
at org.geotools.feature.simple.SimpleFeatureBuilder.add(SimpleFeatureBuilder.java:216)
at org.geoserver.feature.RetypingFeatureCollection.retype(RetypingFeatureCollection.java:75)
at org.geoserver.feature.RetypingFeatureCollection$RetypingIterator.next(RetypingFeatureCollection.java:121)
at org.geoserver.feature.RetypingFeatureCollection$RetypingIterator.next(RetypingFeatureCollection.java:106)
at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1700)
at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1618)
at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:668)
at org.geotools.renderer.shape.ShapefileRenderer.renderWithStreamingRenderer(ShapefileRenderer.java:1475)
at org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1344)
at org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:265)
at org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:351)
at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:420)
at org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:698)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:215)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
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(ServletHandler.java:1093)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
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(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java: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.headerComplete(HttpConnection.java:828)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
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.java:450)

I do restart the server after I’ve made the changes to the schema…looks like the message above is appearing in a loop over and over in the log files. Not sure if the change is happening while it’s live, but if it is, a restart happens shortly thereafter. Any thoughts?

Justin Deoliveira jdeolive@anonymised.com

05/06/2009 08:12 AM

To
Aaron_Gundel@anonymised.com

cc
geoserver-users@lists.sourceforge.net

Subject
[Junk released by User action] Re: [Geoserver-users] feature types and schema changes

Hi Aaron,

Aaron_Gundel@anonymised.com wrote:
>
> Hello everyone,
>
> I have a question about feature types.... I have a feature type inside
> of my geoserver configuration that I'm using to deliver data. (It's
> pulling from a view in oracle through the Oracle NG connector). I
> modified the schema of the table (changed a float type column to a
> number type column) and suddenly I can no longer use the feature type.
> (going into the openlayers demo of said layer, geoserver renders
> nothing...only a blank image after a very long period of time) I went
> as far as deleting and recreating the feature type with the same
> specification as the other one, hoping that it would resolve the
> issue....it hasn't. I then created a new feature type with a different
> name -- which worked fine. I'm not going to need to create a new
> feature type (with a unique name) every time I make changes to the
> underlying schema am I?
Hmmm... not sure exactly off the top of my head. Are you doing a restart
of geoserver somewhere in the mix. Or are you trying to change the
underlying feature type while geoserver is live?
>
> Has anyone experienced anything like this? Is there an elephant in the
> room I'm not taking into account here? Let me know....
>
> Aaron
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

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

On Wed, May 6, 2009 at 1:36 PM, <Aaron_Gundel@anonymised.com> wrote:

Here's the log of what happens...

2009-05-06 10:32:19,738 ERROR [geotools.rendering] - class
java.math.BigDecimal is not supported by this method
java.lang.IllegalArgumentException: class java.math.BigDecimal is not
supported by this method
[ backtrace snipped ]

By chance did your schema change cause the addition of BigDecimal
attributes to your feature type? Today I started seeing a very similar
crash on my server (1.7.4). In my case I have a feature type built
from an Oracle spatial table containing an import of the "builtupa"
data set from the DCW. It renders fine on my map, but when I issue a
GetLegendGraphic request against the layer I get no image. It appears
that the problem is that geotools doesn't know how to provide a
default value for BigDecimal attributes:

2009-05-07 20:16:08,880 ERROR [geoserver.ows] -
java.lang.IllegalArgumentException: class java.math.BigDecimal is not
supported by this method
  at org.geotools.data.DataUtilities.defaultValue(DataUtilities.java:802)
  at org.geotools.feature.simple.SimpleFeatureBuilder.convert(SimpleFeatureBuilder.java:312)
  at org.geotools.feature.simple.SimpleFeatureBuilder.set(SimpleFeatureBuilder.java:293)
  at org.geotools.feature.simple.SimpleFeatureBuilder.add(SimpleFeatureBuilder.java:216)
  at org.geotools.feature.simple.SimpleFeatureBuilder.template(SimpleFeatureBuilder.java:484)
  at org.vfny.geoserver.wms.responses.DefaultRasterLegendProducer.createSampleFeature(DefaultRasterLegendProducer.java:551)
  at org.vfny.geoserver.wms.responses.DefaultRasterLegendProducer.produceLegendGraphic(DefaultRasterLegendProducer.java:177)
  at org.vfny.geoserver.wms.responses.GetLegendGraphicResponse.execute(GetLegendGraphicResponse.java:81)
  at org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
  at org.geoserver.ows.Dispatcher.response(Dispatcher.java:699)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216)
  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
  at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
  at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
  at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
  at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
  at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
  at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
  at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
  at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
  at java.lang.Thread.run(Thread.java:619)

--
This message brought to you by Speed of Light Beer
When you're approaching infinite mass
It's Speed of Light time!

On Wed, May 6, 2009 at 1:36 PM, <Aaron_Gundel@anonymised.com> wrote:

Here's the log of what happens...

2009-05-06 10:32:19,738 ERROR [geotools.rendering] - class
java.math.BigDecimal is not supported by this method
java.lang.IllegalArgumentException: class java.math.BigDecimal is not
supported by this method

Just as a followup to this I've filed a bug report:
http://jira.codehaus.org/browse/GEOT-2479. The bug report includes the
the very short patch to fix the problem, and if anyone needs it I can
send you my copy of gt-main-2.5.5.jar that includes this patch. I'm
running it on my geoserver now and I'm happy to say that my legend
graphics are now working. :slight_smile:

--
This message brought to you by Speed of Light Beer
When you're approaching infinite mass
It's Speed of Light time!

Hey Josh, glad to see you figured out the problem. Thanks a lot for the patch! I have applied it to the trunk and 2.5.x versions of geotools.

-Justin

Joshua M. Thompson wrote:

On Wed, May 6, 2009 at 1:36 PM, <Aaron_Gundel@anonymised.com> wrote:

Here's the log of what happens...

2009-05-06 10:32:19,738 ERROR [geotools.rendering] - class
java.math.BigDecimal is not supported by this method
java.lang.IllegalArgumentException: class java.math.BigDecimal is not
supported by this method

Just as a followup to this I've filed a bug report:
http://jira.codehaus.org/browse/GEOT-2479. The bug report includes the
the very short patch to fix the problem, and if anyone needs it I can
send you my copy of gt-main-2.5.5.jar that includes this patch. I'm
running it on my geoserver now and I'm happy to say that my legend
graphics are now working. :slight_smile:

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