I don’t know what happened between when I last ran it and now, but the sample code I contributed (6 jsp’s) now breaks, with a weird JSP compilation error that I don’t understand. I’m guessing this is happening because of some change to the maven POM configs and removal of the jar file from the sample.
This is really early on in the process of the consumer.
Its really easy to reproduce – just go to the samples/simple-openid directory and run
mvn jetty:run
Visit http://localhost:8080 and try using any identifier to log in. You get a 500 error with some weird class cast exception dealing with an list of Objects (I think). There’s no reference to anything in the JSP specifically except that it comes from consumer_redirect.jsp
That file hasn’t been changed since I last saw it working. I’ve reproduced this problem on windows and linux
Thoughts? Has to be related to the new jar dependency but java is being typically unhelpful in giving me useful information…
-Gabe
The openxri issue is not related – the openxri.jar files are in the WEB-INF/lib directory… its not a complaint about not finding a class… it’s a very odd JSP compilation error.
Java is not my favorite language for reasons like this – I don’t have clue one as to what’s going on here… and its not like I just fell off the (java) turnip truck.
-Gabe
mvn install:install-file -Dfile=openxri-syntax -DgroupId= org.openxri \
-DartifactId=openxri-syntax -Dversion=1.0.1 -Dpackaging=jar
mvn install:install-file -Dfile=openxri-client -DgroupId=org.openxri \Step 1. Install openid4java library.
-DartifactId=openxri-client -Dversion=1.0.1 -Dpackaging=jar
Well, you can run it yourself, but here’s what you get via the web (this is reproduced on the stderr):
[Ljava.lang.Object;
RequestURI=/simple-openid/consumer_redirect.jsp
java.lang.ClassCastException: [Ljava.lang.Object;
at org.apache.jasper.compiler.JDTJavaCompiler.compile(JDTJavaCompiler.java:466)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:364)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:581)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:464)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
From: openi...@googlegroups.com [mailto:openi...@googlegroups.com] On Behalf Of Sutra Zhou
Sent: Monday, April 16, 2007 11:02
PM
To: openi...@googlegroups.com
Subject: [openid4java] Re: Broken
sample
What's the error message
then?
The openxri libs are in the src tree. You don’t need to download them. The dependencies were correctly pointing at the svn-based copies of the openxri libs before you changed the pom.xml
Until we get openxri into mvn repository, I’ve committed a revision to the pom.xml that uses the local openxri jar files (in svn)
The instructions go back to
mvn jetty:run
We need to keep it that simple.
-Gabe
From: openi...@googlegroups.com [mailto:openi...@googlegroups.com] On Behalf Of Sutra Zhou
Sent: Tuesday, April 17, 2007 8:05
AM
To: openi...@googlegroups.com
Subject: [openid4java] Re: Broken
sample
To run the samples:
+1;
I'm thinking here also about people who want to test it with other
libraries, and don't necessarily know java; we should not ask more
then the above (and having maven installed).
Johnny
1) Marius made some changes in the jsp which borked the import statement in
the JSP's. This was causing the really really odd JSP compilation problem
(no mention of the import issue in the error - just a "ClassCastException" -
wtf?)
2) The pom for openid4java in maven is borked or something, so maven can't
figure out the dependencies for openid4java. I had all the dependencies in
the pom.xml, but Sutra took them out - I put them back in.
3) The openxri jar files are in svn and the pom.xml once again refers to
those copies.
Note that we can undo 2 and 3 once openid4java and openxri are working
properly from the maven repo, but until then, I want to make the samples as
*easy* as possible to get working for now.
-Gabe
(who is really a Python guy after having been a Perl and then a Java guy)
> -----Original Message-----
> From: openi...@googlegroups.com [mailto:openi...@googlegroups.com]
> On Behalf Of Johnny Bufu
> Sent: Tuesday, April 17, 2007 12:35 PM
> To: openi...@googlegroups.com
> Subject: [openid4java] Re: Broken sample
>
>
>
> There was a couple of problems which java/jsp does a very good job of
> obfuscating (and I've committed fixes for):
>
> 1) Marius made some changes in the jsp which borked the import
> statement in
> the JSP's. This was causing the really really odd JSP compilation
> problem
> (no mention of the import issue in the error - just a
> "ClassCastException" -
> wtf?)
Really sorry about that. Used IDEA to do the refactoring, and it
looks like it messed up these 2 jsp files. This is the first time in
5 years that IDEA destroys files during refactoring :-(
I also checked provider.jsp and provider_authorization.jsp, they seem
fine. And index.jsp and user.jsp were not affected by the refactoring.
We should probably report this to IntelliJ, but since we use an older
version (5.1.2), not sure if they will care about it.
Marius
Also, those JSPs have a lot of cruft in them (in the import
statements, and throughout the code). If you are going to dive in to
(re)-add AX, feel free to prune the cruft (e.g. commented-out code,
confusing notes, etc).
-Gabe
> -----Original Message-----
> From: openi...@googlegroups.com [mailto:openi...@googlegroups.com]
> On Behalf Of Marius Scurtescu
> Sent: Tuesday, April 17, 2007 2:30 PM
> To: openi...@googlegroups.com