Results 1 to 3 of 3

Thread: Spring Eclipse plugin reporting UnsupportedClassVersionError from XML files

  1. #1
    Join Date
    Mar 2008
    Posts
    7

    Unhappy Spring Eclipse plugin reporting UnsupportedClassVersionError from XML files

    I have several Spring XML files within the source folders of Eclipse projects that are being flagged as having UnsupportedClassVersionError issues. I have tried triple cleaning, closing and reopening projects, and deleting and rechecking out projects from revision control but nothing can make them go away.

    Any thoughts?

    Unexpected exception parsing XML document from file [/path/to/workspace/project/test/some/random/package/ClassBeanNameGeneratorTest.xml]; nested exception is java.lang.UnsupportedClassVersionError: Bad version number in .class file
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                               http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
    
        <context:component-scan base-package="some.random.package" name-generator="some.random.package.ClassBeanNameGenerator"/>
    
    </beans>

  2. #2
    Join Date
    Mar 2008
    Posts
    7

    Default

    Environment: Mac OS X 10.5, Eclipse 3.4.1, Spring IDE 2.2.1.v200811281800, Java 6 (project), Java 5 (Eclipse)

    It should be noted that my Windows colleagues do not have the same issues. Currently, Eclipse is running on Java 5 since the UI uses Carbon rather than Cocoa; this will be rectified in the June 2009 release.
    Last edited by afelle1; Mar 17th, 2009 at 11:11 AM.

  3. #3
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    afelle1,

    the problem here is that Spring IDE - or better Spring core nested inside Spring IDE - tries to load your some.random.package.ClassBeanNameGenerator class which is compiled with Java 6 but Eclipse runs Java 5.

    Can you please raise a JIRA so that we are able to track that problem. And maybe provide a work-around or fix for this in Spring core.

    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

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
  •