52North / SOS

52°North Sensor Observation Service
https://52north.org/software/software-projects/sos/
GNU General Public License v2.0
108 stars 82 forks source link

Admin procedure description viewer fails to load description #730

Closed EHJ-52n closed 4 years ago

EHJ-52n commented 4 years ago

I inserted a sensor and tried to view the procedure description with the admin tool /admin/sensors. I can select the procedure by id, but the loading fails with an HTTP 500 internal server error.

Error Message

``` HTTP Status 500 – Internal Server Error Type Exception Report Message Request processing failed; nested exception is java.lang.NumberFormatException Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NumberFormatException org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) javax.servlet.http.HttpServlet.service(HttpServlet.java:634) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:209) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209) com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244) Root Cause java.lang.NumberFormatException java.math.BigDecimal.(BigDecimal.java:494) java.math.BigDecimal.(BigDecimal.java:383) java.math.BigDecimal.(BigDecimal.java:806) java.math.BigDecimal.valueOf(BigDecimal.java:1274) org.n52.shetland.ogc.swe.simpleType.SweQuantity.setValue(SweQuantity.java:118) org.n52.sos.converter.CoordinateTransformator.createSweQuantity(CoordinateTransformator.java:654) org.n52.sos.converter.CoordinateTransformator.transformSweCoordinates(CoordinateTransformator.java:633) org.n52.sos.converter.CoordinateTransformator.transformPosition(CoordinateTransformator.java:562) org.n52.sos.converter.CoordinateTransformator.checkAbstractProcess(CoordinateTransformator.java:532) org.n52.sos.converter.CoordinateTransformator.checkAbstractSensorML(CoordinateTransformator.java:500) org.n52.sos.converter.CoordinateTransformator.modifyDescribeSensorResponse(CoordinateTransformator.java:473) org.n52.sos.converter.CoordinateTransformator.modifyResponse(CoordinateTransformator.java:276) org.n52.sos.request.operator.AbstractRequestOperator.checkForModifierAndProcess(AbstractRequestOperator.java:450) org.n52.sos.request.operator.AbstractRequestOperator.receiveRequest(AbstractRequestOperator.java:383) org.n52.iceland.service.operator.GenericServiceOperator.receiveRequest(GenericServiceOperator.java:100) org.n52.iceland.binding.kvp.KvpBinding.doGetOperation(KvpBinding.java:114) org.n52.iceland.service.Service.get(Service.java:130) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) javax.servlet.http.HttpServlet.service(HttpServlet.java:634) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:209) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209) com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244) ```

Description from Database

```XML AirSensEUR16 longName This is an longname example template: AirSensEUR16 shortName ShortName: AirSensEUR16 true false 52 7.52 62 ```
EHJ-52n commented 4 years ago

It seems to be a problem with the coordinate transformation. When changing the EPSG of the location of the system from 4979 to 4326, the description is returned.