Tapestry 5 applications works when compiled with eclipse 3.3.x but does not work when compiled with maven 2.0.8

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Tapestry 5 applications works when compiled with eclipse 3.3.x but does not work when compiled with maven 2.0.8

Adriaan Joubert-3
Hi,

as I mentioned previously on this list we've been having some issues
with class transformation errors out of javassist. Recently we had a
case where everything was running fine under eclipse, but the same
code would not run on the server. Here a description from one of our
guys:

*Tapestry 5 applications works when compiled with eclipse 3.3.x but
does not work when compiled with maven 2.0.8 (default plugins)*


We normally develop in eclipse and all developers got their own tomcat
6 service setup in eclipse 3.3.x for fast debugging and testing. every
few days we release a new version of our web application to the test
system for the Testers to have a go at it black-box style. This is
normally done by using maven to create the war file (just the normal
mvn clean package) upload the war to test the tomcat server. Up until
last week this has never been a problem but now we have found a
"feature" that other should be aware of (it can cause some gray hairs
before tracked down). It should also be noted that we use java
1.6.<latest release>


The error:

On our test server we kept getting an error on a specific page and we
never got it on any of our development systems. The error appeared to
be originating in javassist. We tried newer version of javassist but
to no avail. after lots of cursing and hair pulling it was discovered
that it was possible to get it going on the test server as well, but
only if all the classes were compiled with eclipse and then followed
by maven package command that did not compile the code!


Which of course set off nasty warning bells, compiler problems are
never fun. After this we did some investigation into maven and what
compiler its using by default. It uses the javac 1.5.3
maven-compiler-plugin. This maven compiler plugin is actually only
barely java 1.5 compatible! after some digging we did find a
1.6.0-SNAPSHOT but unfortunately this did not solve the problem.


The obvious plugin to use would be the plexus-compiler-eclipse only
problem is that its also old, eclipse 3.1 old! so using is not really
working either.


So a cautionary note for people developing in java 1.6.x using maven
to build their war files if you do get weird errors that appear to be
coming from javassist well consider using the classes compiled from
eclipse and build you war using those and see what happens....


We have not yet found a reasonable workaround. If anyone have had
similar problems or know of a maven eclipse 3.3.x compiler plugin
please do speak up. As it looks now we are considering building our
war with Ant.


I hope this helps others who run into these problems and any
suggestions welcome!

Cheers,

Adriaan

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]