Edited to provide more detailed information. I’m building a web service using Spring 2.5.6 and Hibernate 4. I’m dynamically building a criteria query based on input from a client. We are using Spring 2.5.6 because it is legacy code, previous attempts to upgrade to later versions of Spring by updat…
Tag: hibernate
Unexpected GDS Exception: 335544726. Error reading data from the connection
I have a Web app running on Apache Tomcat 6, using ZK, Hibernate and Jaybird JDBC for accessing a Firebird database. For some unknown reason, after a not yet mapped operation in the app that performs a dynamic SQL, it crashes with the following exception: ERROR: org.springframework.transaction.TransactionSyst…
program using hibernate does not terminate
I created a program using Hibernate. The program reaches the main function end, nevertheless the program is running. I wonder if it happens when SessionFactory is configured using Hibernate Version 4.x. Is the way to configure wrong? manual1_1_first_hibernate_apps.java Util.java The following console log snip…
Override transactional method
I have method M with @Transactional in service A. I have service B extends A with overrided method M. Will be overrided method M still transactional? Or I should add there @Transactional? Answer What you are actually asking : is the @Transactional annotation on the method inherited. Short answer : no. Annotat…
what is the use of annotations @Id and @GeneratedValue(strategy = GenerationType.IDENTITY)? Why the generationtype is identity?
Why we are using this annotations? i need to know if this autoincrement my table id values. (GenerationType.IDENTITY) is there any other types whats actually happening when we use this annotation *Is it necessary to extend Domain abstract class?What is the use? Answer First of all, using annotations as our co…
Where is the best place to begin transaction using Hibernate in a tired web application with Struts 2?
I got this Java web application which uses Struts 2 and Hibernate. In the most upper layer comprises of the Struts 2 action classes. Then there are my business logic classes which are responsible for the logic of the application. Finally there is a DAO layer (called Database Bridge) which is responsible for c…
Hibernate SaveOrUpdate – multiple workthreads
While I have been able to find information on how Hibernate’s transaction work, so the database doesn’t corrupted, it has been harder to understand how Hibernate treats an object which is shared between threads, and each thread tries to save it to the database. This is my theoretical question: 1) …
SEVERE: Context [/example] startup failed due to previous errors
I’m new at Java EE + Spring + Hibernate + Maven combination. Trying to make a simple project with tomcat 6.0. Our project just fine, no problem with debugging. But when i’m trying to run the server, it gives me “Error listenerStart” all the time. I searched all around the web for 3 day…
Transaction marked as rollback only: How do I find the cause
I am having issues with committing a transaction within my @Transactional method: When I call methodB() from methodA(), the method passes successfuly and I can see “OK” in my logs. But then I get The context of methodB is completely missing in the exception – which is okay I suppose? Somethi…
Manually call Spring Annotation Validation
I’m doing a lot of our validation with Hibernate and Spring Annotations like so: And then in the controller it’s called in the arguments: But I would like to decide the group used based on some logic in the controller method. Is there a way to call validation manually? Something like result = acco…