Results 1 to 9 of 9

Thread: unable to run test-drive, NoClassDefFoundError

  1. #1
    Join Date
    Jun 2009
    Posts
    4

    Default unable to run test-drive, NoClassDefFoundError

    the application is installed at root and I got he page when I hit localhost:8080 but after launching any app I get the stack trace below in my server (tomcat 6) console, any ideas?

    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '_messageBroker': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/xpath/CachedXPathAPI
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1338)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.Abstract BeanFactory.isSingleton(AbstractBeanFactory.java:3 66)
    at org.springframework.context.support.AbstractApplic ationContext.isSingleton(AbstractApplicationContex t.java:896)
    at org.springframework.web.servlet.handler.AbstractUr lHandlerMapping.registerHandler(AbstractUrlHandler Mapping.java:296)
    at org.springframework.web.servlet.handler.SimpleUrlH andlerMapping.registerHandlers(SimpleUrlHandlerMap ping.java:129)
    at org.springframework.web.servlet.handler.SimpleUrlH andlerMapping.initApplicationContext(SimpleUrlHand lerMapping.java:103)
    at org.springframework.context.support.ApplicationObj ectSupport.initApplicationContext(ApplicationObjec tSupport.java:119)
    at org.springframework.web.context.support.WebApplica tionObjectSupport.initApplicationContext(WebApplic ationObjectSupport.java:69)
    at org.springframework.context.support.ApplicationObj ectSupport.setApplicationContext(ApplicationObject Support.java:73)
    at org.springframework.context.support.ApplicationCon textAwareProcessor.postProcessBeforeInitialization (ApplicationContextAwareProcessor.java:70)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyBeanPostProcessors BeforeInitialization(AbstractAutowireCapableBeanFa ctory.java:350)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1331)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
    ... 28 more
    Caused by: java.lang.NoClassDefFoundError: org/apache/xpath/CachedXPathAPI
    at flex.messaging.config.ApacheXPathServerConfigurati onParser.initializeExpressionQuery(ApacheXPathServ erConfigurationParser.java:43)
    at flex.messaging.config.AbstractConfigurationParser. parse(AbstractConfigurationParser.java:68)
    at org.springframework.flex.config.FlexConfigurationM anager.getMessagingConfiguration(FlexConfiguration Manager.java:96)
    at org.springframework.flex.core.MessageBrokerFactory Bean.afterPropertiesSet(MessageBrokerFactoryBean.j ava:126)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1369)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1335)
    ... 49 more
    Jun 18, 2009 11:46:39 AM org.apache.catalina.core.StandardWrapperValve invoke

  2. #2
    Join Date
    Jun 2009
    Posts
    4

    Default btw I'm trying to run this in STS-SpringSource Tool Suite

    not sure if that is the problem

  3. #3
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    Try adding:

    Code:
    <dependency>
    	<groupId>xalan</groupId>
    	<artifactId>xalan</artifactId>
    	<version>2.7.1</version>
    </dependency>
    to the pom.xml of the testdrive project and re-build (don't forget to refresh the projects in Eclipse afterwards).

    It seems this is only necessary for certain environments. I'd be curious to know exactly what JVM and OS combination you are using.
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  4. #4
    Join Date
    Jun 2009
    Posts
    4

    Default thanks that got it working

    I'm running SpringSource Tool Suite 2.0.2, with Tomcat 6.0.2 on windows professional version

  5. #5
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    And what JVM are you using?
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  6. #6
    Join Date
    Jun 2009
    Posts
    4

    Default Java HotSpot(TM) Client VM (build 14.0-b16,

    Jdk 1.6.0_14

  7. #7
    Join Date
    Jun 2009
    Posts
    4

    Default

    I had the same issue, this was a timely post, it resolved my problem as well.

    Here are my environment for your reference:
    TomCat 6.0.18
    STS 2.0.1
    Java Version 1.6.0_13

    Let me know if you additional information about my environment.
    -Soheil

  8. #8
    Join Date
    Jun 2009
    Posts
    1

    Default

    Same issue here. The xalan dependency fixes the issue.

    Setup:
    OS: Win 7 Ultimate 32bit RC
    Java: 1.6.0_13
    Tomcat: 6.0.18
    STS: 2.02

  9. #9
    Join Date
    Aug 2009
    Posts
    1

    Default same issue

    I had the same issue, and the pom dependency fix did the trick. High five to Jeremy!

    Windows XP sp2 32 bit
    Tomcat 6.0.14
    Java SE 1.6.0_13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •