anunnakian / openid4java

Automatically exported from code.google.com/p/openid4java
Apache License 2.0
0 stars 0 forks source link

NullPointerException at org.apache.commons.httpclient.HttpConnection.open coming from org.openid4java.consumer.ConsumerManager.discover(ConsumerManager.java:527) #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Running the consumer-example with t

What is the expected output? What do you see instead?
The same as with maven!

What version of the product are you using? On what operating system?
latest official release 0.9.5.593

Please provide any additional information below.

Here's the exception (below), the "userSuppliedString" is correct, I
checked it, right before the exception it shows:

userSuppliedString = http://myopenidusername.myopenid.com/, returnToUrl =
http://localhost:8082/OpenId/consumerServlet?is_return=true

This only happens when I try to run the example with tomcat, with maven it
works well. Maybe something wrong with my WAR (attached), the exception is
too far away from the Servlet code for me to debug it easily...

SEVERE: Servlet.service() for servlet ConsumerServlet threw exception
java.lang.NullPointerException
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:720)
    at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionA
dapter.open(MultiThreadedHttpConnectionManager.java:1321)
    at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDire
ctor.java:386)
    at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirecto
r.java:170)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
    at org.openid4java.util.HttpCache.head(HttpCache.java:296)
    at
org.openid4java.discovery.yadis.YadisResolver.retrieveXrdsLocation(YadisResolver
.java:360)
    at
org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:229)
    at
org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:221)
    at
org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:179)
    at org.openid4java.discovery.Discovery.discover(Discovery.java:134)
    at org.openid4java.discovery.Discovery.discover(Discovery.java:114)
    at org.openid4java.consumer.ConsumerManager.discover(ConsumerManager.java:527)
    at
org.openid4java.samples.consumerservlet.ConsumerServlet.authRequest(ConsumerServ
let.java:145)

Original issue reported on code.google.com by a.brass...@gmail.com on 22 Sep 2009 at 4:06

Attachments:

GoogleCodeExporter commented 9 years ago
by the way it corresponds to this line in the Servlet code:

            // perform discovery on the user-supplied identifier
            List discoveries = manager.discover(userSuppliedString);

Original comment by a.brass...@gmail.com on 22 Sep 2009 at 4:26

GoogleCodeExporter commented 9 years ago
Ok, solved I think, it appears it's a tomcat security manager problem... By 
running
it without the security manager, it worked well. I'm not sure exactly what's
happening but I suspect a lack of socket permission somewhere. I probably won't 
be
the only one with this problem, you should consider trying to catch that 
potential
null exception!

Original comment by a.brass...@gmail.com on 30 Sep 2009 at 2:02

GoogleCodeExporter commented 9 years ago

Original comment by Johnny.B...@gmail.com on 25 Mar 2010 at 12:31