Search code examples
eclipseaspectjspring-dataajdtspring-data-graph

Spring Data Graph and Eclipse


Spent 2 days trying to understand how to enable Eclipse work with Spring Data Graph, have no idea yet. The code is like this:

@NodeEntity
public class Person {   
    public Person() {           
    }
}
...
public class App {
    public static void main(String[] args) {
        Person p = new Person().persist();
    }
}

This code is absolutely fine, when I build it with Maven. When I open the project in Eclipse, it says that there's no method persist() in class Person.

I'm using Eclipse 3.7 (on Ubuntu 11.04), Spring 3.0.6.BUILD-SNAPSHOT, AspectJ 1.6.12.BUILD-SNAPSHOT, Spring Data Graph 1.2.0.BUILD-SNAPSHOT. I also have AJDT 2.2.0.e37x-20110815-2000 installed.

My Eclipse project is AspectJ-enabled (I have AJ on project's icon).

I'm wondering if anyone could tell me what are the exact versions of all these tools I need to install in order to get rid of errors in Eclipse.

Please, comment if these details are not enough.

Update:

Also posted this question to official Spring Data Graph forums:

http://forum.springsource.org/showthread.php?113629-Using-Spring-Data-Graph-in-real

no feedback so far.


Solution

  • It is used in real projects, no worries.

    The problem you've encountered with the tooling is a sad part of the story. We didn't anticipate that many issues with AJ in eclipse with the AJDT plugin developed by the AspectJ guys.

    There is a second thread in the forum and a JIRA issue, in which the AJDT project lead concluded the following:

    • Make sure the Project Properties -> AspectJ -> Aspect Paths are set correctly
    • Make sure Window->Preferences->JDT Weaving in turned ON.
    • The build path "*/.aj" is NOT needed - I dont have it and it works fine.
    • A project build is required each time eclipse starts