-
Notifications
You must be signed in to change notification settings - Fork 0
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
java.lang.NullPointerException: Cannot invoke "java.net.URL.getPath()" because "url" is null #19
Comments
You likely, have not create the "credentials.properties" file. It is recommended to go through the steps described in SETUP.md before trying to run the script. |
I followed all the steps, got the credentials.properties file and I keep getting that error everytime, i put the file in the folder called target, is that correct? |
This looks correct to me. Did you run |
Can you also try to run |
This fixed the issue, now I need to figure out how to make it work on my side. I think it's because I just enabled the freemium api. |
I just made another commit: 80ec067 Can you |
Error.txt |
I think the reason for this error is the bounding box that you specify. If I try to but when I try to run Thus, I would recommend to use a different bounding box. The order of the bounding box is expected to be: long_min, lat_min, long_max, lat_max |
I tried with a different bounding box, i checked again to be sure that the order is correct and everything is ok on this side but i keep getting this error: |
Can you try to run |
do i run it in the target folder or it doesn't matter? |
C:\Program Files\PostgreSQL\openlr-master\target>curl -H "Authorization: Bearer YOUR_TOKEN" "https://data.traffic.hereapi.com/v7/flow?locationReferencing=olr&in=bbox:27.280,47.060,27.285,47.065" |
Btw: the coordinates you specify relate to a rather rural region in eastern romania, where HERE might not have any traffic flow data that they can provide. Is this really the region you are interested? |
It worked, the coordinates were ok, i reverted to the initial ones, i created a new token and i disabled the antivirus and it worked, the issue was caused because the antivirus was blocking the connection for some reason. Thank you for the help, now I can use it in Qgis! |
I got the result, how can i add the information into the database? |
since with java -jar here2osm.jar its still not working even though with curl it works just fine |
Can you specify more detailed what is not working? Which error message do you get when running |
Great to here this. I was not aware that an Antivirus protection could be a problem. |
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.length()" because "s" is null |
The result from the direct curl call seems to be good. For the java part, it would be interesting to have the full log file as well. There must have been an error before the error that you posted. Are you using the same token for curl and for java? |
java error.txt |
As you can see in the error.txt:
Your credentials do not allow access to the server. You need to make sure that you use the same token that works for the curl request also for the java request. The |
java_new.txt |
At least the Java code now is trying to process a proper response from the HERE API. Now the program says: |
My database is the entire Romania file and I didn't use a clipping box, I used the entire file, maybe that could be an issue? |
Not clipping should not be an issue. However, so far, we only tested with smaller regions, e.g. city of Hamburg (Germany). It would be interesting to know, if the Hamburg example works for you. |
I'll try the exemple today or later tomorrow and I'll come back with a reply |
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.net.URL.getPath()" because "url" is null
at HereApi.HereTrafficV7.getToken(HereTrafficV7.java:186)
at HereApi.HereTrafficV7.update(HereTrafficV7.java:262)
at Here2Osm.main(Here2Osm.java:23)
Any idea on how i can fix this?
The text was updated successfully, but these errors were encountered: