WhatsTheCauseOfThisExceptionJavalangClassFormatErrorAbsentCode

http://community.jboss.org/wiki/WhatsTheCauseOfThisExceptionJavalangClassFormatErrorAbsentCode

Background

 

When these artifacts were published to the Maven repository, Sun stripped out the code from classes that are classified as "implementations". So all the interfaces are code complete, yet any abstract class or implementation class has no code in it. Any attempt to use that class will likely blow up. That's why Arquillian is failing.

 

Here's an excerpt from the argument as to why Sun did this:

When one compiles, they want to run as well. By the way, we have been promoting full set of Java EE APIs which can only be used for compilation - they are stripped off method details. That way, user can't take those artifacts and try to use it in runtime.

The workaround is to not use javax.javaee-api but rather use the individual, "real" artifacts that you need. Unfortunately, there is no Maven scope available that will exclude a dependency from the test classpath.

 

There are two solutions to this problem.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值