Skip to content
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

NullPointerException in ShpGeoResourceInfo while executing search in SearchView #678

Open
fgdrf opened this issue Feb 2, 2022 · 1 comment · May be fixed by #680
Open

NullPointerException in ShpGeoResourceInfo while executing search in SearchView #678

fgdrf opened this issue Feb 2, 2022 · 1 comment · May be fixed by #680

Comments

@fgdrf
Copy link
Contributor

fgdrf commented Feb 2, 2022

What I did:

  • add natruralearth dataset 10m-admin-0-countries.shp to map
  • opened Search View and typed "countries" into search field
  • exectued search, the following exception has been logged, nothing else happens:
!ENTRY org.locationtech.udig.catalog 4 0 2022-02-02 16:12:19.856
!MESSAGE Could not search in resource:C:\dev\data\testdata\10m-admin-0-countries.shp#10m-admin-0-countries
!STACK 0
java.lang.NullPointerException
	at java.net.URI$Parser.parse(URI.java:3042)
	at java.net.URI.<init>(URI.java:588)
	at org.locationtech.udig.catalog.internal.shp.ShpGeoResourceInfo.getSchema(ShpGeoResourceInfo.java:96)
	at org.locationtech.udig.catalog.internal.CatalogImpl.check(CatalogImpl.java:818)
	at org.locationtech.udig.catalog.internal.CatalogImpl.check(CatalogImpl.java:828)
	at org.locationtech.udig.catalog.internal.CatalogImpl.search(CatalogImpl.java:733)
	at org.locationtech.udig.catalog.ui.search.SearchView.searchImplementation(SearchView.java:513)
	at org.locationtech.udig.ui.SearchPart$1.run(SearchPart.java:530)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Obviously doesn't have the the FeatureType a namespace set.

@fgdrf
Copy link
Contributor Author

fgdrf commented Feb 2, 2022

After a debug-session it looks like that the ShpServiceExtension does't set ShapefileDataStoreFactory.NAMESPACEP.key in parameter map which leads to a Name-Object without a namespace.

Not sure why but the ShpGeoResourceInfo.getSchema(ShpGeoResourceInfo.java:96) does not handle null correctly, I guess I'll try to fix both ends.

fgdrf added a commit to fgdrf/udig-platform that referenced this issue Feb 7, 2022
resources, if the namespace of the type is null

Change-Id: I255a9f14a3999e7286570dcf50ed0014b524d458
Signed-off-by: Frank Gasdorf <fgdrf@users.sourceforge.net>
fgdrf added a commit to fgdrf/udig-platform that referenced this issue Feb 7, 2022
resources, if the namespace of the type is null

Change-Id: I255a9f14a3999e7286570dcf50ed0014b524d458
Signed-off-by: Frank Gasdorf <fgdrf@users.sourceforge.net>
fgdrf added a commit to fgdrf/udig-platform that referenced this issue Feb 7, 2022
resources, if the namespace of the type is null

Change-Id: I255a9f14a3999e7286570dcf50ed0014b524d458
Signed-off-by: Frank Gasdorf <fgdrf@users.sourceforge.net>
@sschulz92 sschulz92 linked a pull request Feb 7, 2022 that will close this issue
fgdrf added a commit to fgdrf/udig-platform that referenced this issue Feb 7, 2022
resources, if the namespace of the type is null

Change-Id: I255a9f14a3999e7286570dcf50ed0014b524d458
Signed-off-by: Frank Gasdorf <fgdrf@users.sourceforge.net>
@fgdrf fgdrf linked a pull request Feb 7, 2022 that will close this issue
@fgdrf fgdrf changed the title NullPointerException in ShpGeoResourceInfor while executing search in SearchView NullPointerException in ShpGeoResourceInfo while executing search in SearchView Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant