Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] OpenSAML/ Weblogic exception -> NoClassDefFoundError: org/apache/xml/security/Init exception

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] OpenSAML/ Weblogic exception -> NoClassDefFoundError: org/apache/xml/security/Init exception


Chronological Thread 
  • From: Chad La Joie <>
  • To:
  • Subject: Re: [OpenSAML] OpenSAML/ Weblogic exception -> NoClassDefFoundError: org/apache/xml/security/Init exception
  • Date: Mon, 10 Jan 2011 17:09:43 -0500
  • Organization: Itumi, LLC

If you are starting a new topic please don't respond to an existing thread.

What you're seeing is a classpath issues. Be sure that all the jars bundled with opensaml are on the classpath. In particular the xmlsec jar contains the class you're seeing in the error. I have no experience with WebLogic so I have no idea how you do that.

Also, in regards to endorsement, you should only have the jars located in the "endorsed" directory that comes with OpenSAML within your JVM/container endorsed directory. Copying everything over is not a good thing and will likely lead to other errors.

On 1/10/11 5:06 PM, Michael wrote:
Hello
I am running into a problem when trying to sign the SAML assertion on WebLogic
10.3. The application deployes as a war file.
Here is the exception:
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 servlets.CreateRequestServlet.(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
.........

This exception occurs when DefaultBootstrap attempts to load a default
configuration:
DefaultBootstrap.bootstrap();

I did some home work - I tried all fixes that were mentioned on the different
forums:
I created endorsed directories under the jre/lib and copied there the
following jares:
opensaml-2.2.3.jar
resolver-2.9.1.jar
serializer-2.7.1.jar
xalan-2.7.1.jar
xercesImpl-2.9.1.jar
xml-apis-2.9.1.jar
xmlsec-2.0.jar
I attached these jares to the classpath in the startWeblogic script and have
added the weblogic.class.path property with all nessessary jars attached to
it.
Also I added the following jars to the WEB-INF/lib folder:
catalina-root.jar
commons-codec-1.3.jar
jdom.jar
opensaml-2.2.3.jar
xmldsig.jar
xmlsec-2.0.jar
xmltooling-1.2.0.jar
and updated weblogic.xml with the following part:
<wls:container-descriptor>
<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
</wls:container-descriptor>
All these attempts led me to the same result - runtime exception.
At this point I think that I need help to resolve this issue.

Please, help... I am running out of time ...

Thank you,

Michael


--
Chad La Joie
http://itumi.biz
trusted identities, delivered



Archive powered by MHonArc 2.6.16.

Top of Page