Results 1 to 10 of 16

Thread: Error: Neo4j cross-store entities will not build

Hybrid View

  1. #1
    Join Date
    Jul 2011
    Posts
    18

    Exclamation 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. #2
    Join Date
    May 2009
    Location
    Vancouver
    Posts
    274

    Default

    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

  3. #3
    Join Date
    Jul 2011
    Posts
    18

    Default

    Quote 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

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

    Default

    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

  5. #5
    Join Date
    Jul 2011
    Posts
    18

    Default

    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?

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

    Default

    Quote 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

  7. #7
    Join Date
    Jul 2011
    Posts
    18

    Default

    Quote 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>()

  8. #8
    Join Date
    May 2012
    Posts
    107

    Default

    killersite,

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

    Lasse

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
  •