I’m having some trouble getting my openSAML2 build environment to work in Eclipse.
I’ve added the opensaml-2.1.0 jar as an External Jar to my project.
I’ve also added all the jars inside the \lib folder and I checked each jar in my Project/Java Build Path/Order and Export tab
I am using two lines of code so far in the POST method of a servlet:
messageContext = new BasicSAMLMessageContext();
messageContext.setInboundMessageTransport(
new HttpServletRequestAdapter(request));
However, after I submit the POST from a jsp form, I receive this error, as if the secondary jar cannot be found:
java.lang.NoClassDefFoundError: org/opensaml/ws/transport/InTransport
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
java.lang.Class.getConstructor0(Class.java:2671)
java.lang.Class.newInstance0(Class.java:321)
java.lang.Class.newInstance(Class.java:303)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
java.lang.Thread.run(Thread.java:595)
CONFIDENTIALITY NOTICE: The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized.
What I did instead is to copy all the SAML jars into the \lib folder of my project jar and it seems to work for now (though I wouldn’t want to do this every time!). The servlet now responds, but I get a new error:
12:04:46,726 ERROR [[samlpost]] Servlet.service() for servlet samlpost threw exception
java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
In this case, when I look inside the slf4j-api-1.5.0.jar I do not see this class Org.slf4j.spi does not have a StaticLoggerBinder class.
John, you’ll probably want to look at Mavenizing your projects[1] so you don’t need to worry (nearly as much) about dependencies—Maven will take care of it for you. For your problem below you need a specific logger[2] (you can choose among several) in addition to the opensaml jar. I use slf4j-jdk14-1.5.2.
HTH,
Glen
[1] http://www.jroller.com/gmazza/date/20080417 (Creating a Maven project from scratch)
[2] http://www.jroller.com/gmazza/date/20080916 (Step #3 specifically)
I am trying to develop a servlet Service provider along the lines of the pseudocode here:
https://spaces.internet2.edu/display/OpenSAML/OSTwoUserManualPsedocodeSP
The pseudocode shows:
messageContext.setInboundMessageTransport(new HttpServletRequestAdapter(new SAML2HttpRequestWrapper(@http request@)));
But the sample code ( HTTPPostDecoderTest.java) shows
messageContext.setInboundMessageTransport(new HttpServletRequestAdapter(httpRequest));
What would be appropriate for receiving a SAML 1 object via a FORM POST?
Also, I don’t see any source code or API doc for org.opensaml.ws.transport.http.HttpServletRequestAdapter. Is that available?
Thank you!
Short term I seem to have gotten the logger to work by downloading and adding slf4j-simple-1.5.3.jar
to my Manifest.MF classpath.
I am trying to develop a servlet Service provider along the lines of the pseudocode here:
https://spaces.internet2.edu/display/OpenSAML/OSTwoUserManualPsedocodeSP
The pseudocode shows:
messageContext.setInboundMessageTransport(new HttpServletRequestAdapter(new SAML2HttpRequestWrapper(@http request@)));
But the sample code ( HTTPPostDecoderTest.java) shows
messageContext.setInboundMessageTransport(new HttpServletRequestAdapter(httpRequest));
What would be appropriate for receiving a SAML 1 object via a FORM POST?
Also, I don’t see any source code or API doc for org.opensaml.ws.transport.http.HttpServletRequestAdapter. Is that available?
I’m trying to
add the [java-openws] repo from
https://spaces.internet2.edu/display/OpenSAML/SourceAccess
to my subeclipse plugin. When I add
the location
http://svn.middleware.georgetown.edu/view/java-openws/
I get the message:
Repository has been moved
svn: Repository moved permanently to '/view/java-openws/'; please relocate
Any suggestions?
https://svn.middleware.georgetown.edu/[REPO_NAME]
you have the wrong URL.
--
SWITCH
Serving Swiss Universities
--------------------------
Chad La Joie, Software Engineer, Net Services
Werdstrasse 2, P.O. Box, 8021 Zürich, Switzerland
phone +41 44 268 15 75, fax +41 44 268 15 68
chad....@switch.ch, http://www.switch.ch