Results 1 to 6 of 6

Thread: Roo AspectJ and STS (Code Completion)

  1. #1
    Join Date
    Jun 2009
    Location
    UK
    Posts
    16

    Default Roo AspectJ and STS (Code Completion)

    Hi all,

    I'm trying to use roo with sts however it appears as that jdt is not working. I can't see the entity methods that are generated in ..._Roo_Entity.aj when using code completion (Ctrl-Space) in eclipse.

    (1) Roo is running and generating Entity Aspects as expected when adding the appropriate annotations

    (2) AJDT service is running (at least it claims its enabled)
    21:18:30 Startup information:
    AJDT version: 2.0.1.e35x-20091001-1600 for Eclipse 3.5
    AspectJ Compiler version: 1.6.6
    usingVisualiser=true
    usingXref=true
    usingCUprovider=true
    org.eclipse.ajdt.internal.ui.tracing.checked.filte rs = set: Compiler,Builder
    ajde.version.at.previous.startup = @AJDEVERSION@

    (3) Whenever I open an .aj file in STS i get the following exception in the error view.

    Code:
    java.lang.NoSuchMethodError: org.eclipse.jdt.internal.core.JavaModelManager.flushZipFiles()V
    	at org.eclipse.ajdt.core.javaelements.AJCompilationUnit.reconcile(AJCompilationUnit.java:499)
    	at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:126)
    	at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access$0(JavaReconcilingStrategy.java:108)
    	at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:89)
    	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    	at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:87)
    	at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:151)
    	at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:86)
    	at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconcile(JavaCompositeReconcilingStrategy.java:102)
    	at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77)
    	at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206)
    So my questions are
    (1) Any idea why I can't see the methods generated by roo in STS (eclipse) code completion? - I rebuilt the whole project cleaned etc... no luck
    (2) Is the above error realted to it or is it just an eclipse hickup when trying to deal with an .aj file?

    Thanks in advance,
    Walter

  2. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Hi Walter,

    Just to be sure, can you confirm that you are running STS 2.2 RELEASE version? If so, did you install any other plugins or modified it in any way? When you go to Preferences > JDT Weaving it should state 'JDT weaving is currently enabled'. Have you tried reindexing the project?

    The exception you are seeing seems certainly related to AJDT issues which explains why incremental compilation does not work and as a result your code completion does not work. Personally I have not seen this problem in quite a long time as AJDT has improved significantly with regards to such issues recently. If the problem persists, it might be best for you to open a bug ticket against AJDT and provide them as many details as you can (OS, Java, AspectJ, AJDT versions, etc).

    Cheers,
    Stefan

  3. #3
    Join Date
    Jun 2009
    Location
    UK
    Posts
    16

    Default

    Thanks for the reply, Yes I can confirm that
    - I'm using Version: 2.2.0.200910210131-RELEASE
    - also I did reindex.
    - And JDT weaving is currently enabled

    Well I have to admit that I have 1500+ domain objects - maybe I should start with a smaller project or cut it down a bit and see if AJDT works then... I'll try today and let you know.

    Thanks for you opinion,
    Cheers,
    Walter

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    We do have Andrew Eisenberb - AJDT lead - working for SpringSource, so if you're running into problems on a bigger project we'd love to know the details so we can reproduce and fix. BTW as part of capacity testing I have created over 500 Java types with all their Roo ITDs and it worked, so it might just be an issue specific to your AJDT/STS version combination. We'll help you sort it out regardless, though, so just let us know if the problem doesn't go away.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

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

    Default

    This is a problem due to a mismatch between the JDT classes in STS 2.2.0 and AJDT. Upgrading to the very latest AJDT should address it.

    Andy Clement

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

    Default

    And just to add, the same stack trace is in this thread:
    http://forum.springsource.org/showthread.php?t=79604

    with a link to the AJDT download site you need (and confirmation in there that the download fixes the problem)

    thanks
    Andy Clement

Posting Permissions

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