-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SQLFeatureStore] Deleting features fails for certain feature type prefix configurations #848
Comments
…ertain feature type prefix configurations Reason: when searching features by prefixes, one need to make sure, the list to be searched is sorted. Else, a prefix named 'p' will wrongly return a feature 'ppFeatureName'. The test shows a concrete example.
NOTE: I updated the description to make it more clear. And here are some hints for reproducing the issue: Machine setupI tested on Ubuntu 14.04 (AMD64) with OpenJDK 7 (1.7.0_151) and Oracle JDK 8 (1.8.0_144). Setup PostGIS (Docker)
After PostgreSQL is up, use the attached shell script (prepare_postgis_docker.sh.zip) to create two feature tables (feature and feature_x) and insert a row into each table. Start deegree-webservices and activate reproducer workspaceI built deegree from the master branch (commit 3c99a88) and started deegree-webservices in Tomcat 7. Use the attached deegree workspace (deegree-workspace-idanalysis-ambiguity.zip) to get a basic SQLFeatureStore and a WFS configuration running. Send transaction request to observe issueSend the following transaction request to the WFS (e.g. via deegree's web interface):
I get mixed results, depending on the JDK used to run deegree:
|
…ertain feature type prefix configurations Reason: when searching features by prefixes, one need to make sure, the list to be searched is sorted. Else, a prefix named 'p' will wrongly return a feature 'ppFeatureName'. The test shows a concrete example.
…ertain feature type prefix configurations Reason: when searching features by prefixes, one need to make sure, the list to be searched is sorted. Else, a prefix named 'p' will wrongly return a feature 'ppFeatureName'. The test shows a concrete example.
…nalysis-ambiguity Fix #848 [SQLFeatureStore] Deleting features fails for certain feature type prefix configurations (3.3-backport)
We observed that a delete by feature id against an SQLFeatureStore fails in some cases. This issue seems to be related to certain feature prefix configuration and differs between Java versions, e.g. we have two feature types with the following feature id prefices:
We found that deleting the feature with id "APP_FEATURE_X_1" works in a Java 7 setup (tested with OpenJDK 7, 1.7.0_151 on Ubuntu 14.04 AMD64), while it fails with an exception on Java 8 (same machine, Oracle JDK 8, 1.8.0_144).
A first analysis points to method analyze(String) in class org.deegree.feature.persistence.sql.id.IdAnalyzer:
We believe this is caused by the different key order in the respective HashMap implementations:
https://stackoverflow.com/questions/38587711/hashmap-keyset-returns-keys-in-different-order-in-java-7-java-8
The text was updated successfully, but these errors were encountered: