Author Topic: Question about NoSuchMethodError  (Read 7777 times)

0 Members and 2 Guests are viewing this topic.

Offline Shinigami345

  • /dev/null
  • *
  • Posts: 15
  • Cookies: -1
    • View Profile
Question about NoSuchMethodError
« on: February 23, 2013, 04:39:52 am »
http://pastebin.com/index/JQqpB82F When I run the specchecker I get this weird error
PROBLEM:
java.lang.NoSuchMethodError: org.junit.Assert.assertEquals(Ljava/lang/String;JJ)V like 40 times.

I mean real it's taking off like 90% of my points on the homework. I need to turn this in in about 2-3 hours the pastebin includes the spec for the code that i'm supposed to write a link to the spec checker and my source code. I'm pretty sure my if statements are weird and I know my code is uglay but I'm lazy and it's just checked by a computer so I don't have to write pretty code.

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Question about NoSuchMethodError
« Reply #1 on: February 23, 2013, 07:08:53 am »
The missing assertion method seems to be a problem of the specchecker. Maybe the JUnit library is missing.

Edit: I ran it and it says

Quote
java -jar speccheck_pre1.jar
1. RUNNING TESTS
Did you add JUnit to your project?

So did you add it to your project?
« Last Edit: February 23, 2013, 07:18:20 am by Deque »

Offline Shinigami345

  • /dev/null
  • *
  • Posts: 15
  • Cookies: -1
    • View Profile
Re: Question about NoSuchMethodError
« Reply #2 on: February 23, 2013, 03:14:09 pm »
I have a tab or whatever for JUnit 4. Under that it has another one for Referenced Libraries and the specchecker is in that. I thought I sat it up how they told me to.

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Question about NoSuchMethodError
« Reply #3 on: February 25, 2013, 06:31:26 am »
If it is not the library that is missing, it is the code of the specchecker. Talk to your instructor.