DWR annotation with IBM JDK 1.4 makes dwr throws an exception when first ajax call is done

Description

On IBM JDK 1.4 with websphere 5.1.2 or 6.x

When the first ajax call is done with dwr, the following exception is thrown :

java.lang.LinkageError: LinkageError while defining class: org.directwebremoting.annotations.AnnotationsConfigurator

Could not be defined due to: org/directwebremoting/annotations/AnnotationsConfigurator (Unsupported major.minor version 49.0)

(full stack in an attached file)

Workaround : deleting AnnotationConfigurator.class from the jar (with winrar for exemple, just hit delete, the jar is updated).

I set the priority to major because it prevents from linking dwr jar through maven2 dependencies.
The second workaround is to configure maven2 to lookup the dwr jar into your own repository where you would have put the dwr jar without AnnotationConfigurator.

Activity

Show:
David Marginian
November 26, 2010, 7:35 AM

I don't think we are going to ever fix this. If we do it only makes sense to go into the 2.0.7 as DWR 3 required Java 1.5 or greater.

Mike Wilson
December 11, 2010, 2:37 PM

(sorry, been missing this ticket)

I think it makes sense to fix this ticket for the JDK 1.4 folks and there seems to be a few alternatives on how we could adjust the loading of the annotations stuff.

Though, has anyone tried just adding a catch-clause for java.lang.LinkageError? It seems this could do the trick and is an easy fix for us to add. (And then we can release 2.0.7)

Mike Wilson
December 12, 2010, 2:49 AM

Ok, looking at the attached stacktrace it seems it is an UnsupportedClassVersionError exception that is thrown (not a raw LinkageError) , and we are already handling this in DWR.

So, is the problem that the IBM JDK is printing the exception stacktrace even though we are catching the exception?

David Marginian
December 12, 2010, 5:37 AM

Mike, that is my guess as I have seen this with other app servers in the past (Dynamo).

Mike Wilson
December 12, 2010, 6:25 AM

I've checked in a fix per Christian Gosch's suggestion, that checks the version of the Java runtime (>= 1.5) before attempting config from annotations. I'm resolving this issue and a new 2.0.7 release shouldn't be far away.

Assignee

Mike Wilson

Reporter

Manson Thomas

Labels

None

Documentation Required

None

Fix versions

Affects versions

Priority

Minor
Configure