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

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_parser in java.library.path #28

Open
KeerthanaChowdary opened this issue Dec 27, 2017 · 1 comment

Comments

@KeerthanaChowdary
Copy link

KeerthanaChowdary commented Dec 27, 2017

Running this in Mac. I have done the gradle assemble.

`package com.mapzen.jpostal;

public class test1 extends TestAddressParser {

// Singleton, parser setup is done in the constructor
public static void main(String[] args) {

	AddressParser p = AddressParser.getInstance();
	ParsedComponent[] components = p.parseAddress(
			"The Book Club 100-106 Leonard St, Shoreditch, London, Greater London, EC2A 4RH, United Kingdom");

	for (ParsedComponent c : components) {
		System.out.printf("%s: %s\n", c.getLabel(), c.getValue());
	}

}

}
`

ERROR

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_parser in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.mapzen.jpostal.AddressParser.(AddressParser.java:8)
at com.mapzen.jpostal.test1.main(test1.java:8)

@mkaranta
Copy link
Contributor

You can check if things are set up correctly by running 'gradlew test'

If that fails then: Did you complete the step in the setup that is installing libpostal?

If it succeeds then you are likely missing the jvm argument: '-Djava.library.path=/jpostal/src/main/jniLibs'

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

2 participants