Announcement Announcement Module
Collapse
No announcement yet.
Help on view Resolver Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help on view Resolver

    I am using the resourceBundle View resolver and pass a view name "underconstruction" to the MOdelAndView.

    I had the view property defined and I saw the entries load into the hashmap etc. but I got and bean creation error as the stack shown here.

    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'underconstruction' defined in null: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: Bean definition does not carry a resolved bean class
    java.lang.IllegalStateException: Bean definition does not carry a resolved bean class
    	at org.springframework.beans.factory.support.AbstractBeanDefinition.getBeanClass(AbstractBeanDefinition.java:192)
    	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:48)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:254)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:223)
    	at org.springframework.web.servlet.view.ResourceBundleViewResolver.loadView(ResourceBundleViewResolver.java:124)
    	at org.springframework.web.servlet.view.AbstractCachingViewResolver.loadAndConfigureView(AbstractCachingViewResolver.java:121)
    	at org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:78)
    	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:663)
    why they try to find a bean defintion for "underconstruction" here? should I create a bean defintion in the servlet.xml for the viewName. I would assume this is a lof of redundance.

    another question is that it uses "underconstruction"+locale as the cachekey to get the entry, if it is not found, I did see it using the "underconstruction" only to check, I was thinking that this must be the standard resource loading way, if you cannot find from a locale, then using the default, is this not implemented here?

    I can put the detail of servlet.xml, view properties etc here if you need.

    thanks alot.

    jfd

  • #2
    please post your xml configuration. It is probably a misconfiguration in the view resolving.

    Olivier

    Comment


    • #3
      Just figured out, the default parent for views is not setup right.

      thanks.

      jfd

      Comment

      Working...
      X