Announcement Announcement Module
Collapse
No announcement yet.
java.lang.NoSuchMethodError Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.NoSuchMethodError

    Hello everyone:

    I was trying to set up the Spring framework to use the JDBC Dao support in a web application. I did the following:

    a) Added a <context-param> element to web.xml in my webapp with name "contextConfigLocation" and value "/WEB-INF/AcronetApplicationContext.xml". I put the application context file (obviously) under the "WEB-INF" folder of the web application.

    b) Added the following element (after the <listener> elements)

    <servlet>
    <servlet-name>context</servlet-name>
    <servlet-class>org.springframework.web.context.ContextLoade rServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>

    c) I deployed the web application to the WebLogic Server 6.1. When deployment finishes it throws the following exception:



    <8/12/2004 07:09:00 PM PST> <Notice> <Management> <Application Poller not started for production server.>
    log4j:WARN No appenders could be found for logger (org.springframework.web.conte
    xt.ContextLoader).
    log4j:WARN Please initialize the log4j system properly.
    <8/12/2004 07:09:02 PM PST> <Error> <HTTP> <[WebAppServletContext(-14348849,acro
    net,/acronet)] Error loading servlet: 'context'
    java.lang.NoSuchMethodError: org.springframework.core.io.AbstractResource: metho
    d getDescription()Ljava/lang/String; not found
    at java.lang.String.valueOf(String.java:1947)
    at java.lang.StringBuffer.append(StringBuffer.java:37 0)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBea
    nDefinitions(XmlBeanDefinitionReader.java:117)

    at org.springframework.context.support.AbstractXmlApp licationContext.loa
    dBeanDefinitions(AbstractXmlApplicationContext.jav a:144)
    at org.springframework.context.support.AbstractXmlApp licationContext.ref
    reshBeanFactory(AbstractXmlApplicationContext.java :79)
    at org.springframework.context.support.AbstractApplic ationContext.refres
    h(AbstractApplicationContext.java:249)
    at org.springframework.web.context.support.XmlWebAppl icationContext.refr
    esh(XmlWebApplicationContext.java:131)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationCon
    text(ContextLoader.java:167)
    at org.springframework.web.context.ContextLoader.init WebApplicationConte
    xt(ContextLoader.java:101)
    at org.springframework.web.context.ContextLoaderServl et.init(ContextLoad
    erServlet.java:80)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:258)
    at weblogic.servlet.internal.ServletStubImpl.createSe rvlet(ServletStubIm
    pl.java:731)
    at weblogic.servlet.internal.ServletStubImpl.createIn stances(ServletStub
    Impl.java:658)
    at weblogic.servlet.internal.ServletStubImpl.prepareS ervlet(ServletStubI
    mpl.java:603)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlet(WebAppS
    ervletContext.java:2360)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlets(WebApp
    ServletContext.java:2301)
    at weblogic.servlet.internal.HttpServer.preloadServle ts(HttpServer.java:
    558)
    at weblogic.servlet.internal.WebService.preloadServle ts(WebService.java:
    450)
    at weblogic.t3.srvr.ServletInitRunner.run(ServletInit Runner.java:49)
    at java.lang.Thread.run(Thread.java:484)
    >
    <8/12/2004 07:09:02 PM PST> <Error> <HTTP> <[WebAppServletContext(-14348849,acro
    net,/acronet)] Error loading servlet: "context"
    java.lang.NoSuchMethodError: org.springframework.core.io.AbstractResource: metho
    d getDescription()Ljava/lang/String; not found
    at java.lang.String.valueOf(String.java:1947)
    at java.lang.StringBuffer.append(StringBuffer.java:37 0)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBea
    nDefinitions(XmlBeanDefinitionReader.java:117)
    at org.springframework.context.support.AbstractXmlApp licationContext.loa
    dBeanDefinitions(AbstractXmlApplicationContext.jav a:144)
    at org.springframework.context.support.AbstractXmlApp licationContext.ref
    reshBeanFactory(AbstractXmlApplicationContext.java :79)
    at org.springframework.context.support.AbstractApplic ationContext.refres
    h(AbstractApplicationContext.java:249)
    at org.springframework.web.context.support.XmlWebAppl icationContext.refr
    esh(XmlWebApplicationContext.java:131)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationCon
    text(ContextLoader.java:167)
    at org.springframework.web.context.ContextLoader.init WebApplicationConte
    xt(ContextLoader.java:101)
    at org.springframework.web.context.ContextLoaderServl et.init(ContextLoad
    erServlet.java:80)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:258)
    at weblogic.servlet.internal.ServletStubImpl.createSe rvlet(ServletStubIm
    pl.java:731)
    at weblogic.servlet.internal.ServletStubImpl.createIn stances(ServletStub
    Impl.java:658)
    at weblogic.servlet.internal.ServletStubImpl.prepareS ervlet(ServletStubI
    mpl.java:603)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlet(WebAppS
    ervletContext.java:2360)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlets(WebApp
    ServletContext.java:2301)
    at weblogic.servlet.internal.HttpServer.preloadServle ts(HttpServer.java:
    558)
    at weblogic.servlet.internal.WebService.preloadServle ts(WebService.java:
    450)
    at weblogic.t3.srvr.ServletInitRunner.run(ServletInit Runner.java:49)
    at java.lang.Thread.run(Thread.java:484)
    >
    javax.servlet.ServletException: Servlet class: 'org.springframework.web.context.
    ContextLoaderServlet' could not be handled by the ClassLoader
    at weblogic.servlet.internal.ServletStubImpl.prepareS ervlet(ServletStubI
    mpl.java:637)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlet(WebAppS
    ervletContext.java:2360)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlets(WebApp
    ServletContext.java:2301)
    at weblogic.servlet.internal.HttpServer.preloadServle ts(HttpServer.java:
    558)
    at weblogic.servlet.internal.WebService.preloadServle ts(WebService.java:
    450)
    at weblogic.t3.srvr.ServletInitRunner.run(ServletInit Runner.java:49)
    at java.lang.Thread.run(Thread.java:484)


    What could be happening?

    Thanks in advance,

    Carlos Morales

  • #2
    Carlos,

    There is a small bug in Spring 1.1.2 that requires JDK 1.4 for some core features. These will be fixed in 1.1.3 which will be released any day now.

    Rob

    Comment

    Working...
    X