Announcement Announcement Module
No announcement yet.
Roo AspectJ and STS (Code Completion) Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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
    org.eclipse.ajdt.internal.ui.tracing.checked.filte rs = set: Compiler,Builder = @[email protected]

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

    java.lang.NoSuchMethodError: org.eclipse.jdt.internal.core.JavaModelManager.flushZipFiles()V
    	at org.eclipse.ajdt.core.javaelements.AJCompilationUnit.reconcile(
    	at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.reconcile(
    	at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconcile(
    	at org.eclipse.jface.text.reconciler.MonoReconciler.process(
    	at org.eclipse.jface.text.reconciler.AbstractReconciler$
    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,

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



    • #3
      Thanks for the reply, Yes I can confirm that
      - I'm using Version:
      - 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,


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


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


          • #6
            And just to add, the same stack trace is in this thread:

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

            Andy Clement