Results 1 to 3 of 3

Thread: Spring Roo RC1 unsupported class version issue

  1. #1
    Join Date
    Jan 2008
    Posts
    248

    Default 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

    Cheers,

    Marc

    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 org.springframework.beans.factory.support.Abstract AutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBean Factory.java:1337)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBean
    Factory.doCreateBean(AbstractAutowireCapableBeanFa ctory.java:476)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBean
    Factory$1.run(AbstractAutowireCapableBeanFactory.j ava:412)

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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:

    http://jira.springsource.org/browse/ROO-68

    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
    roo
    props <----- record the output of this command in a Jira ticket
    script clinic.roo
    quit

    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...
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  3. #3

    Default

    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.

Posting Permissions

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