Martin Kalén (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A7383cf0f-a661-43ff-b99e-6dfec7369a4f
) *created* an issue
GeoServer (
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiODQ0MGFkNmZhNDEyNGJkNWFlZjNhYzAwMmMwZTQ4MTYiLCJwIjoiaiJ9
) / Improvement (
https://osgeo-org.atlassian.net/browse/GEOS-10850?atlOrigin=eyJpIjoiODQ0MGFkNmZhNDEyNGJkNWFlZjNhYzAwMmMwZTQ4MTYiLCJwIjoiaiJ9
) GEOS-10850 (
https://osgeo-org.atlassian.net/browse/GEOS-10850?atlOrigin=eyJpIjoiODQ0MGFkNmZhNDEyNGJkNWFlZjNhYzAwMmMwZTQ4MTYiLCJwIjoiaiJ9
) Keep root cause in ExceptionText when generating OGC exception for WFS-T
insert/update/delete error (
https://osgeo-org.atlassian.net/browse/GEOS-10850?atlOrigin=eyJpIjoiODQ0MGFkNmZhNDEyNGJkNWFlZjNhYzAwMmMwZTQ4MTYiLCJwIjoiaiJ9
)
Issue Type: Improvement Affects Versions: 2.22.2 Assignee: Unassigned
Components: WFS Created: 02/Feb/23 6:15 PM Environment:
Windows Server
Priority: Medium Reporter: Martin Kalén (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A7383cf0f-a661-43ff-b99e-6dfec7369a4f
)
When using GeoServer WFS module for transactional updates, any underlying
exception text is lost while producing the ExceptionText element of resulting
OGC Exception. This is a nuisance e.g. if storage is JDBC based and there is
trigger code to validate data and return user-oriented information in SQL
exceptions if validation fails. Current GeoServer WFS implementation is not
database logic layer-friendly. The whole exception chain from GeoTools JDBC
module and upwards to WFS module, e.g. UpdateElementHandler is already prepared
for keeping the root cause exception so the change is trivial to get the
underlying error to “bubble up”.
To reproduce with MS SQL Server:
* Implement a view in SQL Server, add a INSTEAD OF UPDATE trigger, raise an SQL
error in the trigger implementation
* Perform a WFS-T update via GeoServer, on a published feature with SQL Server
storage connected to the underlying view
* Review ExceptionText element in GeoServer WFS-T OGC exception report /
response
Expected: descriptive text from SQL error visible in exception report.
Actual: Static text “ Update error: }}" + “{{Error occured updating features"
generated by getting the message text only from the top exception in
UpdateElementHandler’s implementation.
The same applies for:
* inserts and “Error performing insert: “ prefix + only top exception message
text in WFS InsertElementHandler implementation
* deletes + only top exception message text in WFS DeleteElementHandler
implementation
Also the prefix handling of the string is different for all three error types,
suggest to unify the prefix structure.
(
https://osgeo-org.atlassian.net/browse/GEOS-10850#add-comment?atlOrigin=eyJpIjoiODQ0MGFkNmZhNDEyNGJkNWFlZjNhYzAwMmMwZTQ4MTYiLCJwIjoiaiJ9
) Add Comment (
https://osgeo-org.atlassian.net/browse/GEOS-10850#add-comment?atlOrigin=eyJpIjoiODQ0MGFkNmZhNDEyNGJkNWFlZjNhYzAwMmMwZTQ4MTYiLCJwIjoiaiJ9
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100214-
sha1:fcee39f )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel