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

  • Thread starter Thread starter Borg
  • Start date Start date
  • Tags Tags
    Spring
AI Thread Summary
The discussion revolves around setting up a web server using JBoss 7.0.2 and integrating JUnit tests for Data Access Objects (DAOs) with Maven. The user faced persistent challenges in getting both the server and tests to function correctly, experiencing issues particularly with Hibernate's data persistence during write operations. Despite initial successes with reading data, the user encountered silent failures when attempting to save data, leading to frustration and thoughts of starting over. However, shortly after posting for help, the user reported a breakthrough, successfully resolving the issues that had plagued the setup for months. The discussion highlights common struggles in configuring web servers and testing frameworks, as well as the serendipitous nature of problem-solving in programming.
Borg
Science Advisor
Gold Member
Messages
2,265
Reaction score
4,860
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:
Technology news on Phys.org
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?
 
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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top