-1
votes
2answers
31 views

How to get the serial id just after inserting a row?

I have a table with row 'id' (a primary key) default set to serial in postgres. I insert into this row by calling session.getCurrentSession().createSQLQuery("some insert query") without adding any ...
0
votes
1answer
19 views

Hibernation simple direct mapping

I have 2 tables employees and orders: Console screens_before execusion Now i'm trying to map list collection to get all orders of each employee. My mapping: @Entity @Table(name = "employees", schema ...
0
votes
1answer
18 views

call postgres function with hibernate

I wrote a PostgreSQL function with return value VOID: CREATE OR REPLACE FUNCTION queryinteriorexteriorcount() RETURNS void AS ..... The function works quite well if i call it in pgAdmin. But if i ...
0
votes
0answers
25 views

Error while Connecting postgres using Hibernate. - NullPointerException

Am getting below exception while connecting to postgresql, INFO: HHH000046: Connection properties: {user=postgres, password=****} Exception in thread "main" java.lang.NullPointerException at ...
0
votes
1answer
17 views

Hibernate xml column definition

so this seems to be a bit of a hack but I've been looking at this code too long. I have a table that's id is a bpchar in postgres. The pojo is looking for a string and I am getting an error when the ...
0
votes
0answers
15 views

hibernate ant task hbm2java - org.hibernate.MappingException

I'm using hbm2java task (ibernate-tools 4.0.0-CR1) to generate the java pojos from a postgres db. CREATE TABLE CO_ASGMT_WRKR_EV ( ID_STR_RTL CHAR(32) NOT NULL, ID_EV ...
0
votes
1answer
31 views

The Right Way To Do Evolutions In Play

I am currently working on a play app to be the backend API for a mobile app I'm developing. Until now, I had set jpa.ddl to update and everything has been working fine. When I added a new field to ...
0
votes
1answer
18 views

Specifying index method when using @Index annotation

I'm using (spatial) hibernate annotations to create a schema for a spatial application that is implemented on top of PostGIS. When creating the database schema from my annotated classes, I'm in need ...
0
votes
1answer
32 views

How can I get a String from this Geometry Object with hibernate and PostGIS

I would like to return the output (Output is "0101000020E610000000000000000024400000000000002440" in geometry type) of this SQL Postgis query select ST_GeometryFromText('POINT(10 10)',4326) in Java ...
-2
votes
1answer
53 views

org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host

I am writing a web application that uses Hibernate to connect to Heroku Postresql. Everything works fine when the application is deployed to Heroku but I get the following exception when I run the ...
0
votes
1answer
37 views

Getting exception while accessing values from data base using hibernate

I have two tables website_availability and status_codes.And these have foriegn key relation between them.status_codes is parent table.I am using hibernate.I need "list" of values from these tables ...
-2
votes
0answers
22 views

CMS Open source API required [closed]

I need to create a CMS based Web Site in JAVA with some of the following proposed technologies: JAVA 7, Hibernate 3.x, Postgresql Database and Apache Tomcat. Could you please specify … what open ...
0
votes
1answer
36 views

Hibernate does not create Table in the database

I am using PostgreSQL and I am trying to run a simple Hibernate application, in particular the application decribed in the page. My hibernate.cfg.xml file is: <?xml version="1.0" ...
0
votes
1answer
51 views

Creating multiple transactions in a single hibernate session

I have created a Quartz Job which runs in background in my JBoss server and is responsible for updating some statistical data at regular interval (coupled with some database flags) To load and ...
0
votes
0answers
19 views

hilo vs GUIDcomb vs Sequence

Is there any practical experience using the hilo generator for a VERY large number of records? In practice, if you or, for example, restarting your server once a day what ends up being the number of ...
0
votes
1answer
19 views

postgres sql logs for application users via hibernate

I've got web application using Spring. To connect with my database I'm using Hibernate. I've got requirement to log all SQL queries executed by application users (something like database logs per ...
0
votes
2answers
41 views

Issues with my criteria query when calling SQL created function

In my Postgres 9.1 database I have a li table that is mapped by ORM (Hibernate) in the following Li class: package a.b; @Entity @Table(name = "li", schema = "public") ...
1
vote
2answers
48 views

