Announcement Announcement Module
Collapse
No announcement yet.
Roo AspectJ and STS (Code Completion) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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

      Comment


      • #4
        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.

        Comment


        • #5
          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

          Comment


          • #6
            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

            Comment

            Working...
            X