That sounds likely to me, the dependency javaee-web-api does include the javax.mail interfaces so its duplicating whats in mail-1.4.jar so its just chance that in my environment it uses the classes from the mail jar and works whereas in your environment it uses the classes from javaee-web-api and so doesn't work.
...ant On Thu, Aug 26, 2010 at 8:30 PM, Simon Nash <[email protected]> wrote: > Thread [1] below might be relevant. Apparently Sun is in the habit of > releasing a "borked" JavaEE API jar that can only be used for compiling > and not for running testcases. The suggested solution is not to use the > Sun JavaEE API jar but instead to use the equivalent Geronimo API jars, > which aren't "borked". > > You would need to select the specific Geronimo API jars that you need > (e.g., the javamail API), as it seems that Geronimo doesn't have a > single combined JavaEE API jar. > > Simon > > [1] > http://maven.40175.n5.nabble.com/JUnit-tests-requiring-j2ee-jar-fail-when-running-mvn-surefire-test-td100379.html > > Florian MOGA wrote: >> >> Hi, >> >> I've noticed a strange error in the logs when running /mvn test /on >> binding-comet-runtime. >> >> java.lang.ClassFormatError: Absent Code attribute in method that is >> not native or abstract in class file javax/mail/internet/ParseException >> >> >> Full logs can be found here [0]. I've searched the internet and it seems >> to be caused by the fact that javaee-web-api:6.0 only contains the API and >> not the actual implementations. At Ant's suggestion, I've added >> javax.mail:mail:1.4 as dependency which solved the problem in his >> environment. However, it didn't do it for me, I can still see the error in >> the logs. I've checked this on two environments: Ubuntu 9.04/Sun JRE 6.0 and >> Ubuntu 10.04/OpenJDK and I'm getting the same behavior. >> >> Could someone else please check if the error is appearing on their >> environment and if the javax.mail dependency solves the issue? All that's >> required is to run a /mvn install /on binding-comet and /mvn test/ on >> binding-comet-runtime which can be found in the contrib/modules folder. >> >> Thanks, >> >> Florian >> >> >> [0] http://pastebin.com/g3fuR5bw > >
