0

I am trying to run a test case which is trying to run a spring applicationContext from an xml file .Like:

    new FileSystemXmlApplicationContext("classpath:applicationContext.xml");

But when I try to run it , gives the error below:

Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/mail/internet/ParseException
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)

It seems that some impl jar files are missing. when it runs as a war file under application server, it runs healty.

So the question is: is there any easy way to add in maven pom.xml in order to simulate application server jars when running this or should I add each one by one?

Thx

Ali

Neron
  • 1,500
  • 7
  • 30
  • 52
  • related: http://stackoverflow.com/questions/15948598/classformaterror-absent-code-attribute-in-method-that-is-not-native-or-abstract –  Aug 20 '15 at 08:14
  • right. looks like javaee-api jar is poisoned. I removed it and it works fine now – Neron Aug 20 '15 at 10:55

0 Answers0