openvenues / jpostal

Java/JNI bindings to libpostal for for fast international street address parsing/normalization
MIT License
106 stars 44 forks source link

unsatisfied link error, no jpostal_expander #4

Closed tdicken73 closed 8 years ago

tdicken73 commented 8 years ago

I'm attempting to run jpostal on an Ubuntu AWS machine and am receiving an exception of Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_expander in java.library.path when calling AddressExpander.getInstance(); and AddressParser.getInstance(); as seen in the jpostal documentation.

I built a simple maven project locally and successfully imported com.mapzen.jpostal into the project, including it in the pom file. However, when executing the built jar with dependencies locally and on AWS, I get the error below. I tried to include the libpostal.dylib in the java.library.path, but that did not change the error. Have you seen this unsatisfied link error before? bothlinkererror

albarrentine commented 8 years ago

See issue #3. It's not libpostal.dylib that needs to be on java.library.path, it's the .so/.jniLib files built by the JNI extension itself. They can be found in build/natives after running gradle assemble. This Gradle plugin might be helpful: https://github.com/cjstehno/coffeaelectronica/wiki/Going-Native-with-Gradle

tdicken73 commented 8 years ago

Thanks, got it working

urmay commented 5 years ago

@albarrentine i am trying to run jpostal on windows. I followed all steps which are written over here my Libpostal is working Fine for address_parser. I have also cloned Jpostal from the git. But when i run the java program it is showing the same error: UnsatisfiedLinkError:

In D:\libpostal\src.libs I have msys-postal-1.dll file