Results 1 to 5 of 5

Thread: a problem when use spring in expresso.

  1. #1
    Join Date
    Aug 2005
    Posts
    8

    Default 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. #2
    Join Date
    Aug 2005
    Posts
    8

    Default

    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.

  3. #3
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    @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.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  4. #4
    Join Date
    Aug 2005
    Posts
    8

    Default

    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?

  5. #5
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    It's no problem, it's just a warning from ehcache which informs you that it will use the default configuration.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Similar Threads

  1. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  2. Spring 1.2 Resource + Acegi 0.8.2 Jaas problem
    By gmansoor in forum Security
    Replies: 10
    Last Post: Feb 26th, 2007, 02:14 PM
  3. Replies: 0
    Last Post: May 27th, 2005, 09:21 AM
  4. Replies: 2
    Last Post: May 26th, 2005, 02:30 AM
  5. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM

Posting Permissions

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