Results 1 to 9 of 9

Thread: "Aspect and introduction must be in identical packages"

Hybrid View

  1. #1
    Join Date
    Jul 2008
    Location
    Maasmechelen (Belgium)
    Posts
    157

    Question "Aspect and introduction must be in identical packages"

    From time to time I get an "Aspect and introduction must be in identical packages" that leads to Roo stop functioning.

    I work around by just recreating the project. But maybe there's another wat I could accomplish (or prevent?) this?

    At a first look I never see my source files and .aj files being in wrong packages or anything, but I'm not 100% sure.

    Thanks in advance!

  2. #2
    Join Date
    May 2011
    Posts
    3

    Default

    I am also getting this error. Did you ever figure out a way to resolve it? I am using version 1.1.4.

    Thanks

  3. #3
    Join Date
    Aug 2010
    Location
    Brazil
    Posts
    9

    Default

    I am also getting this error... Any help?

    Thanks

  4. #4
    Join Date
    Aug 2010
    Location
    Brazil
    Posts
    9

    Default

    Found the code that generates this error at http://static.springsource.org/sprin...eComposer.html


    Code:
    private void appendTypeDeclaration() {
    111 		Assert.isTrue(introductionTo.getPackage().equals(aspect.getPackage()), "Aspect and introduction must be in identical packages");
    112 		
    113 		this.appendIndent();
    114 		if (itdTypeDetails.isPrivilegedAspect()) {
    115 			this.append("privileged ");
    116 		}
    117 		this.append("aspect " + aspect.getSimpleTypeName() + " {");
    118 		this.newLine(false);
    119 		this.indent();
    120 		this.newLine();
    121 
    122 		// Set to false, as it was set true during the above operations
    123 		content = false;
    124 	}

  5. #5
    Join Date
    Aug 2010
    Location
    Brazil
    Posts
    9

    Default

    I found a strange behavior that was causing this problem here. Assuming you created your project with --toplevelpackage com.foo and your project name bar, you will have yout root package com.foo.bar. Your project should have a folder strucuture like src/test/java/com/foo/bar where roo creates the IntegrationTests classes. I have created a test class in default (root) package on the test folder structure (src/test/java). After this, roo presents the error message above. When I deleted the test class in the root package on test folder, roo stoped presenting the error message. Why? I don't know...

  6. #6

    Default

    Hello I am rickywillson from USA and it is my first post in this forum. I feel very glad to come in this site. I am here to collect some information about this forum.

  7. #7
    Join Date
    Nov 2009
    Posts
    7

    Default

    Thanks camiloporto, very helpful reply. I had done exactly the same, a test class in root package of test folder and the same problem. After removing the test class everything work like a charm.

    Quote Originally Posted by camiloporto View Post
    I found a strange behavior that was causing this problem here. Assuming you created your project with --toplevelpackage com.foo and your project name bar, you will have yout root package com.foo.bar. Your project should have a folder strucuture like src/test/java/com/foo/bar where roo creates the IntegrationTests classes. I have created a test class in default (root) package on the test folder structure (src/test/java). After this, roo presents the error message above. When I deleted the test class in the root package on test folder, roo stoped presenting the error message. Why? I don't know...

Posting Permissions

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