Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Aspectj error when importing Hello Worlds sample project

  1. #1
    Join Date
    Jul 2012
    Posts
    6

    Default 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. #2
    Join Date
    May 2012
    Posts
    107

    Default

    Chris,

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

    Lasse

  3. #3
    Join Date
    Feb 2012
    Posts
    9

    Default

    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.

  4. #4
    Join Date
    Jul 2012
    Posts
    6

    Default

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

  5. #5
    Join Date
    May 2012
    Posts
    107

    Default

    It is not in the immediate backlog, no.

  6. #6
    Join Date
    Jul 2012
    Posts
    18

    Default

    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

  7. #7
    Join Date
    Jul 2012
    Posts
    18

    Default

    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

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

    Default

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

    Cheers

    Michael

  9. #9
    Join Date
    May 2009
    Location
    Vancouver
    Posts
    274

    Default

    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

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

Posting Permissions

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