测试JPA java.lang.ClassNotFoundException:play.db.jpa.JPABase [英] Testing JPA java.lang.ClassNotFoundException: play.db.jpa.JPABase
问题描述
我正在尝试测试我的JPA实体,并且一直在遵循本教程:
Im trying to test my JPA entities and have been following this tutorial:
http://eskatos.wordpress.com/2007/10/15/unit-test-jpa-entities-with-in-memory-database/
到目前为止,我有一个正在运行的测试,它们都通过了,但是我得到了例外:
I have a tests running so far and they are all passing, however i get the exception:
java.lang.ClassNotFoundException: play.db.jpa.JPABase
在运行时(针对我的每个测试),即使测试已完全运行并通过,
at runtime (for each of my tests )even though the tests run fully and pass,
我在JBOSS 7.1中使用了maven,并尝试导入play-db 1.1,但这并没有帮助,
Im using maven with JBOSS 7.1 and tried importing play-db 1.1 but this hasn't helped,
有人可以帮我吗?
欢呼
推荐答案
如果要对外部库使用工具,则需要将此库放入jboss目录或ear/war归档文件中的lib/文件夹中.
If you want to use tools with external librarys you need to put this librarys into your lib/ folder inside your jboss directory or ear/war archive.
这篇关于测试JPA java.lang.ClassNotFoundException:play.db.jpa.JPABase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!