Results 1 to 3 of 3

Thread: java/spring- getting NoClassDefFoundError at org.springfw..k.context.support.Abs....

Hybrid View

  1. #1

    Post java/spring- getting NoClassDefFoundError at org.springfw..k.context.support.Abs....

    Hello,

    I am trying to initialise an RMI client for which I have used Spring.

    Now, the application's RMI context is stored in file= rmiClientAppContext.xml

    The relevant code for using the above file is given below--

    //RMI Client Application Context is started...
    ApplicationContext context = new ClassPathXmlApplicationContext("rmiClientAppContex t.xml");


    However, when I try and run the program, this is the error I am getting--

    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    at org.springframework.context.support.AbstractApplic ationContext.<init>(AbstractApplicationContext.jav a:164)
    at org.springframework.context.support.AbstractRefres hableApplicationContext.<init>(AbstractRefreshable ApplicationContext.java:90)
    at org.springframework.context.support.AbstractRefres hableConfigApplicationContext.<init>(AbstractRefre shableConfigApplicationContext.java:59)
    at org.springframework.context.support.AbstractXmlApp licationContext.<init>(AbstractXmlApplicationConte xt.java:61)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:136)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)

    On further investigation of the first line of error message above, I found that

    "164 is not a valid line number in org.springframework.context.support.AbstractApplic ationContext"

    What have i done wrong here? I am using Spring v3.1.3
    How do I resolve the above error? Also, exactly which JARs do I have to include for the RMI client? And is there any specific order in which those JARs should be added to Java build path in Eclipse?


    Thanks,
    Arvind.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    Please use [ code][/code ] tags when posting code/xml/stacktraces that way it remains readable...

    I suggest a read of the stack trace you are missing the commons-logging jar that is the only required dependency for Spring (or if you use SLF4J the jcl-over-slf4j jar).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    Hi Marten,

    You were absolutely right.. I was missing commons-logging jar.

    Thanks,
    Arvind.

Tags for this Thread

Posting Permissions

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