Home arrow static arrow Java Programming [Archive] - NoSuchMethodError
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - NoSuchMethodError
This topic has 3 replies on 1 page.

Registered: 6/22/04
Aug 2, 2004 1:59 AM

I am getting the following message:

java.lang.NoSuchMethodError: Move.<init>(LPosition;)V
at PartialMove.convertPartialToFullMove(PartialMove.java:250)
at MoveGenerator.buildMoveList(MoveGenerator.java:117)

Even though at line 250 I have :
   Move m = new Move(dp);

and the move constructor is :
 public Move(DraughtsPosition pos)   {      moveList = new Vector();      num =0;      p = pos;               } 

any suggestions on how to fix this error??
any help would be most appreciated

Registered: 8/8/01
Re: NoSuchMethodError  
Aug 2, 2004 2:08 AM (reply 1 of 3)

- just delete all compiled classes (clean all)
- recompile all

It looks like, there are old classfiles, with an other type of constructor

Registered: 11/8/00
Re: NoSuchMethodError  
Aug 2, 2004 2:10 AM (reply 2 of 3)

from the extracts you posted it appears that you are passing an object of type LPosition to the Move constructor but it requires and object of type DraughtsPosition.

So unless DraughtsPosition is a subtype of LPosition or it implememts it then your passing the wrong object.

Registered: 6/22/04
Re: NoSuchMethodError  
Aug 2, 2004 2:23 AM (reply 3 of 3)

thanks guys, thats things sorted :-)
This topic has 3 replies on 1 page.