Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.lang.NoSuchMethodError

0 views
Skip to first unread message

Jim Cobban

unread,
Dec 11, 2002, 11:59:53 PM12/11/02
to
I have the strange situation of getting a java.lang.NoSuchMethodError
exception only some of the time. The documentation of this error states
that it can only occur if the definition of the class has changed since the
invoking class was compiled, but that is definitely not the case here. I
compiled all of my classes at the same time. Moreover the error does not
occur all the time, only when I invoke the program with specific inputs.

The code at Verify1901Xls.java:259 is:

currentRow = new CensusRow(currRowNum);

The exception is:

Exception occurred during event dispatching:
java.lang.NoSuchMethodError
at Census.Verify1901Xls.processRecord(Verify1901Xls.java:259)
at
org.apache.poi.hssf.eventmodel.HSSFRequest.processRecord(HSSFRequest.java:15
7)
at
org.apache.poi.hssf.eventmodel.HSSFEventFactory.processEvents(HSSFEventFacto
ry.java:130)
at Census.Verify1901Xls.verify(Verify1901Xls.java:158)
at
Census.CensusUtility$AddOpenAction.actionPerformed(CensusUtility.java:210)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButto
n.java:1504)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:3
78)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at javax.swing.AbstractButton.doClick(AbstractButton.java:279)
at
javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Basic
MenuItemUI.java:886)
at java.awt.Component.processMouseEvent(Component.java:3715)
at java.awt.Component.processEvent(Component.java:3544)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:914)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:131)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

--
Jim Cobban jco...@magma.ca
34 Palomino Dr.
Kanata, ON, CANADA
K2M 1M1
+1-613-592-9438


Jon Skeet

unread,
Dec 12, 2002, 3:09:15 AM12/12/02
to
jco...@magma.ca wrote:
> I have the strange situation of getting a java.lang.NoSuchMethodError
> exception only some of the time. The documentation of this error states
> that it can only occur if the definition of the class has changed since the
> invoking class was compiled, but that is definitely not the case here. I
> compiled all of my classes at the same time. Moreover the error does not
> occur all the time, only when I invoke the program with specific inputs.

<snip>

Does the same method get called regardless of the inputs?

My guess is that you've got an old copy of the class somewhere on your
classpath. Change your code so that it (the class in question) does
something you can *definitely* identify, and run your program. See if it
does that thing.

--
Jon Skeet
sk...@pobox.com - http://www.pobox.com/~skeet
If replying to the group, please do not mail me at the same time

0 new messages