Question

I have downloaded openid4java-0.9.6.662 and implemented a class using it. When I execute:

List discoveries = manager.discover("https://www.google.com/accounts/o8/id");

I get a

java.lang.NoClassDefFoundError: org/apache/http/protocol/ImmutableHttpProcessor
    at org.apache.http.impl.client.AbstractHttpClient.getProtocolProcessor(AbstractHttpClient.java:656)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:804)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
    at org.openid4java.util.HttpCache.head(HttpCache.java:335)
    at org.openid4java.discovery.yadis.YadisResolver.retrieveXrdsLocation(YadisResolver.java:400)
    at org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:248)
    at org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:232)
    at org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:166)
    at org.openid4java.discovery.Discovery.discover(Discovery.java:147)
    at org.openid4java.discovery.Discovery.discover(Discovery.java:129)
    at org.openid4java.consumer.ConsumerManager.discover(ConsumerManager.java:542)
    at com.sugra.openid.helper.OpenIDConsumer.authRequest(OpenIDConsumer.java:90)

the funny thing is this class cannot be found in any of the jars, thought it is supposed to be found in httpcore-4.0.1.jar, as it contains classes of the same package. This class is available in httpcore-4.2.1.jar. But I've tried it and got

org.openid4java.discovery.yadis.YadisException: 0x704: I/O transport error: hostname in certificate didn't match: <www.google.com/173.194.35.144> != <www.google.com>

that is reported to be an error of portability and a previous version should be used

What is supposed to be the right approach to use this method?

Was it helpful?

Solution

I found it. There was a conflict with another jar (httpclient.jar) I had in my app. I just had to upgrade it

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top