File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes [EJB3UNIT] Data insertion in my database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "[EJB3UNIT] Data insertion in my database" Watch "[EJB3UNIT] Data insertion in my database" New topic

[EJB3UNIT] Data insertion in my database

Fabian Angy
Ranch Hand

Joined: Oct 27, 2008
Posts: 90

I have a question regarding data insertion into database with JUNIT Test (EJB3UNIT).

I'm testing my method which save record in my database, but, my new records are not saved in my database while they are created because when a record is created, the id are incremented when my method is called.

Thus, i wonder: it is possible that my data are deleted automatically after the insertion? (normal behavior of JUNIT Test or it is a problem with me?).

Thanks in advance.

Ramana Rapally

Joined: Mar 03, 2010
Posts: 1
HI Fabian,

I am new to EJB3Unit and trying to automate my EJB3 application unit-testing. I wanted to use Oracle database and configured with relevant settings and ran my session bean testcases. It fails to connect to the database, I have verified the database connection via sqlplus and I was able to connect (I also tried connecting via TOAD, it works).

Below is the file:

I am getting the below error:

As I can see that you were able to run your tests without any errors, could you please help me what I am doing wrong.

Thanks in advance.

I agree. Here's the link:
subject: [EJB3UNIT] Data insertion in my database
It's not a secret anymore!