Connecting PostgreSQL 9.2.1 with HIbernate

I have a blank Spring MVC project, and I've installed Hibernate and the PostgreSQL drivers using Maven. I'm running short on complete tutorials that show how to connect PostgreSQL with Hibernate. ...
1
vote
0answers
53 views

PrimaryKeyJoinColumn problems with Hibernate

I have the class Person: @Entity @Table(name = "person") @Inheritance(strategy= InheritanceType.JOINED) @SequenceGenerator(name = "person_seq", sequenceName = "person_seq", initialValue = 1, ...
3
votes
2answers
76 views

Mapping Files and POJOS from Database for postgres not working

Im using Netbeans 7.3, Windows 7, Postgres 9.2, I created a Java Web project with Hibernate 3.2.5 (driver = postgresql-9.2-1002.jdbc4) I added the new project with the postgres database info, ...
0
votes
1answer
47 views

Dynamic hibernate connection

We developing a JSF app connecting to existing PostgreSQL DB using Hibernate. Each of our clients have their own PostgreSQL data base. Is it possible to host only one app dynamically connecting to ...
0
votes
1answer
70 views

how to call postgres function with hibernate criteria

I am getting sorted results using hibernate criteria which generates the below sql: select * from mytable order by name asc; This is how i do it with hiberante criteria: ...
0
votes
1answer
61 views

How to normalize your database in hibernate? (Repeating values don't get saved again and again)

imagine I have a table called Photo and a table called Tag. A Photo can have any amount of tags. Like a picture of the Brandenburg Gate in Berlin has as tags "Berlin", "Gate", ... Now there is a ...
0
votes
1answer
54 views

Grails generating

I'm busy doing a fairly complex data migration from MySQL to Postgres on a Grails project. I'm using GORM to generate the schema in PostGres and then doing MySQL -> mysqldump, some data manipulation ...
1
vote
2answers
118 views

Null pointer exception while using hibernate

I am using Hibernate and spring. this is my model class @Entity @NamedNativeQueries({@NamedNativeQuery( name = "CSI_TARGET", query = "select * from CSITARGET('CSIINDEX',2)", ...
1
vote
1answer
49 views

Missing table error while accessing a legacy PostgreSQL table with Grails

I have been trying to connect to a legacy table of a PostgreSQL database from my Grails App for a few days now without success. What I want All I want is to query this table (which has the users ...
0
votes
1answer
33 views

My sequence not works all the time postgreSQL

I encountered problems when using postgres sql I have a inteface to add a folder (web application) I have a table "file" with a column "ref_composant" I automatically generates the following manner.: ...
0
votes
1answer
80 views

Spring, Hibernate database query

I am trying to build simple spring security hibernate login app. But I have a problem geting result from Database with hibernate. Here's my Service class that will query. UserAccountService: ...
0
votes
1answer
60 views

No value specified for parameter 1

I am using Hiberante to connect to postgres database. I am trying to insert a record into the database. I have the values for the record in a string array which I got from a csv file. This is my dao ...
0
votes
1answer
29 views

Hibernate - my table is not mapped

I want to make a simple query with a getValueByLabel Method: Here is my code: public Config getValueByLabel(String label) throws EntityPersistException{ try { Query query = ...
0
votes
0answers
61 views

Hibernate Postgresql Schema

I am accessing Postgresql db using hibernate POJO classes and mapping . Now I added a new schema called 'OCS' and not able to generate classes and mapping.Here is my hibernate.cfg.xml ...
1
vote
1answer
107 views

Hibernate-Spatial Query for Points within an area

Dear stackoverflow readers, I'm currently working on an application that has the requirement to load specific items based on its coordinates. Example: I want all shops from coordinates x or within 15 ...
0
votes
1answer
198 views

Escaping special character in Hibernate select query with fts

I am having the query like these Query query = session.createQuery("select object from EntityObject object where lower(object.columnName) like lower (E'%\\(test\\)%')"); and Query query = ...
0
votes
1answer
99 views

spring, hibernate, postgres database query

I have a problem with my spring, hibernate app. I'm trying to make a login with spring security and im having little trouble geting my user account query to DB to work. Problem is that my code will ...
0
votes
1answer
90 views

“relation not found” using Postgres within an Eclipse Hibernate application

Based on my previous unsolved question PostgreSql does not "recognize" table created by Hibernate I would like to ask if I do not do something right regarding the connection to PostgreSql ...
-1
votes
2answers
97 views

PostgreSql does not “recognize” table created by Hibernate

I have problem to create two associated tables with hibernate in a PostGreSql database. I am inclined to believe that the problem lies in the Database (configuration?) since I have tried nearly all ...
1
vote
1answer
65 views

hibernate - error during frequent queries

I use server Tomcat + HttpServlet + hibernate. I test the server performance, for this, I created an application that simulates the operation 500 clients, each client with a periodicity repeats HTTP ...
1
vote
1answer
27 views

Insert into DB via hibernate

I have created this class which is created in my postgresql db: @Entity public class Test implements Serializable { @Id @GeneratedValue private Long id; @NotNull ...
0
votes
2answers
21 views

Error connection to herokupostgresql locally

I am writing a struts2 app and using hibernate for persistence. I deploy may app on heroku and everything works ok, but when ever I run it locally I get: org.postgresql.util.PSQLException: FATAL:no ...
2
votes
2answers
265 views

Mapping postgreSQL JSON column to Hibernate value type

I have a table with a column of type json in my postgreSQL DB (9.2). I have a hard time to map this column to a JPA2 Entity field type. I tried to use String but when I save the entity I get an ...
2
votes
1answer
90 views

Postgres idle connections: CannotAcquireResourceException

I have a web application in Java/ Wicket using Hibernate 4.1.1 and Spring 3.1.1 and Postgres 9.2. I also use spring transaction api and c3p0 connection pool. My Problem is that the available ...
1
vote
1answer
56 views

Spring hibernate insert race condition

I am currently having a race issue with Spring Hibernate (transaction by annotation on service and daoImpl classes). Here is what I have encountered: Tables: Device Type: id (serial), name Device: ...
3
votes
1answer
172 views

Transition H2 data to PostgreSQL

I am doing a transition from H2 database to PostgreSQL. As I found out - the SQL dump which is created when doing SCRIPT TO command on H2 contains several inappropriate constructions: Unicode data ...
4
votes
2answers
385 views

Call getNextException to see the cause : How to make Hibernate / JPA show the DB server message for an exception

I am using Postgresql, Hibernate and JPA. Whenever there is an exception in the database, I get something like this which is not very helpful as it does not show what really went wrong on the DB ...
0
votes
1answer
46 views

byte[] messed up in database

I have a SWT/Hibernate/Postgresql application, and I want to add an image in my database as a byte[] and display it. Here the relevant code to load the image in a bean. AFAIK, it works correctly. ...
0
votes
1answer
220 views

postgres - find out sql query from transaction id

I am running select * from pg_lock; to get transactions with exclusive locks. Once I know the transaction id that has exclusive lock, how can I find out sql query that is associated with that ...
5
votes
1answer
149 views

Hibernate + PostgreSQL: Lazy Loading with Exclusive Locks

Been tearing my hair out for a couple days over this one. We've been having some trouble with exclusive database locks causing performance problems in our production system for a while. I was able ...
1
vote
1answer
106 views

ERROR: stack depth limit exceeded - Java hibernate postgresql

I'm running in my jboss 5.1-java-jpa-hibernate-postgresql application a select query. This query is a UNION query of arroung 10 queries and normally for now it should return around 25.000 BigInteger ...
0
votes
1answer
71 views

PostgreSql database backup through Hibernate as persistence layer in web app

I have a Tomcat web server running a web application that uses PostgreSQL. All the manual process of the organization are automated through the web application with persistence layer as Hibernate. I ...
10
votes
2answers
349 views

Hibernate batch-delete vs single delete

EDIT: Based on some of my debugging and logging, I think the question boils down to why is DELETE FROM table WHERE id = x much faster than DELETE FROM table WHERE id IN (x) where x is just a single ...

1 2 3 4 5 9
15 30 50 per page