0

I'm developing a java application that uses a range a parallel projects. In one of the projects I have a class that is the implementation of an interface. A problem I'm having though is that this class seems to be represented in two ways, both as a class in the build path and as a class outside the build path.

In Eclipse I can have the class open as a tab with both "path-versions", one with a "filled in J" and one with a "hollow J". This isn't a problem for me, I don't care about that, the thing is though that the compiler always seem to run the class as the "not-being-part-of-the-build-path"-version. When I debug the debugger always ends up in the class outside the build path. This causes errors and the application crashes.

I have no idea how I should solve it. In my understanding this shouldn't even be a problem, the compiler should always run classes inside the build path, right..?

Does anyone have any idea of what the problem might be?

Here's the stack trace, though I don't think it will be of much use... =\

Caused by: java.lang.NullPointerException: null
    at com.smarttrust.m2m.core.services.inventory.InventoryServiceImpl.getNetworks(InventoryServiceImpl.java:244) ~[m2m-core-services-1.0.0-A-SNAPSHOT.jar:1.0.0-A-SNAPSHOT]
    at com.smarttrust.m2m.ui.admin.inventory.InventoryAssignSubscription.populateDropdown(InventoryAssignSubscription.java:211) ~[classes/:na]
    at com.smarttrust.m2m.ui.admin.inventory.InventoryAssignSubscription.init(InventoryAssignSubscription.java:115) ~[classes/:na]
    at com.smarttrust.m2m.ui.admin.inventory.InventorySimCardTable$ActionColumnGenerator$1.buttonClick(InventorySimCardTable.java:352) ~[classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_26]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_26]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_26]
    at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_26]
    at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490) ~[vaadin-6.6.3.jar:6.6.3]
    ... 23 common frames omitted
AndroidHustle
  • 1,794
  • 5
  • 24
  • 47
  • 1
    This kind of problem can happen if you use the Eclipse Maven plugin (m2e/m2eclipse) and a project POM depends on a version of the project that contains the problematic class that's different from the version you have in Eclipse – Nicola Musatti Oct 07 '11 at 14:33
  • @NicolaMusatti You're probably right about that... My problem is that my main task with the project is developing the GUI for the application and the very high layered front-end parts. When it comes to problems like this that's happen at the very core of the project I'm at a loss... I'll probably have to wait till the next week to try and get a hold of someone else in my project group who can help me with it.. =\ Thanks anyway Nicola. =) – AndroidHustle Oct 07 '11 at 14:39

1 Answers1

0

Go to project build path, in Order and Export tab. you see all source codes which is related to your project, You should move up the class that is right (as you say the one which is in build path)

Shahryar
  • 1,454
  • 2
  • 15
  • 32