Announcement Announcement Module
Collapse
No announcement yet.
a problem when use spring in expresso. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • a problem when use spring in expresso.

    first, i am a new programmer to spring and expresso.
    then i got a job to develop a management task, using the expresso framework, and make it just spring + hibernate.

    now i was told to add this part in the expresso' WEB-INF ' web.xml

    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>

    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>

    it worked before, but then someone ask me to develop the project using hibernate3. after i replace all the .jar files, and edited the applicationContext.xml, finally ran the tomcat, and the error is,

    [@APPNAME@] ERROR [main] ContextLoader.initWebApplicationContext(182) | Context initialization failed
    java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.forName(Ljava/lang/String;Ljava/lang/ClassLoaderLjava/lang/Class;
    ......

    what's my problem. my manager said it's the lib. 's problem, hoping someone could give me a hand.

  • #2
    if i delete the part below,

    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>

    it would not run spring at all.
    and the method org.springframework.util.ClassUtils.forName do exist.
    int the spring.jar. i had checked it many times.

    Comment


    • #3
      @APPNAME@] ERROR [main] ContextLoader.initWebApplicationContext(182) | Context initialization failed
      java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.forName(Ljava/lang/String;Ljava/lang/ClassLoaderLjava/lang/Class;
      You have an older version of Spring in your classpath - make sure you have only one jar and that one is young enough to support HB3. Check the container shared lib dir as well as your app WEB-INF/lib.

      Comment


      • #4
        i checked my lib document, but there are too much jars ao i can not decide which to be delete, then i delete some jars, and come up which the others, finally, i got a report of the below:
        [@APPNAME@] WARN [main] Configurator.configure(126) | No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/E:/ipis/works/tasks/4th_task/ktv/webapps/ROOT/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml

        how's this problem?

        Comment


        • #5
          It's no problem, it's just a warning from ehcache which informs you that it will use the default configuration.

          Comment

          Working...
          X