By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,806 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,806 IT Pros & Developers. It's quick & easy.

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

P: 1
Expand|Select|Wrap|Line Numbers
  1. run:
  2. Exception in thread "AWT-EventQueue-0" java.lang.NoSuchFieldError: filesystem
  3.     at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:216)
  4.     at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:157)
  5.     at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:145)
  6.     at examples.FileConversions.btnWETransActionPerformed(FileConversions.java:267)
  7.     at examples.FileConversions.access$100(FileConversions.java:22)
  8.     at examples.FileConversions$2.actionPerformed(FileConversions.java:79)
  9.     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
  10.     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
  11.     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
  12.     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
  13.     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
  14.     at java.awt.Component.processMouseEvent(Component.java:6505)
  15.     at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
  16.     at java.awt.Component.processEvent(Component.java:6270)
  17.     at java.awt.Container.processEvent(Container.java:2229)
  18.     at java.awt.Component.dispatchEventImpl(Component.java:4861)
  19.     at java.awt.Container.dispatchEventImpl(Container.java:2287)
  20.     at java.awt.Component.dispatchEvent(Component.java:4687)
  21.     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
  22.     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
  23.     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
  24.     at java.awt.Container.dispatchEventImpl(Container.java:2273)
  25.     at java.awt.Window.dispatchEventImpl(Window.java:2719)
  26.     at java.awt.Component.dispatchEvent(Component.java:4687)
  27.     at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
  28.     at java.awt.EventQueue.access$000(EventQueue.java:102)
  29.     at java.awt.EventQueue$3.run(EventQueue.java:662)
  30.     at java.awt.EventQueue$3.run(EventQueue.java:660)
  31.     at java.security.AccessController.doPrivileged(Native Method)
  32.     at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
  33.     at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
  34.     at java.awt.EventQueue$4.run(EventQueue.java:676)
  35.     at java.awt.EventQueue$4.run(EventQueue.java:674)
  36.     at java.security.AccessController.doPrivileged(Native Method)
  37.     at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
  38.     at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
  39.     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
  40.     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
  41.     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
  42.     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
  43.     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
  44.     at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
  45.  
I am trying to read a doc file in java, but getting the above exception. please can anybody help to resolve above exception?
May 29 '13 #1
Share this Question
Share on Google+
2 Replies


Nepomuk
Expert 2.5K+
P: 3,112
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
Expand|Select|Wrap|Line Numbers
  1.     at examples.FileConversions.btnWETransActionPerformed(FileConversions.java:267)
  2.     at examples.FileConversions.access$100(FileConversions.java:22)
  3.     at examples.FileConversions$2.actionPerformed(FileConversions.java:79)
of that error message seem most promissing. What does your code look like there?
May 29 '13 #2

Oralloy
Expert 100+
P: 983
marqueeali,

FIRST THING:
Look up the exception/error that caused failure, which is java.lang.NoSuchFieldError, 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.HWPFDocument.

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.FileConversions.btnWETransActionPerformed (FileConversions.java:267)
  2. examples.FileConversions.access$100(FileConversion s.java:22)
  3. examples.FileConversions$2.actionPerformed(FileCon versions.java:79)
Given the non-standard name of the package, and the anonymous inner class (examples.FileConversions$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
May 29 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.