I am attempting to use opensaml in a WebLogic 10MP1 project and am receiving the following message.
I have been able to run a junit test case against the samez code with no problems but deploying to WebLogic gives the following message.
The xmlsec-1.4.2 jar file is in the WEB-INF/lib directory of this sample project and I added a property to the startup too explicitly define an endorced directory for the XML parsing libs.
Using opensaml 2.2.3.jar files.
java.lang.NoClassDefFoundError: org/apache/xml/security/Init
at org.opensaml.DefaultBootstrap.initializeXMLSecurity(DefaultBootstrap.java:103)
at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:79)
at test.SAML.(SAML.java:72)
at test.tst.processRequest(tst.java:52)
at test.tst.doGet(tst.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
I guess you should try to put xmlsecurity on your server's classpath.
If not possible,
maybe you can try adding all jars to WEB-INF/lib and set the prefer-web-inf-classes option in the weblogic.xml deployment descriptor.
or if you are using an ear to deploy, better is to use the more fine-grained prefer-application-packages in weblogic-application.xml
Hope that helps,
Frederik