Announcement Announcement Module
Collapse
No announcement yet.
[ERROR] declare @type is only supported at Java 5 compliance level or above - ROO Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [ERROR] declare @type is only supported at Java 5 compliance level or above - ROO

    Hello,

    I am testing the clinic sample from roo in Redhat Enterprise Linux Version 5.5

    My environment is:

    $ set | grep HOME
    JAVA_HOME=/usr/java/jdk1.7.0/
    MAVEN_HOME=/home/<userid>/apache/apache-maven-3.0.3
    ROO_HOME=/home/<userid>/spring/spring-roo-1.2.0.M1
    ...

    I ran these commands

    rm -rf /home/<userid>/work/roo/samples/clinic
    mkdir /home/<userid>/work/roo/samples/clinic
    cd /home/<userid>/work/roo/samples/clinic
    roo.sh script --file /home/<userid>/springsource/spring-roo-1.1.5.RELEASE/samples/clinic.roo

    ...

    mvn install
    ...
    [INFO] --- aspectj-maven-plugin:1.2:test-compile (default) @ petclinic ---
    [ERROR] declare @type is only supported at Java 5 compliance level or above
    [ERROR] The method getId() is undefined for the type Owner

    How to fix this? In which file do I need to set java version? Is there a known issue of using Spring ROO with jdk 1.7 ?

    Thanks and regards,

  • #2
    I get the same error, whenever I try and complete the 'ten_minutes' demo.
    I have tried with JDK5, JDK6, and JDK7. (With JDK5, I get even a less informative error. With JDK6 and JDK7, I get the same error as mentioned).
    Can someone please help, as I was pretty excited about Roo, and am now getting less excited..

    declare @type is only supported at Java 5 compliance level or above

    Comment


    • #3
      I get even a less informative error. With JDK6 and JDK7, I get the same error as mentioned).
      Can someone please help, as I was pretty excited about Roo, and am now getting less excited..

      Comment


      • #4
        Hi all,

        I get the same error with the last STS version and with a previous one.
        I found something in a forum about java 7 not recognized as well in the pom.xml project file during compilation.
        The solution was to modify your pom.xml and replace 1.7 source and target compile level with 1.5 or 1.6.
        I tried this solution and it works for me yesterday.

        The solution : http://forum.springsource.org/showth...o-amp-Java-1.7

        Comment


        • #5
          The workaround of using 1.6 as the <source> and <target> in the aspectj-maven-plugin v1.2 in JDK7 systems (see https://jira.springsource.org/browse/ROO-2824) got clobbered on 21st Oct. I just re-applied the same code.
          Alan

          Comment

          Working...
          X