MIke:

I unjar'd my app.jar yesterday and did `file Application.class` and it returned 
version 49 - so it looked normal. I am running now though. On Eclipse's 
'Installed JREs' preference pane, I checked "JVM 1.6.0 (MacOS X Default)." I 
had previously selected 1.5 there. The compliance setting has always been at 
1.5. But my next build ran.

The weird thing is that I haven't changed any JVM or java settings in recent 
weeks. I have no idea why that change effected anything. I hadn't changed any 
java settings recently. And I have no idea which classes I produced were 
wrongly versioned since everything I looked at seemed correct.

Tim Worman
UCLA GSE&IS



On Nov 20, 2009, at 5:05 AM, Mike Schrag wrote:

> your bootstrap class actually loaded, so it looks like it's one of your other 
> classes ... In particular, I suspect your Application class is built 1.6, 
> since it's failing on the first defineClass call.
> 
> unjar your application jar and run
> 
> find . -name '*.class' -exec file {} \; | grep 50
> 
> I would add a source and target declaration to your wocompile step in 
> build.xml, or pass in -source and -target to ant. I don't think ant building, 
> even from eclipse, cares about your JDK setting.
> 
> ms
> 
> On Nov 20, 2009, at 2:35 AM, Tim Worman wrote:
> 
>> I am getting this error all-the-sudden and it appears to be related to this.
>> 
>> java.lang.UnsupportedClassVersionError: Bad version number in .class file
>>      at java.lang.ClassLoader.defineClass1(Native Method)
>>      at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>>      at 
>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>>      at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>>      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>>      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>>      at java.security.AccessController.doPrivileged(Native Method)
>>      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>      at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
>>      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
>>      at java.lang.ClassLoader.defineClass1(Native Method)
>>      at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>>      at 
>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>>      at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>>      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>>      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>>      at java.security.AccessController.doPrivileged(Native Method)
>>      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>      at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
>>      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>      at com.webobjects._bootstrap.WOBootstrap.main(WOBootstrap.java:84)
>> 
>> Obviously something's changed but I haven't changed my setup or installed 
>> any new components/software. I have done WOLips updates. I did `file 
>> WOBootstrap.class` and it returned "version 49.0 (Java 1.5)." It was the 
>> same on the deployment machine. The JDK compliance in Eclipse is set to Java 
>> 1.5 on my dev machine.
>> 
>> I've been banging my head against it and can't seem to figure what else I 
>> have to do to get this to run - or why my compile products are different 
>> suddenly.
>> 
>> Tim Worman
>> UCLA GSE&IS
>> 
>> 
>> 
>> On Nov 11, 2009, at 8:36 PM, Mike Schrag wrote:
>> 
>>> For anyone who is getting an unexplained UnsupportedClassVersion error at 
>>> startup -- unjar your WOBoostrap.jar and run file on the WOBoostrap.class.  
>>> George Domurot and I just discovered that there is at least one 
>>> WOBoostrap.jar floating around the intertubes that was built with 1.6 and 
>>> has a 50.0 version number. Possibly this came from a Snow Leopard developer 
>>> preview? This file comes from whatever machine performed your build and 
>>> typically is found in 
>>> /System/Library/WebObjects/JavaApplications/wotaskd.woa/WOBoostrap.jar 
>>> (though the precise location is defined in your wolips.properties).  I 
>>> don't know how widespread that 1.6 build is, but if you've got it, this 
>>> might save you a lot of insanity.
>>> 
>>> ms
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/lists%40thetimmy.com
>>> 
>>> This email sent to li...@thetimmy.com
>> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to