Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Spring Data Graph + Eclipse + AJDT : Editor errors

  1. #11

    Default

    Sorry, i cant really say why the errors re-appear. What you can try is to find out if any eclipse artifacts change (.project, .classpath, .settings). For example create a git repository in your project and after each change do a commit. That way you can see all deltas, if there are any.
    Last edited by StefanOllinger; Sep 19th, 2011 at 04:21 PM.

  2. #12
    Join Date
    Nov 2010
    Location
    San Diego, CA
    Posts
    16

    Default

    is there a recommended way to develope SDG applications with an IDE? I am also having all sorts of errors, using both STS 2.7.2 and STS 2.8.0.M2.

    In either case, I have to make my @NodeEntity class implement NodeBacked, else the repository complains. If I do this, my @NodeEntity class complains that I'm not implementing required methods. Project is setup as a Maven & AspectJ project in STS.

    I'd really like to use SDG & Neo, but these tooling errors are a real time waster. How are people using this project right now? Are you foregoing code completion etc & building using a text editor?

  3. #13
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    How did you set up the maven project? As you can see in some of the previous posts. maven eclipse:eclipse forgets to add the aspectj-files/paths to the build-path so it can't find the actual aspects.

    When I opened existing sample applications with m2eclipse I didn't run into issues. But I'll re-check.

    Thanks for the feedback

    Michael

  4. #14
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    I just checked it with STS 2.7.1, 2.7.2 and 2.8.0.M2 using Import -> Maven -> Existing Maven Maven Project and imported the SDG HelloWorld project, there were no editor errors at all.

    Please make sure that Project Properties -> AspectJ Build -> Aspect Path should contain two entries, first spring-aspects from the springframework and the spring-data-neo4j jars.

    sdg_helloworld_aj_path.jpgsdg_helloworld_aj_path.jpg

  5. #15
    Join Date
    Nov 2010
    Location
    San Diego, CA
    Posts
    16

    Default

    The project was created from scratch in STS using New > Maven Project. I then added the various SDG dependencies, and copy & pasted in the maven-aspectj-plugin configuration section. I've checked the Aspect Path & the 2 JARs are there.

    I should note that things seem to have sort resolved themselves, though I'm not quite sure why. To try verify the issue, I imported all the sample projects using Import > Existing Maven Projects. And, yes, they seemed to import fine & show no errors. After that, my project also showed no errors, though this is probably a co-incidence: I had restarted the IDE inbetween to install some updates. Note those updates weren't AJDT or anything like that. I later removed JDK 1.7 and JDK 1.5 JREs out of baseless suspicion, but I think it was working already before that.

    Now my project looks good in the IDE, and I can compile it with a Maven Build run configuration, as long as I specify goals: clean aspectj:compile install (i.e. need to explicitly call aspectj:compile before compile, package or install). By the way, the advice to "add **/*.aj file to build path" is not really relevant to a general project. I read the JIRA issue, and it was a response based on an assumption that someone was having trouble building the Spring Data Graph project itself. I don't see an *.aj files in my project at all, and I assume that any aspects in SDG or core Spring are made available by having the JARs on the Aspect Path.

    I'll try go back to a completely empty workspace & start a completely new Maven project to see if I can recreate the problems. One thing about the sample apps I noticed is they depend on 1.0.0 release of SDG. Again, haven't had time to see if that makes a difference (i'm using 1.1.0 release).

    Thanks for your help, I'll get back to you if I can recreate the issue in a sandbox setup.

  6. #16
    Join Date
    Jun 2011
    Posts
    14

    Default

    Still the same problem : I used a fresh installation of Eclipse 3.7 with STS 2.7.2 & m2e 1.0.100 and imported cineasts in its latest 1.1 release. The project runs OK on cmd line maven.
    I ve added the Aspect Path libraries. The maven on the command line (mvn clean test) works Ok, but it gives WARNINGs like :

    Code:
    advice defined in org.springframework.data.neo4j.support.relationship.Neo4jRelationshipBacking has not been applied [Xlint:adviceDidNotMatch]
    
    advice defined in org.springframework.data.neo4j.support.node.Neo4jNodeBacking has not been applied [Xlint:adviceDidNotMatch]
    When I build within Eclipse I get similar warnings.

    Also I noticed that sometimes, the Eclipse Package/Project Explorer show files as being OK (no red x on them), but once you go in them and on the offending @ annotations the errors are there.

  7. #17
    Join Date
    May 2009
    Location
    Vancouver
    Posts
    274

    Default

    I've put some more comments on the bug report as we try to investigate further. I still can't get things to fail for me inside eclipse and without that I can't debug it. The myrestaurants-social project seems to contain more weirdness than the cineasts project as its .project contains ajbuilder twice (even after an mvn eclipse:eclipse) indicating the pom isn't quite right, I think. But the cineasts one looks fine, just won't fail for me.

    If we could get a simple set of reliable steps that show a failure in the IDE, we can properly investigate it.

    Andy

  8. #18
    Join Date
    Dec 2011
    Posts
    10

    Default

    Quote Originally Posted by MichaelHunger View Post
    I just checked it with STS 2.7.1, 2.7.2 and 2.8.0.M2 using Import -> Maven -> Existing Maven Maven Project and imported the SDG HelloWorld project, there were no editor errors at all.

    Please make sure that Project Properties -> AspectJ Build -> Aspect Path should contain two entries, first spring-aspects from the springframework and the spring-data-neo4j jars.

    sdg_helloworld_aj_path.jpgsdg_helloworld_aj_path.jpg
    Thanks for this I was about to get crazy

  9. #19
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    It's also part of the docs and the DeveloperNotes
    Last edited by MichaelHunger; Dec 15th, 2011 at 04:06 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •