Announcement Announcement Module
Collapse
No announcement yet.
Error: Neo4j cross-store entities will not build Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error: Neo4j cross-store entities will not build

    Please help. This is driving me crazy
    When I try to "mvn clean package" on my project I get the following. Error.

    Code:
    [INFO] [aspectj:compile {execution: default}]
    [ERROR] trouble in:
    public class com.kt.model.Bookmark_Roo_Jpa_Entity extends java.lang.Object:
      TypeMungers: [(BcelTypeMunger ResolvedTypeMunger(Field, java.lang.Integer com.kt.model.Bookmark.version)), (BcelTypeMunger ResolvedTypeMunger(Method, java.lang.Integer com.kt.model.Bookmark.getVersion())), (BcelTypeMunger ResolvedTypeMunger(Method, void com.kt.model.Bookmark.setVersion(java.lang.Integer)))]
         declares: [declare @at_type : com.kt.model.Bookmark : @Entity, declare @at_type : com.kt.model.Bookmark : @Table(name = "BOOKMARK")]
      private static Throwable ajc$initFailureCause
      public static final com.kt.model.Bookmark_Roo_Jpa_Entity ajc$perSingletonInstance
      static void <clinit>():
        catch java.lang.Throwable -> E0
        |               INVOKESTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$postClinit ()V   (line 12)
        catch java.lang.Throwable -> E0
                        GOTO L0
                    E0: ASTORE_0
                        ALOAD_0
                        PUTSTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$initFailureCause Ljava/lang/Throwable;
                    L0: RETURN
      end static void <clinit>()
    
      void <init>():
                        ALOAD_0     // Lcom/kt/model/Bookmark_Roo_Jpa_Entity; this   (line 12)
                        INVOKESPECIAL java.lang.Object.<init> ()V
                        RETURN
      end void <init>()
    
      void ajc$declare_at_type_1()    org.aspectj.weaver.MethodDeclarationLineNumber: 14:406
    :
                        RETURN   (line 1)
      end void ajc$declare_at_type_1()
    
      void ajc$declare_at_type_2()    org.aspectj.weaver.MethodDeclarationLineNumber: 16:449
    :
                        RETURN   (line 1)
      end void ajc$declare_at_type_2()
    
      public static void ajc$interFieldInit$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$version(com.kt.model.Bookmark)    org.aspectj.weaver.MethodDeclarationLineNumber: 20:578
    :
                        RETURN   (line 20)
      end public static void ajc$interFieldInit$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$version(com.kt.model.Bookmark)
    
      public static Integer ajc$interFieldGetDispatch$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$version(com.kt.model.Bookmark)    EffectiveSignatureAttribute(java.lang.Integer com.kt.model.Bookmark.version, field-get)
    :
                        ALOAD_0
                        INVOKESTATIC com.kt.model.Bookmark.ajc$get$version (Lcom/kt/model/Bookmark;)Ljava/lang/Integer;
                        ARETURN
      end public static Integer ajc$interFieldGetDispatch$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$version(com.kt.model.Bookmark)
    
      public static void ajc$interFieldSetDispatch$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$version(com.kt.model.Bookmark, Integer)    EffectiveSignatureAttribute(java.lang.Integer com.kt.model.Bookmark.version, field-set)
    :
                        ALOAD_0
                        ALOAD_1
                        INVOKESTATIC com.kt.model.Bookmark.ajc$set$version (Lcom/kt/model/Bookmark;Ljava/lang/Integer;)V
                        RETURN
      end public static void ajc$interFieldSetDispatch$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$version(com.kt.model.Bookmark, Integer)
    
      public static Integer ajc$interMethod$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$getVersion(com.kt.model.Bookmark)    EffectiveSignatureAttribute(java.lang.Integer com.kt.model.Bookmark.getVersion(), method-execution)
    :
                        ALOAD_0     // Lcom/kt/model/Bookmark; ajc$this_   (line 23)
                        INVOKESTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$interFieldGetDispatch$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$version (Lcom/kt/model/Bookmark;)Ljava/lang/Integer;
                        ARETURN
      end public static Integer ajc$interMethod$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$getVersion(com.kt.model.Bookmark)
    
      public static Integer ajc$interMethodDispatch1$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$getVersion(com.kt.model.Bookmark)    EffectiveSignatureAttribute(java.lang.Integer com.kt.model.Bookmark.getVersion(), method-call)
    :
                        ALOAD_0     // Lcom/kt/model/Bookmark; ajc$this_
                        INVOKEVIRTUAL com.kt.model.Bookmark.getVersion ()Ljava/lang/Integer;
                        ARETURN
      end public static Integer ajc$interMethodDispatch1$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$getVersion(com.kt.model.Bookmark)
    
      public static void ajc$interMethod$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$setVersion(com.kt.model.Bookmark, Integer)    EffectiveSignatureAttribute(void com.kt.model.Bookmark.setVersion(java.lang.Integer), method-execution)
    :
                        ALOAD_0     // Lcom/kt/model/Bookmark; ajc$this_   (line 27)
                        ALOAD_1     // Ljava/lang/Integer; version
                        INVOKESTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$interFieldSetDispatch$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$version (Lcom/kt/model/Bookmark;Ljava/lang/Integer;)V
                        RETURN   (line 28)
      end public static void ajc$interMethod$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$setVersion(com.kt.model.Bookmark, Integer)
    
      public static void ajc$interMethodDispatch1$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$setVersion(com.kt.model.Bookmark, Integer)    EffectiveSignatureAttribute(void com.kt.model.Bookmark.setVersion(java.lang.Integer), method-call)
    :
                        ALOAD_0     // Lcom/kt/model/Bookmark; ajc$this_
                        ALOAD_1     // Ljava/lang/Integer; version
                        INVOKEVIRTUAL com.kt.model.Bookmark.setVersion (Ljava/lang/Integer;)V
                        RETURN
      end public static void ajc$interMethodDispatch1$com_kt_model_Bookmark_Roo_Jpa_Entity$com_kt_model_Bookmark$setVersion(com.kt.model.Bookmark, Integer)
    
      public static com.kt.model.Bookmark_Roo_Jpa_Entity aspectOf()    org.aspectj.weaver.AjAttribute$AjSynthetic@14ff0f4
    :
                        GETSTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$perSingletonInstance Lcom/kt/model/Bookmark_Roo_Jpa_Entity;   (line 1)
                        IFNONNULL L0
                        NEW org.aspectj.lang.NoAspectBoundException
                        DUP
                        LDC "com_kt_model_Bookmark_Roo_Jpa_Entity"
                        GETSTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$initFailureCause Ljava/lang/Throwable;
                        INVOKESPECIAL org.aspectj.lang.NoAspectBoundException.<init> (Ljava/lang/String;Ljava/lang/Throwable;)V
                        ATHROW
                    L0: GETSTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$perSingletonInstance Lcom/kt/model/Bookmark_Roo_Jpa_Entity;
                        ARETURN
      end public static com.kt.model.Bookmark_Roo_Jpa_Entity aspectOf()
    
      public static boolean hasAspect()    org.aspectj.weaver.AjAttribute$AjSynthetic@4dd592
    :
                        GETSTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$perSingletonInstance Lcom/kt/model/Bookmark_Roo_Jpa_Entity;   (line 1)
                        IFNULL L0
                        ICONST_1
                        IRETURN
                    L0: ICONST_0
                        IRETURN
      end public static boolean hasAspect()
    
      private static void ajc$postClinit()    org.aspectj.weaver.AjAttribute$AjSynthetic@bb5d4d
    :
                        NEW com.kt.model.Bookmark_Roo_Jpa_Entity   (line 1)
                        DUP
                        INVOKESPECIAL com.kt.model.Bookmark_Roo_Jpa_Entity.<init> ()V
                        PUTSTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$perSingletonInstance Lcom/kt/model/Bookmark_Roo_Jpa_Entity;
                        RETURN
      end private static void ajc$postClinit()
    end public class com.kt.model.Bookmark_Roo_Jpa_Entity
    
    [ERROR] The type com.kt.model.Bookmark 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;)
    [ERROR] The type com.kt.model.Bookmark 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)
    [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
    I have the following in my entity

    Code:
    @RooJavaBean
    @RooToString
    @RooJpaEntity
    @RooJson
    @Cacheable
    @NodeEntity(partial = true)
    public class Bookmark {
    and the following in my pom.xml

    Code:
    				<configuration>
    					<outxml>true</outxml>
    					<aspectLibraries>
    						<aspectLibrary>
    							<groupId>org.springframework.data</groupId>
    							<artifactId>spring-data-neo4j-aspects</artifactId>
    						</aspectLibrary>
    						<aspectLibrary>
    							<groupId>org.springframework</groupId>
    							<artifactId>spring-aspects</artifactId>
    						</aspectLibrary>
                           <aspectLibrary>
                                <groupId>org.springframework.security</groupId>
                                <artifactId>spring-security-aspects</artifactId>
                            </aspectLibrary>
    					</aspectLibraries>
    					<source>1.6</source>
    					<target>1.6</target>
    				</configuration>
    Thanks in advance for any help

  • #2
    Hi,

    [ERROR] The type com.kt.model.Bookmark 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
    [ERROR] The type com.kt.model.Bookmark 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)
    I fixed something similar to this in AspectJ 1.7.1 - can you confirm what level of AspectJ you are using?

    cheers,
    Andy

    Comment


    • #3
      Originally posted by Andy Clement View Post
      Hi,


      I fixed something similar to this in AspectJ 1.7.1 - can you confirm what level of AspectJ you are using?

      cheers,
      Andy
      I'm using 1.7.0 currently. Do you think 1.7.1 would help?
      Thanks

      Comment


      • #4
        I think so, your errors are very similar to those in https://jira.springsource.org/browse/DATAGRAPH-280 which is fixed by 1.7.1

        Andy

        Comment


        • #5
          I get similar problems in STS where the build doesn't work with an error about "class must implement..".

          What I have to do is comment out @NodeEntity(partial = true) then build project then uncomment and build again.
          that seems the only way Aspectj seems to find and do all the weaving needed for Roo + Neo4j.

          Has anyone else seen this?

          Comment


          • #6
            Originally posted by killersite View Post
            I get similar problems in STS where the build doesn't work with an error about "class must implement..".

            What I have to do is comment out @NodeEntity(partial = true) then build project then uncomment and build again.
            that seems the only way Aspectj seems to find and do all the weaving needed for Roo + Neo4j.

            Has anyone else seen this?
            If in STS I'd recommend updating your AJDT from the update site: http://download.eclipse.org/tools/ajdt/42/dev/update

            that'll give you the most up to date AspectJ.

            Andy

            Comment


            • #7
              Originally posted by Andy Clement View Post
              I think so, your errors are very similar to those in https://jira.springsource.org/browse/DATAGRAPH-280 which is fixed by 1.7.1

              Andy
              I get the same error with version 1.7.1. Please advise! Thanks.

              Code:
              Downloading: http://maven.springframework.org/release/org/aspectj/aspectjtools/1.7.1/aspectjtools-1.7.1.jar
              9661K downloaded  (aspectjtools-1.7.1.jar)
              [INFO] [aspectj:compile {execution: default}]
              [ERROR] trouble in:
              public class com.kt.model.Bookmark_Roo_Jpa_Entity extends java.lang.Object:
                TypeMungers: [(BcelTypeMunger ResolvedTypeMunger(Field, java.lang.Integer com.kt.model.Bookmark.version)), (BcelTypeMunger ResolvedTypeMunger(Method, java.lang.Integer com.kt.model.Bookmark.getVersion())), (BcelTypeMunger ResolvedTypeMunger(Method, void com.kt.model.Bookmark.setVersion(java.lang.Integer)))]
                   declares: [declare @at_type : com.kt.model.Bookmark : @Entity, declare @at_type : com.kt.model.Bookmark : @Table(name = "BOOKMARK")]
                private static Throwable ajc$initFailureCause
                public static final com.kt.model.Bookmark_Roo_Jpa_Entity ajc$perSingletonInstance
                static void <clinit>():
                  catch java.lang.Throwable -> E0
                  |               INVOKESTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$postClinit ()V   (line 12)
                  catch java.lang.Throwable -> E0
                                  GOTO L0
                              E0: ASTORE_0
                                  ALOAD_0
                                  PUTSTATIC com.kt.model.Bookmark_Roo_Jpa_Entity.ajc$initFailureCause Ljava/lang/Throwable;
                              L0: RETURN
                end static void <clinit>()

              Comment


              • #8
                killersite,

                Could you share a small (maven-based) project (on github) that reproduces the problem?

                Lasse

                Comment


                • #9
                  killersite,

                  I had a look at the project you shared on Github (I got a notification, the message isn't showing up here though...)

                  Substituting aspectj.version 1.7.0.RC1 => 1.6.12 means I can run `mvn clean package` and get a successful build.

                  Don't think the problem is with SDN, so not sure how to 'fix' it. Any ideas?

                  HTH!

                  Lasse

                  Comment


                  • #10
                    Originally posted by lassewesth View Post
                    killersite,

                    I had a look at the project you shared on Github (I got a notification, the message isn't showing up here though...)

                    Substituting aspectj.version 1.7.0.RC1 => 1.6.12 means I can run `mvn clean package` and get a successful build.

                    Don't think the problem is with SDN, so not sure how to 'fix' it. Any ideas?

                    HTH!

                    Lasse
                    Yeah I sent that reply too soon.
                    I have now updated github project to use aspectj 1.7.1 and Hibernate Search which shows the error.

                    It does seem to be the interaction between @ClassBridge and the @NodeEntity.
                    Thanks again for any help on this.

                    https://github.com/killersite/Neo4jMvnIssue

                    On a build with "clean" I get the aspectj error and subsequent builds without "clean" the error is gone.

                    Code:
                    [INFO] [aspectj:compile {execution: default}]
                    [ERROR] trouble in:
                    public class com.ex.domain.Restaurant_Roo_Jpa_Entity extends java.lang.Object:
                      TypeMungers: [(BcelTypeMunger ResolvedTypeMunger(Field, java.lang.Long com.ex.domain.Restaurant.id)), (BcelTypeMunger ResolvedTypeMunger(Field, java.lang.Integer com.ex.domain.Restaurant.version)), (BcelTypeMunger ResolvedTypeMunger(Method, java.lang.Long com.ex.domain.Restaurant.getId())), (BcelTypeMunger ResolvedTypeMunger(Method, void com.ex.domain.Restaurant.setId(java.lang.Long))), (BcelTypeMunger ResolvedTypeMunger(Method, java.lang.Integer com.ex.domain.Restaurant.getVersion())), (BcelTypeMunger ResolvedTypeMunger(Method, void com.ex.domain.Restaurant.setVersion(java.lang.Integer)))]
                         declares: [declare @at_type : com.ex.domain.Restaurant : @Entity]
                      private static Throwable ajc$initFailureCause
                      public static final com.ex.domain.Restaurant_Roo_Jpa_Entity ajc$perSingletonInstance
                      static void <clinit>():
                        catch java.lang.Throwable -> E0
                        |               INVOKESTATIC com.ex.domain.Restaurant_Roo_Jpa_Entity.ajc$postClinit ()V   (line 14)
                        catch java.lang.Throwable -> E0
                                        GOTO L0
                                    E0: ASTORE_0
                                        ALOAD_0
                                        PUTSTATIC com.ex.domain.Restaurant_Roo_Jpa_Entity.ajc$initFailureCause Ljava/lang/Throwable;
                                    L0: RETURN
                      end static void <clinit>()
                    
                      void <init>():
                                        ALOAD_0     // Lcom/ex/domain/Restaurant_Roo_Jpa_Entity; this   (line 14)
                                        INVOKESPECIAL java.lang.Object.<init> ()V
                                        RETURN
                      end void <init>()
                    
                      void ajc$declare_at_type_1()    org.aspectj.weaver.MethodDeclarationLineNumber: 16:491
                    :
                                        RETURN   (line 1)
                      end void ajc$declare_at_type_1()

                    Comment


                    • #11
                      Any idea why the interaction between @ClassBridge and @NodeEntity would cause MVN to not build the first time but subsequent builds work fine?

                      Thanks,
                      Ben

                      Comment


                      • #12
                        Ben,

                        If it works work AspectJ 1.6.12 but not 1.7, I'd say it is an AspectJ problem.

                        Are you able to use AJ1.6?

                        - Lasse

                        Comment


                        • #13
                          Originally posted by lassewesth View Post
                          Ben,

                          If it works work AspectJ 1.6.12 but not 1.7, I'd say it is an AspectJ problem.

                          Are you able to use AJ1.6?

                          - Lasse
                          No it doesn't work with 1.6.12 or version 1.7.1.
                          Please try it.

                          Comment


                          • #14
                            I just raised an AspectJ issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=392665 to track fixing this and referenced this thread and the test project. I will take a look when I get some time. I guess you can revert to 1.6.12 in the interim?

                            cheers,
                            Andy

                            Comment


                            • #15
                              Originally posted by Andy Clement View Post
                              I just raised an AspectJ issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=392665 to track fixing this and referenced this thread and the test project. I will take a look when I get some time. I guess you can revert to 1.6.12 in the interim?

                              cheers,
                              Andy
                              Thanks. But again this doesn't work in 1.6.12 version either.

                              Comment

                              Working...
                              X