Results 1 to 2 of 2

Thread: Help with spring mvc portlet

  1. #1
    Join Date
    Aug 2008
    Posts
    15

    Default 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. #2
    Join Date
    Oct 2006
    Posts
    228

    Default

    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.

Posting Permissions

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