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

Null Pointer Exception on the client (JOSM) #12

Open
marderh opened this issue Jun 22, 2020 · 18 comments
Open

Null Pointer Exception on the client (JOSM) #12

marderh opened this issue Jun 22, 2020 · 18 comments

Comments

@marderh
Copy link

marderh commented Jun 22, 2020

I really enjoy this plugin.
Seems the server is throwing 500s atm.

Stack trace:

2020-06-22 17:22:18.074 INFORMATION: GET https://bev-reverse-geocoder.thomaskonrad.at/reverse-geocode/json?lat=47.7504798&lon=15.9471808&distance=30&limit=1&epsg=4326 (JOSM Plugin Austria Address Helper) -> **HTTP/1.1 500** (166 ms)
java.lang.NullPointerException
        at org.openstreetmap.josm.plugins.austriaaddresshelper.AustriaAddressHelperAction.loadAddress(AustriaAddressHelperAction.java:117)
        at org.openstreetmap.josm.plugins.austriaaddresshelper.AustriaAddressHelperAction.actionPerformed(AustriaAddressHelperAction.java:81)
        at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
        at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2900)
        at java.desktop/javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:311)
        at java.desktop/javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:266)
        at java.desktop/javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2993)
        at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:2985)
        at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2862)
        at java.desktop/java.awt.Component.processEvent(Component.java:6409)
        at java.desktop/java.awt.Container.processEvent(Container.java:2263)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
        at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:870)
        at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1139)
        at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1009)
        at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:835)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4889)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
        at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
@pkolmann
Copy link
Contributor

pkolmann commented Jul 1, 2020

@thomaskonrad can you take a look at the server please. It seems that the postgresql server stopped working there.
Thanks

@z3ntu
Copy link

z3ntu commented Aug 5, 2020

@thomaskonrad ping?

@natrius
Copy link

natrius commented Aug 10, 2020

What is needed as a postgreSQL-Server to provide functionality again? Someone has information on that? I may be willing to provide somthing.

@pkolmann
Copy link
Contributor

I've taken a look at the API. It's not really complicated. The issue is the plugin. It's hardcoded to always query @thomaskonrad Server:

https://github.com/JOSM/austriaaddresshelper/blob/master/src/org/openstreetmap/josm/plugins/austriaaddresshelper/AustriaAddressHelperAction.java#L49

and since it's HTTPS you can't even redirect this with an easy etc/hosts entry...

So if you provide a new API Server, someone needs to also update the plugin and get the updated plugin published...

I also really hope that this plugin gets fixed. An option to specify the API URL would be the best solution...

simon04 added a commit that referenced this issue Aug 12, 2020
Advanced preference key `austriaaddresshelper.url`

See #12
@simon04
Copy link
Member

simon04 commented Aug 12, 2020

I've made the server URL configurable and released a new version: https://github.com/JOSM/austriaaddresshelper/releases/tag/v0.7.0

@z3ntu
Copy link

z3ntu commented Aug 13, 2020

Has someone else set up a server for this yet? If not I might look into it next week

@simon04
Copy link
Member

simon04 commented Aug 13, 2020

The code of bev-reverse-geocoder.thomaskonrad.at is on GitHub, but does not specify a software license: https://github.com/thomaskonrad/bev-reverse-geocoder

@pkolmann
Copy link
Contributor

I've just converted the API to php and have it running on my server:

https://bev.kolmann.at/

This currently only support JSON requests and the URL is also a bit different to the Python one.

To use this in JOSM you need to go to settings, Advanced Settings and set the 'austriaaddresshelper.url' to 'https://bev.kolmann.at/reverse-geocode.php'.

The code of the PHP api can be found here https://github.com/pkolmann/bev-reverse-geocoder/tree/php_api/php_api

@simon04
Copy link
Member

simon04 commented Aug 13, 2020

I've added a preference setting for easier customization in the v0.8.0 release

2020-08-13-195939

@thomaskonrad
Copy link
Collaborator

Sorry folks, I didn‘t have time to look into this. Great to see you‘re taking over. Is the default URL already the other server?

@thomaskonrad
Copy link
Collaborator

Shall I add a license info to the code, or is it too late?

@simon04
Copy link
Member

simon04 commented Aug 14, 2020

Great, you're back! I haven't changed the default URL (since it's your idea and plugin). Having a free license is always good as it clarifies the situation for future contributors and users.

@thomaskonrad
Copy link
Collaborator

Added a license in thomaskonrad/bev-reverse-geocoder@6dfc687.

@natrius
Copy link

natrius commented Nov 18, 2020

Hm, a update would be awesome @pkolmann , there is a village who reworked their whole numbering and i could work over it with the new data pretty fast from 01.10.2020 i guess.

@pkolmann
Copy link
Contributor

I've just updated the data on my server. Puch bei Hallein now has the new proper data.

@simon04
Copy link
Member

simon04 commented Nov 19, 2020

@pkolmann, awesome, thank you!

@thomaskonrad, @pkolmann, what are the future plans regarding thomaskonrad/bev-reverse-geocoder and its fork pkolmann/bev-reverse-geocoder. In my opinion, having one clear repository is beneficial in the long term as it avoids confusion for users looking for help, for contributors, etc. Would you consider merging those two repositories (possibly under a newly created GitHub organisation/team)?

@pkolmann
Copy link
Contributor

I've just setup this for myself any maybe others because @thomaskonrad was in hiatus for so long. I am not sure if he still maintains his server.

My repo was just to create the pull request. I am more than happy to close it or move it somewhere else.

@thomaskonrad
Copy link
Collaborator

I‘m not maintaining the server any more. The above sounded to me like you‘re taking over.

@markusstraub markusstraub mentioned this issue Feb 14, 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

No branches or pull requests

6 participants