Announcement Announcement Module
No announcement yet.
Spring Roo RC1 unsupported class version issue Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Roo RC1 unsupported class version issue

    Prob to do with the fact that I use JDK 1.5.09 but I thought I would mention it here.

    I got this going through the blog post with the hello world for Roo



    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creati
    ng bean with name 'entityManagerFactory' defined in file [D:\Java\Projects\Sprin
    gRoo\target\classes\META-INF\spring\applicationContext.xml]: Invocation of init
    method failed; nested exception is java.lang.UnsupportedClassVersionError: Bad v
    ersion number in .class file
    at AutowireCapableBean
    at AutowireCapableBean
    at AutowireCapableBean
    Factory$ ava:412)

  • #2
    When does this happen? It looks like you're trying to load up a Roo-created project and you're experiencing a version issue. If the Roo shell works, it indicates you have Java 5 or above. Please take a look in the pom.xml at the Java version defined against the compiler. You might also be interested in looking at how Roo handles Java version numbers, which is detailed at:

    Just thinking aloud here, I am wondering if you possibly created this project with an early version of Roo, have the pom.xml indicating a Java version you do not have, have %JAVA_HOME% pointing at an unexpected JDK version, or maybe even have a corrupted JAR in your %HOME%/.m2/repository directory.

    If you continue to have difficulties with this, would you please try:

    mkdir \clinic
    cd \clinic
    props <----- record the output of this command in a Jira ticket
    script clinic.roo

    Then mvn -X tomcat:run <--------- please also include this output in Jira

    This will produce a lot of debug output, including details of the Java version. Would you please post this output (along with the created pom.xml) to a Jira ticket and we'll be pleased to assist you get started with Roo. We look forward to being of help...


    • #3
      I reproduced the same error when handling with .roo samples.
      I used jdk 1.5 and after installing jdk 1.6 and setting JDK_HOME and JAVA_HOME and Path to the new version all worked ok.