There are two classes, the first class creates an instance of the second class. It looks like this, first class:

Inv inv; String[] tLine = line.split(";"); inv = new Inv(); inv.setDebet(tLine[7]); inv.setCredit(tLine[10]); 

Actually the second class to the contrary is simple:

 public class Inv { String mDebet; String mCredit; String mOperator; String mReestr; String mDate; String mCur; int mSumma; String mPurpose; public Inv() { // TODO Auto-generated constructor stub } public String getDebet() { return mDebet; } public void setDebet(String debet) { mDebet = debet; } public String getCredit() { return mCredit; } public void setCredit(String credit) { mCredit = credit; } } 

It compiles without problems, but when it executes, NoSuchMethodError scolds. Actually what am I doing wrong?

  • Is this all code? In which specific line does the exception occur? - iksuy
  • here this line - inv.setDebet (tLine [7]); - if you comment it on the next one. if you remove tLine and insert just a line with exactly the same error - plesser

1 answer 1

My mistake. I did not see that in the external library there is a class Inv.