Hmmm... this one is sort of tough, dealing with atomic transactions means we have catch the exception and track it, rather than deal with it directly. And tracking it means that we only get the message from teh exception, which in this case is not descriptive at all.
We could modify ActionType (which is the class that holds on to the exception message) to hold a reference to the actual exception itself. Then it could report the entire stack trace. Björn Harrtell wrote: > I'd like to suggest better/more detailed error reports when WFS > transactions fails. > > My use case is that I've put a constraint in PostGIS st_isvalid(geom) > = true which means that certain updates or inserts will be rejected. > I'd like to be able to communicate to users what the cause of the > error is, but from Geoserver (1.7.3) the below exceptionreport is as > detailed information I can get - unless I'm missing something? > > My analysis of the current code is that the WFSException is thrown in > UpdateElementHandler.java line 239 and then put togheter into a > response in Transaction.java but the cause of the WFSException is only > used for logging not the response. Wouldn't it be nice if the > exception that caused the WFSException would be output into the > response in some way (the first cause, at least) > > I'd be happy to contribute improvement, if I can and if this is > something that you folks can agree is needed :) > > <?xml version="1.0" encoding="UTF-8"?> > <ows:ExceptionReport version="1.0.0" > xsi:schemaLocation="http://www.opengis.net/ows > http://10.250.250.2:80/geoserver/schemas/ows/1.0.0/owsExceptionReport > .xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:ows="http://www.opengis.net/ows"> > <ows:Exception exceptionCode="InvalidParameterValue"> > <ows:ExceptionText>update error</ows:ExceptionText> > <ows:ExceptionText>Details:</ows:ExceptionText> > <ows:ExceptionText>org.geoserver.wfs.WFSException: > update error at > > org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionResponse.java:49) > at > org.geoserver.ows.Dispatcher.response(Dispatcher.java:711) > 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.doPost(FrameworkServlet.java:511) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:637) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290 > ) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > > org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java > :108) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235 > ) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > 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:235 > ) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235 > ) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > > org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235 > ) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235 > ) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > at > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) > at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > at > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > at > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) > at > org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) > at > org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) > at > org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) > at > > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) > at > > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) > at > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) > at java.lang.Thread.run(Thread.java:619) </ows:ExceptionText> > </ows:Exception> > </ows:ExceptionReport> > > ------------------------------------------------------------------------------ > OpenSolaris 2009.06 is a cutting edge operating system for enterprises > looking to deploy the next generation of Solaris that includes the latest > innovations from Sun and the OpenSource community. Download a copy and > enjoy capabilities such as Networking, Storage and Virtualization. > Go to: http://p.sf.net/sfu/opensolaris-get > _______________________________________________ > Geoserver-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-devel -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
