wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes How to use JUnit and EJB3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to use JUnit and EJB3" Watch "How to use JUnit and EJB3" New topic
Author

How to use JUnit and EJB3

Georg Joo
Ranch Hand

Joined: Feb 24, 2004
Posts: 49
Hi

I want to test my EJB3 with JUnit. But I get allways following error :



The setup methode looks like :



My persistence.xml :


What can I do ? Where is the right place for the persistence.xml file ?


SCJP, SCWCD, SCBCD<br /> <br />Vienna, Austria
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9912
    
158

I havent worked with EJB3 much, but EJBs are server side components and they cannot be tested with JUnit. You might have to use Cactus instead, which is very similar to JUnit but allows you to test server side components.


[My Blog] [JavaRanch Journal]
Georg Joo
Ranch Hand

Joined: Feb 24, 2004
Posts: 49
Hi

I have the book "Pro EJB 3" of Apress. There is a description to test EJB3 with JUnit. It schoud be possible.

But I will take a look to Cactus.

Thanks
Georg


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use JUnit and EJB3
 
Similar Threads
I'm trying to build a JPA application , but i am getting an error NoClassFound
problem in pro EJB3 chapter 2 code
hibernate persistence.xml question
Working with DataNucleus: How I solved the "No persistence providers available" problem.
JPA not working with EJB3