[jboss-user] [JBoss Seam] - Re: [TestNG] IncompatibleClassChangeError

enzhao do-not-reply at jboss.com
Fri Jun 22 13:21:00 EDT 2007


Well the problem lies in that I'm using JDK 1.6 but the seam core libs were compiled against JDK 1.5. Here is my solution:

1. Edit the build.xml under the root directory of the Seam distribution (Let me call it $SEAM_HOME). Replace all the 1.5 with 1.6. Save the build.xml

2. under the root of $SEAM_HOME, run 

  | $ ant cleanall
  | $ ant build
  | 

3. copy the newly compiled jars like jboss-seam.jar, jboss-seam-ui.jar, jboss-seam-ioc.jar....to the /lib directory under my seam project. 

My test class extending SeamTest now works like charm!

I desparately wanted to get the test classes work because it was too frustrating that the JBoss Server OutOfMemory problem occurred very often. (This was documented in the Seam manual, but no matter how much max memory I assigned to the JVM, the server for testing would eventually crash after 5-6 times of hot redeployment). I do not want to install a JDK 5.0. I tried to recompile _my_ source code with source level 1.5 but this IncompatibleClassError did not go away. Thus came the hack above.  

The ant build log showed that a _lot_ of classes in JDK 5.0 are deprecated _and_ a lot of classes in Seam 1.2.x are deprecated too. 

I also ran the ant testall after the core rebuild. Three tests for the core package failed. These three methods are: testContextManagement, testBijectionInterceptor and textFail

I'm using Seam 1.3.0 alpha CVS 20070614. Will the bugs in this snapshot be fixed in 1.3.0 beta or GA?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056968#4056968

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056968



More information about the jboss-user mailing list