mace-opensaml-users - Re: NoClassDefFoundError in xmltooling Configuration
Subject: OpenSAML user discussion
List archive
- From: Manuela Stanica <>
- To:
- Subject: Re: NoClassDefFoundError in xmltooling Configuration
- Date: Fri, 07 Dec 2007 13:30:43 +0100
Hi,
I 'm using the latest code from the trunk on https://svn.middleware.georgetown.edu/ for java-opensaml2, java-xmltooling and java-openws.
Indeed the TP2 which we initially used is old and i'm working on upgrading the code now to the latest opensaml revisions. After having made some changes for the building ot work with the updates, I'm bumping into a bunch of issues now while testing.
Right now I get a NullPointerException error while trying to build objects (like an EntityDescriptor).
The code snippet is:
builderFactory = Configuration.getBuilderFactory();
EntityDescriptorBuilder edbuilder = (EntityDescriptorBuilder)builderFactory.getBuilder(EntityDescriptor.DEFAULT_ELEMENT_NAME);
EntityDescriptor entityDescr = (EntityDescriptor) edbuilder.buildObject();
The last line throws the exception as builderFactory.getBuilder(EntityDescriptor.DEFAULT_ELEMENT_NAME) returns null...
Upon checking I got that the builderFactory.getBuilders() map is empty, as if no builders had been registered at all. Looking into the code a bit I also didn't find any place where the builders, marshallers, etc from a configuration file were loaded. I seem to remember in TP2 that was happening with something like Configuration.load() or such.
What am I missing...?
I also got difficulties while trying to register new SAML objects, as in:
Configuration.registerObjectProvider(OnlineCAService.DEFAULT_ELEMENT_NAME, new OnlineCAServiceBuilder(),new OnlineCAServiceMarshaller(),new OnlineCAServiceUnmarshaller(), null);
This leads to a NullPointerException in the line configuredObjectProviders.put(providerName, configuration) inside the above method in Configuration because of the last parameter being null.
Yet, the javadoc says * @param configuration optional XML configuration snippet. If it's indeed optional (and I hope so), maybe there should be an if(configuration!=null) surrounding that line..?
Thanks in advance,
Manuela
Chad La Joie schrieb:
If it wasn't in the distribution than that was a mistake, it should have been. You only need that library if you're trying to use JDK 1.4 version of the library as well. So if you're running on 1.5 and accidentally got the 1.4 code you might want to get the 1.5 code.
Also, you should be using the latest code from trunk, the code from TP2 is very old now. The easiest way to do this is to pull the code from the project java-shib-dist and run ./ant.sh opensaml
Manuela Stanica wrote:
Solved that one by adding backport-util-concurrent.jar , but I hadn't found this lib among the ones from the opensaml releases... Maybe it would be good to include it in third-party libs since it seems to be needed?
Cheers,
Manuela
Manuela Stanica schrieb:
Hi,
I've been working on moving from java opensaml libs TP2 to the last versions available on the svn. At the moment I'm stuck with the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/ConcurrentHashMap
at org.opensaml.xml.Configuration.<clinit>(Configuration.java:54)
at org.opensaml.xml.parse.BasicParserPool.<init>(BasicParserPool.java:121)
at net.geant.edugain.meta.publish.MetaDataMarshaller.<init>(MetaDataMarshaller.java:64)
...
The code builds and doesn't show any errors in the project but I get this exception when trying to run my test classes.
Help would be much appreciated... thanks.
Manuela
--
Manuela Stanica
DFN-Verein - The German Education & Research Network
Stresemannstrasse 78, D-10963 Berlin
Tel. +49 30 88429929
www.dfn.de Fax +49 30 88429970
- AttributeValue... ???, Arlindo Luis Marcon Junior, 12/05/2007
- Re: AttributeValue... ???, Frank Cornelis, 12/05/2007
- Re: AttributeValue... ???, Chad La Joie, 12/05/2007
- Re: AttributeValue... ???, Arlindo Luis Marcon Junior, 12/05/2007
- NoClassDefFoundError in xmltooling Configuration, Manuela Stanica, 12/06/2007
- Re: NoClassDefFoundError in xmltooling Configuration, Manuela Stanica, 12/06/2007
- Re: NoClassDefFoundError in xmltooling Configuration, Chad La Joie, 12/06/2007
- Re: NoClassDefFoundError in xmltooling Configuration, Manuela Stanica, 12/07/2007
- Re: NoClassDefFoundError in xmltooling Configuration, Manuela Stanica, 12/07/2007
- Re: NoClassDefFoundError in xmltooling Configuration, Chad La Joie, 12/07/2007
- Re: NoClassDefFoundError in xmltooling Configuration, Manuela Stanica, 12/07/2007
- Re: NoClassDefFoundError in xmltooling Configuration, Chad La Joie, 12/06/2007
- Re: NoClassDefFoundError in xmltooling Configuration, Manuela Stanica, 12/06/2007
- Re: AttributeValue... ???, Chad La Joie, 12/05/2007
- Re: AttributeValue... ???, Frank Cornelis, 12/05/2007
Archive powered by MHonArc 2.6.16.