Announcement Announcement Module
Collapse
No announcement yet.
BeanCreationException: DefaultAnnotationHandlerMapping in new project Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • BeanCreationException: DefaultAnnotationHandlerMapping in new project

    I've been using Roo for two days now. Up until now everything worked. When I deleted an entity, refreshed everything and started Tomcat again all hell broke loose.

    Everytime I start Tomcat with it I get the error below. I even started a completely new Roo-project, and get this error.

    What do I have to do to fix this?

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.De faultAnnotationHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInt erceptor#0': Cannot create inner bean '(inner bean)' of type [org.springframework.web.servlet.handler.Conversion ServiceExposingInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'applicationConversionService' while setting constructor argument; nested exception is org.springframework.beans.factory.CannotLoadBeanCl assException: Cannot find class [com.myproject.web.ApplicationConversionServiceFact oryBean] for bean with name 'applicationConversionService' defined in ServletContext resource [/WEB-INF/spring/webmvc-config.xml]; nested exception is java.lang.ClassNotFoundException: com.myproject.web.ApplicationConversionServiceFact oryBean
    Related cause: org.springframework.beans.factory.CannotLoadBeanCl assException: Cannot find class [com.myproject.web.ApplicationConversionServiceFact oryBean] for bean with name 'applicationConversionService' defined in ServletContext resource [/WEB-INF/spring/webmvc-config.xml]; nested exception is java.lang.ClassNotFoundException: com.myproject.web.ApplicationConversionServiceFact oryBean
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:527)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 91)
    org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:288 )
    org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:190)
    org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:580)
    org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
    org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
    org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 42)
    org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 58)
    org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:339 )
    org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:306)
    org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:127)
    javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
    org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:298)
    org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:852)
    org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:588)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489)
    java.lang.Thread.run(Thread.java:735)

  • #2
    Roo creates a type called com.myproject.web.ApplicationConversionServiceFact oryBean in your project when you scaffold a MVC UI for a given domain type. This bean is then registered in your webmvc-config.xml file so it participates in the MVC conversion cycle.

    After deleting your domain object from your project it appears you have also deleted the com.myproject.web.ApplicationConversionServiceFact oryBean type which is fine as long as you also remove its definition from webmvc-config.xml.

    HTH,
    Stefan

    Comment


    • #3
      worked perfectly, thanks.

      Comment

      Working...
      X