• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Problem in one Spring2.0.7 web application...

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am trying to creating a small sample dynamic web application using spring 2.0.7 and weblogic 9.1 server in eclipse 3.3(eclipse europa).

But i am getting the following error:

java.lang.NoClassDefFoundError: org/springframework/beans/factory/xml/XmlBeanFactory
at com.netapp.smart.SpringServlet.doPost(SpringServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)

===============================

This error is occuring in the 60th line of the doPost method of my "SpringServlet" servlet:

that line is:
BeanFactory factory = new XmlBeanFactory(new ClassPathResource("DataCon.xml"));

DataCon.xml is my Spring configuration file.
Could you please tell me, why this error is coming.
and Please tell me the exact location of the DataCon.xml file, where should i put this spring configuration file. Currently this file is at the following location:
"Project Folder"\build\classes\DataCon.xml

Please help me. This is my first post.
Thanks in advance:

============
Rajkumar,
rajkumar_brijwasi2000@yahoo.com
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
your error has nothing to do with the location of the file, it the class. java.lang.NoClassDefFoundError: org/springframework/beans/factory/xml/XmlBeanFactory means that it cannot find the class XmlBeanFactory that is located in the package org.springframework.beans.factory.xml, Make sure you have spring.jar file in your classpath when you deploy the application - that class is in that jar file.
 
If you are using a wood chipper, you are doing it wrong. Even on this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic