1
我有一個EJB類,它使用TimerService創建一個計時器& EJB的TimerConfig。java.lang.ClassFormatError:在類文件javax/ejb/TimerConfig中不是本地或抽象的方法中缺少代碼屬性
當我運行了JUnit測試類,下面的錯誤被認爲是:
java.lang.ClassFormatError:在方法缺席代碼屬性,是不是在類文件的javax/EJB/TimerConfig
本地或抽象我使用下面的Maven依賴於EJB:
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.ejb</artifactId>
<version>3.1.1</version>
<scope>test</scope>
</dependency>
任何建議如何解決這個問題?