Results 1 to 5 of 5

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

  1. #1
    Join Date
    Sep 2011
    Posts
    5

    Default [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. #2
    Join Date
    Nov 2011
    Posts
    3

    Default

    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

  3. #3
    Join Date
    Nov 2011
    Posts
    4

    Default

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

  4. #4
    Join Date
    Nov 2011
    Posts
    1

    Default

    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

  5. #5
    Join Date
    Dec 2005
    Posts
    935

    Default

    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
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

Tags for this Thread

Posting Permissions

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