File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Testing and the fly likes DBUnit : OutOfMemoryException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "DBUnit : OutOfMemoryException" Watch "DBUnit : OutOfMemoryException" New topic

DBUnit : OutOfMemoryException

Duran Harris
Ranch Hand

Joined: Nov 09, 2008
Posts: 608

Hi all,

I have some very large xml files providing the test data for DBUnit to insert prior to unit test execution...Unfortunately I am getting outOfMemoryExceptions every time I execute the test. I am getting a NullPointerException in my test method cause by the OutOfMemoryException .... I have configured the sure-fire maven plugin with an arg-line parameter setting the heap space to 1024mb but this has not helped...What else can I do?

===>SCJP 1.5(72%)<===
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

Are you sure you need all that data? Can you post the relevant code snippet from your tests where the exception happens? That might help give folks some ideas. Hard to tell if there's nothing to look at.

Junilu - [How to Ask Questions] [How to Answer Questions]
Duran Harris
Ranch Hand

Joined: Nov 09, 2008
Posts: 608

I decided to construct the xml manually for the table that was giving me issues ....That solved my problem
I agree. Here's the link:
subject: DBUnit : OutOfMemoryException
jQuery in Action, 3rd edition