Java Problems, Causes and Solutions

Skip to end of metadata
Go to start of metadata

Errors that should have been closed or unexplained errors

Problem

  • Errors that should have been closed or unexplained errors.

Cause

  • There are 'left over' jars.

Solution

  • Run a maven clean or just delete the old jars manually.

Access restriction: The type GetLongAction is not accessible...

Problem

  • Error in Eclipse:

Cause

  • Use of a restricted API in rt.jar.

Solution

  • Change Eclipse to report warning rather then an error.
  • Goto Window > Preference > Java > Compiler > Errors/Warnings and under Deprecated and restricted API, change the Forbidden reference to Warning.

Class not found ca.gordonturner.SomeTest

Problem

  • Exception when running a smoketest in Eclipse:

Cause

  • You probably just ran a maven clean right?

Solution

  • In Eclipse run Project > Clean. This will cause Eclipse to rebuild the project.

java.lang.NumberFormatException: null

Problem

  • Exception running a smoketest in Eclipse.

Cause 1

  • Missing "VM Arguments" in the JUnit Run tab.

Solution 1

  • Add parameters ti JUnit Run tab:

Cause 2

  • Missing database.properties on classpath.

Solution 2

  • Run the test:compile goals:
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.