Results 1 to 6 of 6
  1. #1
    debu37 is offline Member
    Join Date
    Sep 2008
    Posts
    4
    Rep Power
    0

    Default java.lang.NoClassDefFoundError in Eclipse at runtime

    Hi All,
    I am relatively new to Java.
    I am running this program in Eclipse 3.2.
    I am calling a method executeOperation() in ExtractBomOperation class by instantiating its object from ExtractBomDialog class and then calling that method. However at executeOperation() at the line
    "wb = new HSSFWorkbook();" I am getting a run time error that in Eclipse console shows as : "java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook" . I have already included poi.jar file in Eclipse.
    I am sending the ExtractBomDialog and ExtractBomOperation class codes in this attachment.

    Not sure why I am getting the error.Any help would be great.
    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2008
    Location
    Saint-Petersburg, Russia
    Posts
    66
    Rep Power
    0

    Default

    How do you run your app ? As "Java application"or using server ?

  3. #3
    debu37 is offline Member
    Join Date
    Sep 2008
    Posts
    4
    Rep Power
    0

    Default

    As a java application

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,544
    Rep Power
    23

    Default

    org/apache/poi/hssf/usermodel/HSSFWorkbook
    Do you know which jar file the above class is defined in?
    Is that jarfile on the classpath?

  5. #5
    debu37 is offline Member
    Join Date
    Sep 2008
    Posts
    4
    Rep Power
    0

    Default

    The above class is defined in poi.jar.
    I added that jar by going to Project(Right CLick)--->Properties--->Java Build Path--->Libraries--->Add External Jars.

    Is there anything else I need to do?
    How do I check that the jarfile is on classpath in ECLIPSE ?

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,544
    Rep Power
    23

    Default

    Ask an eclipse user. There is a separate eclipse Forum here.

Similar Threads

  1. java.lang.NoClassDefFoundError
    By noobie in forum Java Applets
    Replies: 5
    Last Post: 04-22-2009, 02:35 AM
  2. java.lang.NoClassDefFoundError: com.ibm.ws.orb.GlobalORBFactory
    By hawkeye in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 06-16-2008, 10:56 AM
  3. java.lang.NoClassDefFoundError
    By bizmut in forum Eclipse
    Replies: 3
    Last Post: 06-15-2008, 12:54 AM
  4. java.lang.NoClassDefFoundError
    By J_a_y in forum New To Java
    Replies: 2
    Last Post: 08-07-2007, 11:51 AM
  5. java.lang.NoClassDefFoundError
    By fred in forum Advanced Java
    Replies: 3
    Last Post: 08-01-2007, 05:00 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
  •