Exception in thread "AWT-EventQueue-0" java.lang.NoSuchFieldError: filesystem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marqueeali
    New Member
    • May 2013
    • 1

    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchFieldError: filesystem

    Code:
    run:
    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchFieldError: filesystem
    	at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:216)
    	at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:157)
    	at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:145)
    	at examples.FileConversions.btnWETransActionPerformed(FileConversions.java:267)
    	at examples.FileConversions.access$100(FileConversions.java:22)
    	at examples.FileConversions$2.actionPerformed(FileConversions.java:79)
    	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    	at java.awt.Component.processMouseEvent(Component.java:6505)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    	at java.awt.Component.processEvent(Component.java:6270)
    	at java.awt.Container.processEvent(Container.java:2229)
    	at java.awt.Component.dispatchEventImpl(Component.java:4861)
    	at java.awt.Container.dispatchEventImpl(Container.java:2287)
    	at java.awt.Component.dispatchEvent(Component.java:4687)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    	at java.awt.Container.dispatchEventImpl(Container.java:2273)
    	at java.awt.Window.dispatchEventImpl(Window.java:2719)
    	at java.awt.Component.dispatchEvent(Component.java:4687)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
    	at java.awt.EventQueue.access$000(EventQueue.java:102)
    	at java.awt.EventQueue$3.run(EventQueue.java:662)
    	at java.awt.EventQueue$3.run(EventQueue.java:660)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    	at java.awt.EventQueue$4.run(EventQueue.java:676)
    	at java.awt.EventQueue$4.run(EventQueue.java:674)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
    	at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
    I am trying to read a doc file in java, but getting the above exception. please can anybody help to resolve above exception?
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #2
    Hi marqueeali and welcome to bytes.com!
    According to the java api doc, this means that the field "filesystem " doesn't exist. To solve the problem, the lines
    Code:
        at examples.FileConversions.btnWETransActionPerformed(FileConversions.java:267)
        at examples.FileConversions.access$100(FileConversions.java:22)
        at examples.FileConversions$2.actionPerformed(FileConversions.java:79)
    of that error message seem most promissing. What does your code look like there?
    Last edited by Nepomuk; May 29 '13, 06:04 AM. Reason: Typo

    Comment

    • Oralloy
      Recognized Expert Contributor
      • Jun 2010
      • 988

      #3
      marqueeali,

      FIRST THING:
      Look up the exception/error that caused failure, which is java.lang.NoSuc hFieldError, which reads as follows:
      Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.
      Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
      Which indicates to me that your program unloaded a class and re-loaded it with a different one for some reason.

      I do not believe that is your root cause. The "smell" is not right.

      Let us follow the stack trace a little farther...

      SECONDLY:
      Go up one group of frames and see what class might be the problem child, in this case org.apache.poi. hwpf.HWPFDocume nt.

      Since I don't expect that you wrote the HWPFDocument class, let's table this for the moment, and look a little higher in the call stack.

      THIRD:
      We see three frames in one class file, FileConversions .java:
      1. examples.FileCo nversions.btnWE TransActionPerf ormed(FileConve rsions.java:267 )
      2. examples.FileCo nversions.acces s$100(FileConve rsions.java:22)
      3. examples.FileCo nversions$2.act ionPerformed(Fi leConversions.j ava:79)

      Given the non-standard name of the package, and the anonymous inner class (examples.FileC onversions$2), I would suspect that this is the code which is having issues.

      You might try looking at the three lines referenced (79, 22, and 267) and their surrounding code for an error on your part.

      Also, look for the word "filesystem", as that is listed as the cause of failure in the origional error.

      I am not sure I can help you any further than that, given the information you've got here.

      Good Luck!
      Oralloy

      Comment

      Working...