Search code examples
javajspservletspingfederate

Error while running the ping federate agentless sample application


I tried to run the sample application in the agentless integration kit. Login page is displayed, attributes are shown. But I get error in the page where the attributes are submitted. This is the error trace:

2015-02-23 22:12:21,049 WARN [org.eclipse.jetty.servlet.ServletHandler] /AgentlessIntegrationKitSampleIdP/SubmitToSP.jsp org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6199: Generated servlet error: source value 1.5 is obsolete and will be removed in a future release

PWC6199: Generated servlet error: target value 1.5 is obsolete and will be removed in a future release

PWC6199: Generated servlet error: To suppress warnings about obsolete options, use -Xlint:-options.

PWC6197: An error occurred at line: 71 in the jsp file: /SubmitToSP.jsp PWC6199: Generated servlet error: reference to Base64 is ambiguous both class java.util.Base64 in java.util and class org.apache.commons.codec.binary.Base64 in org.apache.commons.codec.binary match

PWC6199: Generated servlet error: /SubmitToSP_jsp.java uses unchecked or unsafe operations.

PWC6199: Generated servlet error: Recompile with -Xlint:unchecked for details.

at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:126)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:196)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)

Please let me know where I am wrong!!!!

Thanks, aswini J


Solution

  • It seems you're running with Java 1.8 but the sample application is only supported on Java 1.7 so far.

    Having said that, you can make the agentless samples run under 1.8 with a few minor modifications as noted below. This is currently on the list of things for Ping development to fix. It should be noted that the agentless kit states that 1.7 is the supported environment in the documentation.

    The following jsps in agentless IK sample applications import both "java.util.*" and "org.apache.commons.codec.binary.*". The java.util.Base64 class was introduced in Java 1.8 which creates a conflict with org.apache.commons.codec.binary.Base64.

    AgentlessIntegrationKitSampleIdP/SubmitToSP.jsp AgentlessIntegrationKitSampleSP/ShowAttributes.jsp

    <%@ page import="java.util.*" %>
    ...
    <%@ page import="org.apache.commons.codec.binary.*" %>
    

    Explicitly importing the correct class will resolve this problem. For example:

    <%@ page import="java.util.*" %>
    ...
    <%@ page import="org.apache.commons.codec.binary.Base64" %>