Announcement Announcement Module
Collapse
No announcement yet.
Spring Eclipse plugin reporting UnsupportedClassVersionError from XML files Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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, 11:11 AM.

    Comment


    • #3
      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

      Comment

      Working...
      X