Announcement Announcement Module
Collapse
No announcement yet.
BeanDefinitionStoreException - NoSuchMethodError Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • BeanDefinitionStoreException - NoSuchMethodError

    Hello,

    I get the following error when I start my application.

    Code:
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\pr\WEB-INF\classes\applicationContext.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.config.TypedStringValue.<init>(Ljava/lang/String;)V
    Caused by: 
    
    java.lang.NoSuchMethodError: org.springframework.beans.factory.config.TypedStringValue.<init>(Ljava/lang/String;)V
    	at org.springframework.transaction.config.TxAdviceBeanDefinitionParser.parseAttributeSource(TxAdviceBeanDefinitionParser.java:102)
    	at org.springframework.transaction.config.TxAdviceBeanDefinitionParser.doParse(TxAdviceBeanDefinitionParser.java:83)
    	at org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:66)
    	at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:55)
    	at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:75)
    	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1147)
    	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1137)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:143)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:88)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:499)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:407)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
    	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:124)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:292)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
    	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:294)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    The error occurs when I ad the following fragment to applicationContext.xml (actually only at the moment when I add the attributes):

    Code:
    <tx:advice id="txAdvice" transaction-manager="txManager">
    	<tx:attributes>
    		<tx:method name="find*" read-only="true" />
    		<tx:method name="*" />
    	</tx:attributes>
    </tx:advice>
    I am using the struts2-spring-plugin to ibject my struts action classes but I don't think that has anything to do with the exception.

    I am using the following lines in web.xml to load the application context.

    Code:
    <listener>
    	<listener-class>
    		org.springframework.web.context.ContextLoaderListener
    	</listener-class>
    </listener>
    
    <context-param>
    	<param-name>contextConfigLocation</param-name>
    	<param-value>classpath*:applicationContext*.xml</param-value>
    </context-param>
    Does anybody know what I am doing wrong?

    Thanks in advance,
    Koen

  • #2
    My best guess is that you have some conflicting jars in your classpath.

    Comment


    • #3
      Thanks

      That might have been the reason. I didn't add any jars as far as I know since the problem appeared. Triggered by your answer I did a new maven build, cleaned my project and restarted eclipse and now it works.

      Ah well, at least it works now. Thanks for the reply.

      Comment

      Working...
      X