Announcement Announcement Module
Collapse
No announcement yet.
Aspectj error when importing Hello Worlds sample project Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Aspectj error when importing Hello Worlds sample project

    I have an issue importing the hello worlds sample project (aspectj version).

    I get the following error message right on public class World:
    Code:
    The type org.springframework.data.neo4j.examples.hellograph.World must implement the inherited abstract method org.springframework.data.neo4j.aspects.core.NodeBacked.relateTo(Lorg/springframework/data/neo4j/aspects/core/NodeBacked;Ljava/lang/Class;Ljava/lang/String;Z)
    I tried importing it in a clean Spring Source Tool Suite, but got the error message (tried 2.9.2.RELEASE and 3.0.0.M3).
    I have the same error in my own project and would like to get a hint on how to fix it.

    My system:
    Ubuntu LTS
    Maven 3
    Java 6
    (all apt-get'ed from ubnutu repos)

  • #2
    Chris,

    I haven't tried STS, but give Eclipse or IntelliJ a try and see if you have more luck?

    Lasse

    Comment


    • #3
      Hi,
      I think that problem is in AspectJ 1.7.0. When you change from 1.6.12 to 1.7.0, you can see the same error messages on maven console (mvn clean compile). AspectJ 1.7.0 is used in STS 3.0.0.M3.

      Comment


      • #4
        Thanks for your quick replies. Is this about to be fixed in the upcoming Spring Data Neo4j release?

        Comment


        • #5
          It is not in the immediate backlog, no.

          Comment


          • #6
            Hi,
            same here. I am struggling and stuck in setting up a workable Spring Data Neo4j Aspects-based Eclipse development environment.

            Will be grateful for any hint or direction!

            My environment is:
            Linux (Ubuntu)
            Java 1.7.0_05
            Maven 3.0.4
            STS 2.9.2.RELEASE
            AspectJ 1.7

            What I have tried so far:

            1. I successfully built spring-data-neo4j-examples correctly with maven in console (AspectJ 1.6.12), but unable to build in STS due to errors:
            The type org.neo4j.cineasts.domain.Person must implement the inherited abstract method org.springframework.data.neo4j.aspects.core.NodeBa cked.relateTo(Lorg/springframework/data/neo4j/aspects/core/NodeBacked;Ljava/lang/Class;Ljava/lang/String;Z)
            Building in console against AspectJ 1.7 gives same errors as VladoK correctly pointed out.

            I noted some AspectJ related warnings like:
            advice defined in org.springframework.mock.staticmock.AbstractMethod MockingControl has not been applied [Xlint:adviceDidNotMatch]
            advice defined in org.springframework.mock.staticmock.AnnotationDriv enStaticEntityMockingControl has not been applied
            advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTr anslatorAspect has not been applied [Xlint:adviceDidNotMatch]
            advice defined in org.springframework.scheduling.aspectj.AbstractAsy ncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]

            I feel that these warnings could be somehow related, but being a total newbie with AspectJ I really cannot figure out what to do with them.

            2.Attempted to modify clean STS 2.9.2.RELEASE by replacing preinstalled AspectJ Eclipse plugin with the older one AJDT 2.1.3 in order to enable older AspectJ 1.6.12, but uninstalling plugins is disabled for unknown reason.

            3.Attempted to setup the environment based on clean eclipse-SDK-3.7.2-linux-gtk install, but installing AspectJ 1.6.12 into it failed due to Missing requirement: AspectJ Development Tools Core 2.1.3.e36x-20110622-1300 (org.eclipse.ajdt.core 2.1.3.e36x-20110622-1300) requires 'bundle org.eclipse.core.runtime [3.6.0,3.7.0)' but it could not be found
            Cannot satisfy dependency...

            4. Attempted to setup the environment based on clean eclipse-SDK-3.6.2-linux-gtk, installed AJDT 2.1.3.
            No success - now I am getting 80+ errors of type: can't override java.lang.Iterable org.springframework.data.neo4j.aspects.core.NodeBa cked.findAllPathsByTraversal(org.neo4j.graphdb.tra versal.TraversalDescription) with java.lang.Iterable<org.springframework.data.neo4j. core.EntityPath<S,E>> org.springframework.data.neo4j.aspects.core.NodeBa cked.findAllPathsByTraversal(org.neo4j.graphdb.tra versal.TraversalDescription) return types don't match

            Comment


            • #7
              Wow!

              Noted that STS 2.9.2.RELEASE shows build problem only for org.neo4j.cineasts.domain.Person class, while org.neo4j.cineasts.domain.Movie which is very similar is actually ok. After placing few spaces (!!!) into Person.java and saving the file, the error messages evaporated... It looks there are some mysterious ghosts in STS 2.9.2.RELEASE

              Hope it could help somebody else in the same situation

              Comment


              • #8
                We'll talk to the AspectJ team about what to do about this issue.

                Cheers

                Michael

                Comment


                • #9
                  I've raised AspectJ bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=386888 and am currently having a look at it. AspectJ 1.7 is based on a JDT compiler 4 years newer than the one used in AspectJ 1.6.12 - that is a lot of code changes that 1.7 has picked up. I guess one of them is influencing this scenario.

                  cheers,
                  Andy

                  Comment


                  • #10
                    Also: https://jira.springsource.org/browse/DATAGRAPH-280

                    Comment


                    • #11
                      There are now AspectJ 1.7.1 snapshot builds that address the issues I'm aware of (well, the issues logged in https://bugs.eclipse.org/bugs/show_bug.cgi?id=386888 ). To pick them up you'll need to specify 1.7.1.BUILD-SNAPSHOT in your pom. It will be in AJDT dev builds in a day or two, which will be accessible at this update site:

                      http://download.eclipse.org/tools/ajdt/42/dev/update

                      Andy

                      Comment

                      Working...
                      X