aspose file tools*
The moose likes Spring and the fly likes Context initialization failed error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Context initialization failed error" Watch "Context initialization failed error" New topic
Author

Context initialization failed error

akhil shukla
Greenhorn

Joined: Apr 29, 2013
Posts: 3


hi folk...
while running web application i am getting below mentioned error.
please help me to resolve it.


ERROR [main] ContextLoader.initWebApplicationContext(205) | Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext-resources.xml]; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Unable to create namespace handler for: v2c
Caused by:
org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Unable to create namespace handler for: v2c
Caused by:
java.lang.IllegalStateException: Unable to create namespace handler for: v2c
at org.apache.xbean.spring.context.v2.XBeanV2Helper.createNamespaceHandler(XBeanV2Helper.java:48)
at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.<init>(XBeanNamespaceHandler.java:41)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:82)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:59)
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings(DefaultNamespaceHandlerResolver.java:113)
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:87)
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:76)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createDefaultNamespaceHandlerResolver(XmlBeanDefinitionReader.java:517)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createReaderContext(XmlBeanDefinitionReader.java:506)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:486)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:386)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:340)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:315)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:123)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:91)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:278)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.VerifyError: (class: org/apache/xbean/spring/context/v2c/XBeanNamespaceHandler, method: parse signature: (Lorg/w3c/dom/Element;Lorg/springframework/beans/factory/xml/ParserContext;)Lorg/springframework/beans/factory/config/BeanDefinition;) Incompatible object argument for function call
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.xbean.spring.context.v2.XBeanV2Helper.createNamespaceHandler(XBeanV2Helper.java:45)
... 41 more
DEBUG [main] StartupListener.contextInitialized(28) | Initializing context...
Apr 30, 2013 8:54:51 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext-resources.xml]; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Unable to create namespace handler for: v2c
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Unable to create namespace handler for: v2c
Caused by: java.lang.IllegalStateException: Unable to create namespace handler for: v2c
at org.apache.xbean.spring.context.v2.XBeanV2Helper.createNamespaceHandler(XBeanV2Helper.java:48)
at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.<init>(XBeanNamespaceHandler.java:41)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Konda Golamaru
Ranch Hand

Joined: Dec 12, 2005
Posts: 36
Could you post the spring context code here!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Context initialization failed error