4
votes
0answers
198 views

cannot generate hibernate.reveng.xml since the hibernate.connection.url is dynamic

I want to generate a hibernate.reveng.xml, but the "hibernate.connection.URL" in the hibernate.cfg.xml is a variable. jdbc:jtds:sqlserver://${database.server.name}:1433/XXX_DB so my question is ...
3
votes
0answers
33 views

Mapping JoinedSubclassMapping

I'm getting this error when i try to insert into PurchaseCredit: SQL logic error or missing database foreign key mismatch - "PurchaseCredit" referencing "Deposit" This is a part of the generated ...
3
votes
0answers
61 views

Why does nullable = false force a FK to be put in on insert, but without it it does an update to set the FK in JPA/Hibernate

Using JPA annotations and hibernate we ran in to an issue recently with a unidirectional onetomany mapping that looked like this: @Entity public class FooOrder extends AbstractEntity{ ...
3
votes
0answers
227 views

Play Framework high latency

I created an web application using struts2, hibernate with mysql. I migrated to play framework so now I have two instance of the application one written in play the other with struts2. I can see a ...
3
votes
0answers
690 views

Hibernate OneToOne(optional=true) with FetchMode.JOIN try to re-select null values

My problem is that hibernate eager loading of OneToOne association execute +1 select for each null relation. Entity example: @Entity class SideBlue { @Column(nullable = false) private ...
3
votes
0answers
399 views

UnsupportedOperationException when merging an existing Hibernate model object?

After an upgrade from Hibernate 3 to 4, we're working through a few kinks that popped up along the way. One that has us particularly stumped is an UnsupportedOperationException, where an existing ...
3
votes
0answers
506 views

@OrderColumn generates a request to update the primary key

I use a list, the list is comprised of a compound primary key is a field that also I do the sorting of the list. The problem is that if I delete an element in the list (key compound), annotation ...
3
votes
0answers
259 views

Sun javac doesn't compile generated sources, while OpenJDK one does?

I am using JPA entities, and hibernate-jpamodelgen to generate sources for classes like EntityName_.java. Strange thing is, when I run javac from Sun JDK (1.6.0_24) sources for EntityName_ are ...
2
votes
0answers
36 views

JPA - Batch/Bulk Update - What is the better approach?

I found that, JPA does not support the following Update. Update Person p set p.name = :name_1 where p.id = :id_1, p.name = :name_2 where p.id = :id_2, p.name = ...
2
votes
0answers
37 views

Spring - SessionFactoryUtils in hibernate 4

Considering moving into spring 3.2 with hibernate 4, how should one obtain current session in the context of a transaction? As far as I understand HibernateTransactionManager code (and indeed other ...
2
votes
0answers
74 views

LocalSessionFactoryBean does not return a SessionFactory instance

I have the following standard configuration: <bean id="globalSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> ...
2
votes
0answers
95 views

Hibernate Stale State Exception while deleting from DB

I am using Hazelcast with Mysql and ofc hibernate for connectivity. I have a multithreaded application, which is processing data and then tries to remove from both hazelcast and db. But after some ...
2
votes
0answers
57 views

Hibernate EntityManager - Closed Connection

I'm using EntityManagers to perform operations on the DB. However, and this happens like 20% of the time, the connection obtained by the EntityManager is closed and I can't perform any action. The ...
2
votes
0answers
28 views

do implicit transactions not update second level cache?

In an post titled "Use of implicit transactions is discouraged" here, the post states that "forgoing the use of explicit transactions has the effect of mulling the 2nd level cache.....The reasons is ...
2
votes
0answers
81 views

WiFi conflicting with local mysql connection (Java/Spring)

I'm using java/spring to connect to a local mysql database and run some integration tests. Sometimes I get Hibernate errors saying that a connection cannot be established. I've noticed this only ...

1 2 3 4 5 195
15 30 50 per page