Hi, Everybody!

Operating system: Windows Server 2008 R2 - 64-bit
Java version: Oracle Java 7 update 3
Database engine: Microsoft SQL Server 2008 R2 Enterprise
Web container: JBoss 7.1.0.Final
GeoServer version: 2.1.4
Microsoft SQL Server JDBC driver version 4


We want to add a new layer from a SQL Server 2008 datastore (with the
geometry datatype). However, when we try to calculate from the native
frame, we get the following stack trace:

11:07:12,431 ERROR [org.apache.wicket.RequestCycle]
(http--0.0.0.0-8080-2) java.io.IOException: Error occured calculating
bounds: java.lang.RuntimeException: java.io.IOException: Error occured
calculating bounds
        at 
org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:485)
[gt-jdbc-2.7.5.jar:]
        at 
org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:179)
[gt-jdbc-2.7.5.jar:]
        at 
org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:370)
[gt-data-2.7.5.jar:]
        at 
org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:342)
[gt-data-2.7.5.jar:]
        at 
org.geotools.data.SimpleFeatureSourceBridge.getBounds(SimpleFeatureSourceBridge.java:49)
[gt-main-2.7.5.jar:]
        at 
org.vfny.geoserver.global.GeoServerFeatureSource.getBounds(GeoServerFeatureSource.java:575)
[main-2.1.4.jar:]
        at 
org.geoserver.catalog.CatalogBuilder.getNativeBounds(CatalogBuilder.java:546)
[main-2.1.4.jar:]
        at 
org.geoserver.catalog.CatalogBuilder.getNativeBounds(CatalogBuilder.java:528)
[main-2.1.4.jar:]
        at 
org.geoserver.web.data.resource.BasicResourceConfig$1.onSubmit(BasicResourceConfig.java:115)
[web-core-2.1.4.jar:]
        at 
org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:68)
[wicket-1.4.12.jar:1.4.12]
        at 
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:143)
[wicket-1.4.12.jar:1.4.12]
        at 
org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
[wicket-1.4.12.jar:1.4.12]
        at 
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:300)
[wicket-1.4.12.jar:1.4.12]
        at 
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:119)
[wicket-1.4.12.jar:1.4.12]
        at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
[wicket-1.4.12.jar:1.4.12]
        at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
[wicket-1.4.12.jar:1.4.12]
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
[wicket-1.4.12.jar:1.4.12]
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
[wicket-1.4.12.jar:1.4.12]
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
[wicket-1.4.12.jar:1.4.12]
        at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
[wicket-1.4.12.jar:1.4.12]
        at 
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
[wicket-1.4.12.jar:1.4.12]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
        at 
org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:158)
[spring-webmvc-2.5.5.jar:2.5.5]
        at 
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
[spring-webmvc-2.5.5.jar:2.5.5]
        at 
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
[spring-webmvc-2.5.5.jar:2.5.5]
        at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
[spring-webmvc-2.5.5.jar:2.5.5]
        at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
[spring-webmvc-2.5.5.jar:2.5.5]
        at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
[spring-webmvc-2.5.5.jar:2.5.5]
        at 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
[spring-webmvc-2.5.5.jar:2.5.5]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
        at 
org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
[main-2.1.4.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
        at 
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
[main-2.1.4.jar:]
        at 
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
[main-2.1.4.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
        at 
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
[platform-2.1.4.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
        at 
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
[main-2.1.4.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
        at 
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
[spring-security-core-2.0.6.RELEASE.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
        at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
[main-2.1.4.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
        at 
org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
[main-2.1.4.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
        at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
[main-2.1.4.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
        at 
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
[main-2.1.4.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
[jbossweb-7.0.10.Final.jar:]
        at 
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154)
[jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
[jbossweb-7.0.10.Final.jar:]
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
[jbossweb-7.0.10.Final.jar:]
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
Caused by: java.io.IOException: Error occured calculating bounds
        at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1154)
[gt-jdbc-2.7.5.jar:]
        at 
org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:478)
[gt-jdbc-2.7.5.jar:]
        ... 98 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: A .NET
Framework error occurred during execution of user-defined routine or
aggregate "geometry":
System.ArgumentException: 24144: This operation cannot be completed
because the instance is not valid. Use MakeValid to convert the
instance to a valid instance. Note that MakeValid may cause the points
of a geometry instance to shift slightly.
System.ArgumentException:
   at Microsoft.SqlServer.Types.SqlGeometry.ThrowIfInvalid()
   at Microsoft.SqlServer.Types.SqlGeometry.STEnvelope()
.
        at 
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
[sqljdbc4.jar:]
        at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:4853)
[sqljdbc4.jar:]
        at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1781)
[sqljdbc4.jar:]
        at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1034)
[sqljdbc4.jar:]
        at 
org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207)
[commons-dbcp-1.3.jar:1.3]
        at 
org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207)
[commons-dbcp-1.3.jar:1.3]
        at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1138)
[gt-jdbc-2.7.5.jar:]
        ... 99 more

Thankyou for your help.

--
Giovanni Romero
ultrab...@gmail.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to