Hi all,
I am getting a strange problem when i call a method which does
geocoding for a address from testNG test cases. It works if i call
that method from the public static void main() method. I got the same
issue when i called the method from the public static void main()
method, later i resolved it by adding the dependency jars.
public void geocodeAddress(){
GeoAddressStandardizer st = new GeoAddressStandardizer
("ABQIAAAAMRvIxAhe3OBQxWf3lvApLxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQbjkyJDTmHJgONjiwbIX1jUogc4w");
GeoAddress addr = st.standardizeToGeoAddress("1600 Amphitheatre
Parkway, Mountain View, CA");
System.out.println(addr.getCoordinate().getLatitude());
System.out.println(addr.getCoordinate().getLongitude());
}
the above key is for localhost.
I tried with "AABBCC" key also.
When i call this method from the testNG test case, its creating the
GeoAddressStandardizer object suuccesfully. but when we call
st.standardizeToGeoAddress("1600 Amphitheatre Parkway, Mountain View,
CA");
It throws the following exception :
Caused by: java.lang.NoSuchMethodError:
org.apache.commons.collections.CollectionUtils.isNotEmpty(Ljava/util/
Collection;)Z
at geo.google.mapping.XmlToAddressFunctor.execute
(XmlToAddressFunctor.java:52)
at geo.google.mapping.XmlToUsAddressFunctor.execute
(XmlToUsAddressFunctor.java:22)
at geo.google.mapping.XmlToUsAddressFunctor.execute
(XmlToUsAddressFunctor.java:15)
at geo.google.GeoAddressStandardizer.standardize
(GeoAddressStandardizer.java:238)
at geo.google.GeoAddressStandardizer.standardizeToGeoUsAddress
(GeoAddressStandardizer.java:164)
at geo.google.GeoAddressStandardizer.standardizeToGeoUsAddress
(GeoAddressStandardizer.java:141)
I have following jars in my project class path:
1) activation-1.1.jar
2) commons-codec-1.2.jar
3) commons-collections-3.2.jar
4) commons-httpclient-3.1-beta1.jar
5) commons-io-1.3.1.jar
6) commons-lang-2.3.jar
7) commons-logging-1.0.4.jar
8) geoGoogle-1.5.0.jar
9) jaxb-api-2.1.jar
10) jaxb-impl-2.0.3.jar
11) jsr173_api-1.0.jar
12) stax-api-1.0-2.jar
I tried to add same jars into my testNG project also, but no luck i am
getting same exceptions.
Can some body please help me to resolve this issue.
regards,
ganesh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---