Skip to content
Advertisement

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.TransactionSystemException: Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when

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 snippets when program terminate and use buildSessionFactory method. but if do not use deprecated buildSessionFactory method and

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. Annotations on methods are never inherited. Long answer :

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 configure method is just a convenient method instead of coping

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 communicating with the database. Currently I open

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) I have a Person object with attributes (ssn, name, address).

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 = account.validate(Account.Step1.class)? I am aware of creating your

Advertisement