IDP metadata in 3.0

Jacob Lundberg jacob at collegenet.com
Wed Jan 14 15:16:51 EST 2015


Hi Scott,

On Wed, 2015-01-14 at 18:36 +0000, Cantor, Scott wrote:
> It's news to me that the container has any role. What container doesn't 
> support arbitrary Java code that's based on the required Java version?

For JSPs the code has to pass the JSP engine.  F.e. our Tomcat
deployments use Jasper, which appears to use the Eclipse JDT as its
default compiler.  Some versions in Tomcat 7 do not support all Java 7
features.  Perhaps this problem may not bite deployments using the
latest version of Tomcat 7 but organizations like ours prefer to use
distribution-supported versions of Tomcat instead...

http://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html
This page states the default JDK is 1.6 but I tried overriding it with
1.7 and 7 and it did not resolve the problem.  I will include the
resulting log output at the bottom of this e-mail.

> >However, even after fixing that, I never did find a
> >way to access the metadata via that servlet.
> 
> You access it at /idp/shibboleth, same as in V2.

OK, good point ... although we have integrations with a lot of
institutions and based on our configuration I think in V2 the
non-InCommon institutions who distribute their metadata the "wrong" way
(directly from the IdP) are about evenly split between /idp/shibboleth
and /idp/Metadata/SAML


See below for the log output that results from metadata.jsp in at least
some versions of Tomcat 7 running on JDK 7:

Jan 09, 2015 7:51:56 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /idp threw load() exception
org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 7 in the jsp file: /WEB-INF/jsp/metadata.jsp
Syntax error on token "(", { expected
4: final WebApplicationContext springContext =
5:      WebApplicationContextUtils.getRequiredWebApplicationContext(request.getServletContext());
6: final String path = springContext.getEnvironment().getProperty("idp.home") + "/metadata/idp-metadata.xml";
7: try (final java.io.FileInputStream in = new java.io.FileInputStream(path)) {
8:      int i;
9:      while ((i = in.read()) != -1) {
10:         out.write(i);


An error occurred at line: 7 in the jsp file: /WEB-INF/jsp/metadata.jsp
Syntax error on token ")", ; expected
4: final WebApplicationContext springContext =
5:      WebApplicationContextUtils.getRequiredWebApplicationContext(request.getServletContext());
6: final String path = springContext.getEnvironment().getProperty("idp.home") + "/metadata/idp-metadata.xml";
7: try (final java.io.FileInputStream in = new java.io.FileInputStream(path)) {
8:      int i;
9:      while ((i = in.read()) != -1) {
10:         out.write(i);


An error occurred at line: 12 in the jsp file: /WEB-INF/jsp/metadata.jsp
Syntax error, insert "}" to complete Block
9:      while ((i = in.read()) != -1) {
10:         out.write(i);
11:     }
12: } catch (final java.io.IOException e) {
13:     out.println(e.getMessage());
14:     return;
15: }


Stacktrace:
        at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
        at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
        at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:469)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
        at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
        at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:138)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5026)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5313)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)


Thanks,
-Jacob

-- 

Jacob Lundberg
Director, IT Services
jacob at collegenet.com
503.290.0100 (voice)
503.973.5252 (fax)
503.901.8343 (cell)



More information about the users mailing list