Why Does Hibernate Persist Fail Silently in JUnit Tests on JBoss?

  • Thread starter Thread starter Borg
  • Start date Start date
  • Tags Tags
    Spring
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 4K views
Science Advisor
Gold Member
Messages
2,407
Reaction score
5,249
Does anyone have any experience with these? I have been trying to set up a simple web server (JBoss 7.0.2) with associated JUnit tests for the DAOs using Maven to build the code. I can get one or the other to work but not both.

I get frustratingly close but there is always another error that I spend days trying to figure out until I give up and try another way. The last one looked like it was successful. The server worked, I could log in, read and write data to the database without any problems. I wrote a JUnit test and it appeared to work fine as well. Unfortunately I only tested database reads. Later, when I tried to actually write data through the tests, the Hibernate persist just quietly failed. It didn't save the data but it didn't throw an error either! I didn't notice that it wasn't working until days later when I started examining the data that I thought was being saved.

I am ready to just throw out everything and start from the beginning but I have done that several times already.

Update: As it always seems to happen when I make a post looking for help, I finally made a breakthrough. It looks like I finally got it to work in both environments. Months without success and after I post about it, solved a few hours later. Never fails. :rolleyes:
 
Last edited:
Physics news on Phys.org
Greg Bernhardt said:
I'm sorry you are not generating any responses at the moment. Is there any additional information you can share with us? Any new findings?
Thanks Greg. It's not a problem anymore. As I wrote in the update, I solved it shortly after posting.