When you use JUnit/Arquilian and get the following error when running in maven:
Tests in error:
.....: Absent Code attribute in method that is not native or abstract in class file javax/persistence/GenerationType
You may have this issue when you have higher Java version and you may not have this issue if you run other Java versions of SDK installed. To prevent those dependencies add the following in maven:
<dependency>
<groupId>org.glassfish.main.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>4.0</version>
<scope>test</scope>
</dependency>
Find latest version of org.glassfish.main.extras on
http://mvnrepository.com/artifact/org.glassfish.main.extras/glassfish-embedded-all
No comments:
Post a Comment