Announcement Announcement Module
Collapse
No announcement yet.
NoClassDefFound org.springframework.util.xml.DomUtils Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NoClassDefFound org.springframework.util.xml.DomUtils

    Hi,

    I'm trying to deploy the phonebook of the WebFlow examples, but there seems to be missing a class called; org.springframework.utils.xml.DomUtils. At least I'm getting the famous NoClassDefFoundError on this one.

    It should be there in the org.springframework.util.xml package according the api.

    I'm using Spring 1.2.

    Where can I get the jar where it is in? And what is the name of that jar?

    Thanks,

    Marc

  • #2
    Marc,

    Can you post the stack trace so I can see where this error is occuring. Also make sure you have a DOM parser on your classpath - it might be that a dependent class can't be loaded.

    Rob

    Comment


    • #3
      NoClassDefFound org.springframework.util.xml.DomUtils

      Hi Robh,

      Here is my stacktrace. As you can see I added an DOM parser but there is still the NCDFE.

      I'm running tomcat 5.0.28 on windows XP.

      Regards,

      Marc

      • Apr 5, 2005 7:14:18 AM org.apache.catalina.loader.WebappClassLoader modified
        INFO: Additional JARs have been added : 'dom4j-1.4.jar'
        Apr 5, 2005 7:14:18 AM org.apache.catalina.core.StandardContext reload
        INFO: Reloading this Context has started
        Apr 5, 2005 7:14:19 AM org.springframework.context.support.AbstractApplic ationContext close
        INFO: Closing application context [org.springframework.web.context.support.XmlWebAppl icationContext;hashCode=854151667]
        Apr 5, 2005 7:14:19 AM org.springframework.beans.factory.support.Abstract BeanFactory destroySingletons
        INFO: Destroying singletons in factory {org.springframework.beans.factory.support.Default ListableBeanFactory defining beans [phoneBook]; root of BeanFactory hierarchy}
        Apr 5, 2005 7:14:22 AM org.springframework.web.context.ContextLoader initWebApplicationContext
        INFO: Root WebApplicationContext: initialization started
        Apr 5, 2005 7:14:22 AM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
        INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
        Apr 5, 2005 7:14:22 AM org.springframework.context.support.AbstractRefres hableApplicationContext refreshBeanFactory
        INFO: Bean factory for application context [org.springframework.web.context.support.XmlWebAppl icationContext;hashCode=634098163]: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [phoneBook]; root of BeanFactory hierarchy
        Apr 5, 2005 7:14:22 AM org.springframework.context.support.AbstractApplic ationContext refresh
        INFO: 1 beans defined in application context [org.springframework.web.context.support.XmlWebAppl icationContext;hashCode=634098163]
        Apr 5, 2005 7:14:22 AM org.springframework.core.CollectionFactory <clinit>
        INFO: Using JDK 1.4 collections
        Apr 5, 2005 7:14:22 AM org.springframework.context.support.AbstractApplic ationContext initMessageSource
        INFO: Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMess ageSource@51ead1f1]
        Apr 5, 2005 7:14:22 AM org.springframework.context.support.AbstractApplic ationContext initApplicationEventMulticaster
        INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicatio nEventMulticaster@529a11f1]
        Apr 5, 2005 7:14:22 AM org.springframework.ui.context.support.UiApplicati onContextUtils initThemeSource
        INFO: No ThemeSource found for [org.springframework.web.context.support.XmlWebAppl icationContext;hashCode=634098163]: using ResourceBundleThemeSource
        Apr 5, 2005 7:14:22 AM org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
        INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [phoneBook]; root of BeanFactory hierarchy]
        Apr 5, 2005 7:14:22 AM org.springframework.beans.factory.support.Abstract BeanFactory getBean
        INFO: Creating shared instance of singleton bean 'phoneBook'
        Apr 5, 2005 7:14:22 AM org.springframework.web.context.ContextLoader initWebApplicationContext
        INFO: Using context class [org.springframework.web.context.support.XmlWebAppl icationContext] for root WebApplicationContext
        Apr 5, 2005 7:14:22 AM org.springframework.web.context.ContextLoader initWebApplicationContext
        INFO: Root WebApplicationContext: initialization completed in 562 ms
        Apr 5, 2005 7:14:23 AM org.springframework.web.servlet.HttpServletBean init
        INFO: Initializing servlet 'phoneBook'
        Apr 5, 2005 7:14:23 AM org.springframework.web.servlet.FrameworkServlet initServletBean
        INFO: FrameworkServlet 'phoneBook': initialization started
        Apr 5, 2005 7:14:23 AM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
        INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/phoneBook-servlet.xml]
        Apr 5, 2005 7:14:23 AM org.springframework.context.support.AbstractRefres hableApplicationContext refreshBeanFactory
        INFO: Bean factory for application context [WebApplicationContext for namespace 'phoneBook-servlet']: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [phonebookFrontController,searchFrontController,per son.Search,person.Search.criteria.formAction,perso n.Search.executeQuery,person.Search.id.set,id.attr ibuteMapper,detailFrontController,person.Detail,co nversion.service,formatter.locator,thread.cleanupB roadcaster,person.Detail.colleagueId.set,colleague Id.attributeMapper,viewResolver]; parent: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [phoneBook]; root of BeanFactory hierarchy
        Apr 5, 2005 7:14:23 AM org.springframework.context.support.AbstractApplic ationContext refresh
        INFO: 15 beans defined in application context [WebApplicationContext for namespace 'phoneBook-servlet']
        Apr 5, 2005 7:14:23 AM org.springframework.beans.factory.support.Abstract BeanFactory getBean
        INFO: Creating shared instance of singleton bean 'conversion.service'
        Apr 5, 2005 7:14:23 AM org.springframework.beans.factory.support.Abstract BeanFactory getBean
        INFO: Creating shared instance of singleton bean 'person.Search'
        Apr 5, 2005 7:14:23 AM org.springframework.beans.factory.support.Abstract BeanFactory getBean
        INFO: Creating shared instance of singleton bean 'person.Detail'
        Apr 5, 2005 7:14:23 AM org.springframework.beans.factory.support.Abstract BeanFactory getBean
        INFO: Creating shared instance of singleton bean 'formatter.locator'
        Apr 5, 2005 7:14:23 AM org.springframework.context.support.AbstractApplic ationContext initMessageSource
        INFO: Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMess ageSource@51edd1ff]
        Apr 5, 2005 7:14:23 AM org.springframework.context.support.AbstractApplic ationContext initApplicationEventMulticaster
        INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicatio nEventMulticaster@53e811ff]
        Apr 5, 2005 7:14:23 AM org.springframework.ui.context.support.UiApplicati onContextUtils initThemeSource
        INFO: No ThemeSource found for [WebApplicationContext for namespace 'phoneBook-servlet']: using ResourceBundleThemeSource
        Apr 5, 2005 7:14:23 AM org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
        INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [phonebookFrontController,searchFrontController,per son.Search,person.Search.criteria.formAction,perso n.Search.executeQuery,person.Search.id.set,id.attr ibuteMapper,detailFrontController,person.Detail,co nversion.service,formatter.locator,thread.cleanupB roadcaster,person.Detail.colleagueId.set,colleague Id.attributeMapper,viewResolver]; parent: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [phoneBook]; root of BeanFactory hierarchy]
        Apr 5, 2005 7:14:23 AM org.springframework.beans.factory.support.Abstract BeanFactory getBean
        INFO: Creating shared instance of singleton bean 'phonebookFrontController'
        Apr 5, 2005 7:14:23 AM org.springframework.beans.factory.support.Abstract BeanFactory getBean
        INFO: Creating shared instance of singleton bean 'searchFrontController'
        Apr 5, 2005 7:14:23 AM org.springframework.beans.factory.support.Abstract BeanFactory destroySingletons
        INFO: Destroying singletons in factory {org.springframework.beans.factory.support.Default ListableBeanFactory defining beans [phonebookFrontController,searchFrontController,per son.Search,person.Search.criteria.formAction,perso n.Search.executeQuery,person.Search.id.set,id.attr ibuteMapper,detailFrontController,person.Detail,co nversion.service,formatter.locator,thread.cleanupB roadcaster,person.Detail.colleagueId.set,colleague Id.attributeMapper,viewResolver]; parent: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [phoneBook]; root of BeanFactory hierarchy}
        Apr 5, 2005 7:14:23 AM org.springframework.web.servlet.FrameworkServlet initServletBean
        SEVERE: Context initialization failed
        org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'searchFrontController' defined in ServletContext resource [/WEB-INF/phoneBook-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/util/xml/DomUtils
        java.lang.NoClassDefFoundError: org/springframework/util/xml/DomUtils
        at org.springframework.web.flow.config.XmlFlowBuilder .parseTransitions(XmlFlowBuilder.java:453)
        at org.springframework.web.flow.config.XmlFlowBuilder .parseAndAddViewState(XmlFlowBuilder.java:362)
        at org.springframework.web.flow.config.XmlFlowBuilder .parseStateDefinitions(XmlFlowBuilder.java:332)
        at org.springframework.web.flow.config.XmlFlowBuilder .buildStates(XmlFlowBuilder.java:261)
        at org.springframework.web.flow.config.FlowFactoryBea n.getFlow(FlowFactoryBean.java:161)
        at org.springframework.web.flow.config.FlowFactoryBea n.getObject(FlowFactoryBean.java:150)
        at org.springframework.beans.factory.support.Abstract BeanFactory.getObjectForSharedInstance(AbstractBea nFactory.java:721)
        at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:186)
        at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:145)
        at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.resolveReference(Abstra ctAutowireCapableBeanFactory.java:993)
        at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.resolveValueIfNecessary (AbstractAutowireCapableBeanFactory.java:931)
        at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:872)
        at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:701)
        at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:330)
        at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:256)
        at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:221)
        at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:145)
        at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:291)
        at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:317)
        at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:131)
        at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:3 03)
        at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:250 )
        at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:219)
        at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:111)
        at javax.servlet.GenericServlet.init(GenericServlet.j ava:211)
        at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1029)
        at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:862)
        at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4013)
        at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4357)
        at org.apache.catalina.core.StandardContext.reload(St andardContext.java:3043)
        at org.apache.catalina.core.StandardContext.backgroun dProcess(StandardContext.java(Compiled Code))
        at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va(Compiled Code))
        at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va(Compiled Code))
        at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va(Compiled Code))
        at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.run(ContainerBase.java(Compiled Code))
        at java.lang.Thread.run(Thread.java:567)

      Comment


      • #4
        Marc,

        Check that you don't have multiple versions of Spring lying around in your WAR or in your Tomcat directories - it could be that you can getting a clash.

        Rob

        Comment


        • #5
          I removed all the jars and added them again. Still the same problem

          From spring I use the 1.2-rc1 with dependencies version.

          In which jar should be org/springframework/util/xml/DomUtils ?

          Comment


          • #6
            Got the thing running!

            My problem was that I thought I had the latest jar of spring 1.2-rc1 but there was a newer one. I got mislead due the fact that they both have the same version numbering. Replaced the jars and now its working.

            You were right about an "old" spring jar!

            Thanks for your help!

            Comment

            Working...
            X