Announcement Announcement Module
Collapse
No announcement yet.
Help with spring mvc portlet Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with spring mvc portlet

    I am getting the following error in a portlet that I have deployed. What does this mean? I know that the spring-jdbc.jar file is in /WEB-INF/lib.

    Code:
    Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.jdbc.core.simple.SimpleJdbcTe
    mplate]: No default constructor foundnested exception is java.lang.NoSuchMetho
    dException: org.springframework.jdbc.core.simple.SimpleJdbcTemplate.<init>()
         [java]     at org.springframework.beans.factory.support.SimpleInstantiation
    Strategy.instantiate(SimpleInstantiationStrategy.java:58)
         [java]     at org.springframework.beans.factory.support.AbstractAutowireCap
    ableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
         [java]     ... 32 more
         [java] Caused by: java.lang.NoSuchMethodException: org.springframework.jdbc
    .core.simple.SimpleJdbcTemplate.<init>()
         [java]     at java.lang.Class.getConstructor0(Class.java:2678)
         [java]     at java.lang.Class.getDeclaredConstructor(Class.java:1953)
         [java]     at org.springframework.beans.factory.support.SimpleInstantiation
    Strategy.instantiate(SimpleInstantiationStrategy.java:54)
         [java]     ... 33 more
         [java] Sep 10, 2008 11:10:02 AM org.apache.catalina.core.StandardContext st
    art
         [java] SEVERE: Error listenerStart
         [java] Sep 10, 2008 11:10:02 AM org.apache.catalina.core.StandardContext st
    art
         [java] SEVERE: Context [/nah] startup failed due to previous errors

  • #2
    No default constructor foundnested exception is java.lang.NoSuchMethodException: org.springframework.jdbc.core.simple.SimpleJdbcTem plate.<init>()
    It means it is trying to call the default no-arg constructor to create an instance of SimpleJdbcTemplate, but this class doesn't have a no-arg constructor.

    Check your application context for this bean declaration and add the necessary constructor arguments. If you need further help post your application context so we can see what you have declared.

    Comment

    Working...
    X