java.lang.NoClassDefFoundError: org/apache/xml/serializer/OutputPropertiesFactory
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Thennarasu_Eswaran
Posted On:   Friday, September 11, 2009 12:18 PM

I am preparing an war file for an application. The build is through maven. After deploying the application, the web server log says it can't load the bean. I checked in the WEB-INF/lib it has a serializer.jar which has org/apache/xml/serializer/OutputPropertiesFactory class in it. Not sure whats going wrong ? Any help is really appreciated. This is the error I see in the web server log: [11/Sep/2009:09:31] failure ( 5852): WebModule[/ytr]: WEB2683: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootStrapBean' defin   More>>

I am preparing an war file for an application. The build is through maven. After deploying the application, the web server log says it can't load the bean.


I checked in the WEB-INF/lib it has a serializer.jar which has org/apache/xml/serializer/OutputPropertiesFactory class in it.


Not sure whats going wrong ? Any help is really appreciated.


This is the error I see in the web server log:


[11/Sep/2009:09:31] failure ( 5852): WebModule[/ytr]: WEB2683: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootStrapBean' defined in class path resource [saml2ProviderContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.mhc.sso.saml.v22.SAMLBootstraper]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/xml/serializer/OutputPropertiesFactory

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

at java.security.AccessController.doPrivileged(Native Method)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3462)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:3824)

at com.iplanet.ias.web.WebModule.start(WebModule.java:260)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)

at org.apache.catalina.startup.Embedded.start(Embedded.java:995)

at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)

at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)

at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.mhc.sso.saml.v22.SAMLBootstraper]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/xml/serializer/OutputPropertiesFactory

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.
[11/Sep/2009:09:31] info ( 5852): CORE3282: stdout: at org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:143)



Thanks

   <<Less

Re: java.lang.NoClassDefFoundError: org/apache/xml/serializer/OutputPropertiesFactory

Posted By:   Thennarasu_Eswaran  
Posted On:   Sunday, November 29, 2009 02:15 PM

Finally I spot the issue - its because there were two api's having the same implementation for OutputPropertiesFactory which have to be resolved by moving one such jar to web server's jre's extended lib.



Thanks
Thennarasu
About | Sitemap | Contact