This sort of problem can happen if your project has a Java 1.5 JRE, but you have your compiler compliance level is set to 1.6+.
What version of the JRE is your project using, and what is the compiler compliance level set to? You can find this by going to Window -> Preferences -> Java -> Compiler (or Eclipse -> Preferences -> Java -> Compiler, if you're on a Mac). Something to keep in mind in Eclipse: even if your project to uses a 1.5 JRE, it does not mean that the project will be compiled with Java 1.5 compliance. Eclipse uses its own internal compiler. It does not use the compiler from the JRE (JDK) that you choose. So, if you want to compile for 1.x specifically, you need to change your compiler compliance settings. As an Eclipse tip, NEVER have the compliance level at a higher level than your JRE can support. For example, do not have the compliance level at 6.0 if your project is using a 1.5 JRE. This will always result in classfile errors. On Thu, May 7, 2009 at 11:55 AM, Alex Rudnick <[email protected]> wrote: > > Hello, > > That's a really interesting error -- thanks for mailing to let us > know. Like Salvador pointed out, the UnsupportedClassVersionError is > probably indicative of what's going on... > > Just to help us diagnose, could you try going through those same steps > with the Eclipse IDE for Java Developers (downloadable over here: > http://www.eclipse.org/downloads/ )? I'm not suggesting this as a > permanent fix, just as another data point for figuring out the > problem. > > We can try out the STS distribution over here too. > > Thanks! > > On Thu, May 7, 2009 at 10:15 AM, [email protected] > <[email protected]> wrote: > > > > When I create a new GWT project in STS, I fill out the New Web > > Application Project form as normal, without changing the SDK and app > > engine setting, and click Finish. The project is created, and then I > > see the following error in my eclipse Console: > > > > DataNucleus Enhancer (version 1.1.0) : Enhancement of classes > > > > Encountered a problem: Unexpected exception > > Please see the logs [C:\DOCUME~1\Werner\LOCALS~1\Temp > > \enhance36259.log] for further information. > > > > My eclipse version is the one available as the SpringSource Tool > > Suite, with all the Spring plugins installed. I installed the GWT and > > the GAE plugins by doing a software update from Google. I have > > attached a copy of my eclipse.ini, as well as the my full eclipse > > configuration, below the stack trace. I use JDK 1.5 as my JVM, but > > also tried 1.6. > > > > I am trying to follow the Google GWT tutorial entitled "Step 1: > > Creating a GWT Project", at > http://code.google.com/webtoolkit/tutorials/1.6/create.html. > > In response to a FAQ post I saw in these groups, I have unticked the > > Enhancer builder under the Builder properties of my eclipse project. I > > consider this a temporary, unsatisfactory solution, since it does not > > explain the cause of the problem, nor does it provide a permanent > > solution. > > > > > > The stack trace in the enhance36259.log file is as follows: > > > > jjava.lang.RuntimeException: Unexpected exception > > at > com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java: > > 59) > > at > com.google.appengine.tools.enhancer.Enhance.<init>(Enhance.java: > > 60) > > at > com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41) > > Caused by: java.lang.reflect.InvocationTargetException > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke > > (NativeMethodAccessorImpl.java:39) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke > > (DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:585) > > at > com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java: > > 57) > > ... 2 more > > Caused by: java.lang.UnsupportedClassVersionError: Bad version number > > in .class file > > > -- > Alex Rudnick > swe, gwt, atl > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
