postgresql « Database « JPA Q&A





1. "No suitable driver" problem with Hibernate3, PostgreSQL 8.3 and Java 5    stackoverflow.com

Does anybody know what's going on here: I run hibernate 3.2.6 against a PostgreSQL 8.3 (installed via fink) database on my Mac OS X. The setup works fine when I use Java ...

2. Hibernate talking to different databases    stackoverflow.com

I need my app to talk to two different databases, which themselves are replicated(using Postgres streaming replication). The reason is that I want to have all the reads happening against one ...

3. Hibernate and Postgresql 9.0 with Java    stackoverflow.com

I have an application that gathers a bit of it's data using entities created with hibernat, The rest is gathered with a simple jdbc database connection and sql statements. Saving is ...

4. org.hibernate.NonUniqueObjectException    stackoverflow.com

I have an error when I want to delete an object from database. The error is:

org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.cartif.database.ApplicationField#asd]
To ...

5. Hibernate BatchUpdateException on a PostgreSQL DB    stackoverflow.com

I'm trying to update a row in my PostgreSQL database and I'm getting a java.sql.BatchUpdateException from Hibernate. I'm able to read the data without any problems, and if I paste ...

6. How to turn on asynchronous I/O in PostgreSQL from hibernate?    stackoverflow.com

I want the inserts/updates to run asynchronously (kinda like the default mongodb style) to increase performance. My data access is all from hibernate so I want to achieve this from there. ...

7. is there any benefits for using ORDBMS instead RDBMS behind JPA    stackoverflow.com

Today I reviewed postgreSQL wiki and I found it is a ORDBMS (object-relational database management system), so I want to know is there any benefits for using postgreSql (RDBMS) behind the ...

8. Broken pipe with PostgreSQL    stackoverflow.com

First of all, I already read posts relating to this error prior to posting this question. However, most of them are not using PostgreSQL, so this error might be handled differently. ...

9. Trouble with Hibernate3 & Postgresql 8.0.4    coderanch.com

A friendly place for programming greenhorns! Big Moose Saloon Search | Java FAQ | Recent Topics Register / Login Win a copy of REST API Design Rulebook this week in the Web Services forum or Java SE 7 OCP Upgrade Training Lab in the OCPJP forum! JavaRanch Java Forums Java Object Relational Mapping Author Trouble with ...





10. Hibernate and Postgresql    coderanch.com

Hi, I am trying to test hibernate with postgres and each time I get an error. Dialect class not found. I think I am missing a jar file. Can someone please help? thanks I am posting the ant run output.... run: [java] 04:02:57,981 INFO Environment:543 - Hibernate 3.3.0.SP1 [java] 04:02:58,001 INFO Environment:576 - hibernate.properties not found [java] 04:02:58,011 INFO Environment:709 - ...

11. Hibernate and PostgreSQL    coderanch.com

Hello All, I'm not really sure if I can ask this question in this forum. Anyway, I'm trying to connect to a PostgreSQL db through hibernate 3 and create a simple table. I'm able to run the code without any error, but no table is getting created. Of course Hibernate related output are not getting generated. Here is the code. package ...

12. Problem in executing procedure using hibernate and postgreSQL db    coderanch.com

Hi , I m trying to execute a procedure using hibernate. My dataabse is postgreSQL and i m using hibernate 3.0. This is my below code. java.sql.Connection con = session.connection(); java.sql.CallableStatement cs = con.prepareCall("select sampleFunc1(:param1)"); cs.setInt("param1",1); cs.executeQuery(); con.close(); I know the xml way of executing the procedure . but in my case the procedure name will come from runtime . so ...

13. hibernate problem with store procedure (postgresql 8.4)    forum.hibernate.org

hi, I get problem when call store procedure at postgresql8.4, and try to solve for several days. Pleas help me if you have any idea. ****** Dandelion_vermouth.hbm.xml ******** Code: ...

14. PostgreSQL varchar limit    forum.hibernate.org

Use your own Dialect. Extend PostgreSQL dialect and call method registerColumnType( Types.VARCHAR, "varchar(8000)" ); in the constructor. This will generate varchar(8000) for all column (even if you set lengts manually). Or override method public Dialect#getTypeName(int code, int length, int precision, int scale) throws HibernateException { if (Types.VARCHAR == code) { } }

15. PostgreSQL Hibernate and SSL    forum.hibernate.org

Hmm, that's not the answer I was hoping to hear. I am not the DBA and cannot turn off SSL. I am not the SA for the box in production so I cannot forward ports. I was hoping Hibernate would own the DB connection and would connect using SSL. Perhaps a flag or setting can be turned on to tell it ...

16. java hibernate, Postgresql, NO_WAIT    forum.hibernate.org

The problem is due to the fact that current version of Hibernate does not have nowait in its dialect, if you go have a look at the source code you will see that the methods that is supposed to append "for update nowait" string will instead delegate to the method that appends the regular string. You can create your own dialect ...





17. Hibernate character encoding, postgresql    forum.hibernate.org

18. Hibernate and PostgreSQL 8.4.4    forum.hibernate.org

I recently took an EJB 3 application from MySQL to PostgreSQL. When I try to run the first part, I get an exception that looks like the following: 2010-09-08 15:16:48,658 ERROR [org.hibernate.util.JDBCExceptionReporter] (http-192.168.1.22-8080-1) Batch entry 0 insert into EJB3.DistributionCenter (addressLine1, addressLine2, city, description, state, zipCode, zipCodePlusFour, distributionCenterId) values ('10234 E. Side Street', NULL, 'Seattle', 'Washington Distribution Center', 'WA', '98101', '0', '10000') ...

20. Problems with Hibernate Discriminators and postgreSQL    forum.hibernate.org

Hi, I have a problem with Hibernate's "single tables" and the last postgres jdbc driver. It seems that now, driver adds a "returning *" when there is an Insert, instead of a returning [identifier] that seems more cleaner and doesn't return all the fields. Because of the added "returning *", it crashes when there is an Insert in a table with ...

21. postgresql    forum.hibernate.org

Dear all I am connecting to postgresql via hibernate. I can create tables and drop them but I cannot insert data into the tables. The log message shows every thing is correct and ends with this message : Hibernate: insert into contact (FIRSTNAME, LASTNAME, EMAIL, ID) values (?, ?, ?, ?) But nothing is inserted into the databse! Also the "hibernate.hbm2ddl.auto" ...

22. Hibernate, Postgresql and int8/int2 issue    forum.hibernate.org

Hi, i use Long for all my object ids and therefore they are mapped as int8 in postgresql. It's a known issue that you have to explicitly cast into int8 when you pass a parameter if you wish to use the index with Postgresql. Example: - select * from foo where id=100; // will not use pk index - select * ...

23. Hibernate, PostgreSQL, Unicode/UTF-8    forum.hibernate.org

hi I am actually not sure if this is a *my* problem or one of Hibernate or PostgreSQL...but maybe someone experienced can help me out ;-). I created a PostgreSQL database (encoding UNICODE), insert java string with (great) Hibernate and read the string afterward a give them out on a HTML page with UTF-8 encoding. Things work quite fine, I can ...

24. replicating Hibernate in PostgreSQL    forum.hibernate.org

I'm replicating a postgreSQL 7.3.2 database using erserver 1.2 that contains Hibernate 2.1 and am having constraint issues. It seems that erserver does not apply the changes to the standby database in the same order that they are done to the online, so we were getting constraint violations. I fixed it by dropping the Hibernate constraints on the standby database server ...

25. one-to-many problem in postgresql    forum.hibernate.org

Hello everybody, This is my hbm.xml file: I have two table <> and <>. One Belt can have many customers. When i run the above hbm.xml file under mysql it creates <> ...

26. Postgresql's inet type, ipv4/ipv6/mac    forum.hibernate.org

Hi! I've failed to find (google and this forum) a working example where Hibernate maps the postgresql type INET. Have anyone seen work being made on this anywhere, 'cause I've failed to find that as well. The way to do it would of course be to create a new Type, but without looking much into it, that seems to be a ...

27. java.lang.AbstractMethodError: postgresql.DatabaseMetaData..    forum.hibernate.org

I'm a new user. I'm using: WIN XP Postgres 7.2.1 (jdbc6.3.jar) 2sdk1.4.2_02 hibernate-2.1 My hibernate.properties: hibernate.dialect net.sf.hibernate.dialect.PostgreSQLDialect hibernate.connection.driver_class postgresql.Driver hibernate.connection.url jdbc:postgresql:template1 hibernate.connection.username user hibernate.connection.password hibernate.query.substitutions yes 'Y', no 'N' I suppose it's trivial but when I try to "build eg" I get: [java] 12:29:26,703 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not ...

28. postgresql slow?    forum.hibernate.org

Newbie Joined: Fri May 07, 2004 2:18 am Posts: 19 Hello I have spent the last 2 months becoming familiar with hibernate and at this point I can honestly state that it performs as advertised. The learning curve is a little steep. More from having to glean snippets of examples than from any inherent complexity. My personal experience with it was ...

29. Hibernate and PostgreSQL 8.0    forum.hibernate.org

30. PostgreSQL, VARCHAR, and length    forum.hibernate.org

Just a quick question; I have a String property that I have written the XDoclet tags for: Code: /** * @hibernate.property update="false" * insert="false" */ public String getChr() ...

31. Problems with postgresql and hibernate    forum.hibernate.org

Newbie Joined: Tue Aug 24, 2004 1:14 pm Posts: 14 Hibernate version: 2.1.4 Mapping documents:

32. Postgresql encode base64    forum.hibernate.org

Hi, I have a natie postgresql (7.4.1) query which encodes a byte[] column into base64 as follows: "Select encode(a.artist_photo, 'base64') from artistimagestbl a where a.artistimage_id=" + artistimage_id; My question is, is there any way I can specify in my hbm.xml map that the artist_photo column should be encoded a base64 without having to specify a native query? regards Andrew

33. wird problem with postgresql and hibernate    forum.hibernate.org

Newbie Joined: Mon Nov 08, 2004 6:41 pm Posts: 5 Location: Asuncion, Paraguay Hibernate version: 2.1.6 I can connect throw a jdbc3 driver to my postgresql 7.4 but hibernate can open a jdbc connection. I'm a new hibernate user and i tried some examples. This same example that i am going to post here works with firebird 1.5 ss and MySQL ...

34. PostgreSQL with DBLink and Hibernate    forum.hibernate.org

35. PostgreSQL 8.0 PerformanceTest incredibly slow (unusable)    forum.hibernate.org

Author Message simon.nicholls Post subject: PostgreSQL 8.0 PerformanceTest incredibly slow (unusable) Posted: Tue Jan 18, 2005 7:26 am Newbie Joined: Tue Jan 18, 2005 6:59 am Posts: 1 Hibernate version:3.0beta1 Name and version of the database you are using:PostgreSQL 8.0.0-rc5-3 First & foremost, thanks for all the brilliant work that people have put into Hibernate. I've used it in ...

36. Postgresql Increment problem    forum.hibernate.org

Hi there I use increment for id generator for Postgresql 7.4 ... Hibernate version is 2.1.6 My application is a desktop one. 4-5 clients are using the application via network sharing. I mean they run same files from a sharing server. After some insertions, i am getting the following duplicate key error.. Is there anyone who encountered this problem? can sharing ...

37. java.lang.AbstractMethodError: org.postgresql.jdbc1.Jdbc1Dat    forum.hibernate.org

Hi, i am a little stuck. I hope it is not a PostGresql Issue. (postgresql 7.3). I've got an error message, just after my connection. I am supposed to retrieve an user identified by his username, just after that. Here are some logs : INFO - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) ...

38. PostgreSQL configuration problem    forum.hibernate.org

39. Trouble w/ PostgresQL & implicit index creation    forum.hibernate.org

I'm using Hibernate 2.1.7 with PostgresQL 7.4.7-5 on Debian Linux. My goal is to produce a unique key constraint on fields 'name' and 'scope'. Once I generate the DDL from my mappings and deploy it via 'psql', I see a message indicating that psql created an implicit index on the name field defined as a property. This is not what I ...

40. Hibernate, Mac OS X Tiger, and PostgreSQL not getting along    forum.hibernate.org

Newbie Joined: Thu Jul 07, 2005 4:20 am Posts: 2 Location: San Francisco, CA I'm still in the process of reducing my problem down to a minimal test case, but it's sufficiently annoying and difficult to track down that I thought I'd throw up a first posting to see if anyone else in the Hibernate community had encountered it yet, and ...

41. More information on How to Hibernate with PostgreSQL    forum.hibernate.org

Hi All, I am trying to configure Hibernate with PostgreSQL 8.0.0, and I am following the "Getting Started" instructions as shown here: http://www.hibernate.org/152.html I was able to download, unpask hibenate, placed the JDBC driver for PostgreSQL (for jdk 1.5 and PostgreSQL 8.0.0) postgresql-8.0-311.jdbc3.jar in the lib folder of hibernate3.0. Next I edited the hibernate.properties file which looks like this: ## PostgreSQL ...

42. Accessing postgresql db    forum.hibernate.org

Hello, first of all, i have created a database in postgresql, and accessing through the hibernate, for the database of 20+ tables, i use one indexing number. Will that gives any preformance problem if so , how can i over come it? and i'm try to create a second database, and try to access it via hibernate as well, how could ...

43. SQLGrammarException using PostgreSQL 8.0.4    forum.hibernate.org

Full stack trace of any exception that occurs: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:59) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:181) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:324) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:86) at com.synesis7.i3.versioncontrol.TPDR.testTpdr(TPDR.java:45) at com.synesis7.i3.versioncontrol.TPDR.main(TPDR.java:20) Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into public.ChangeCase (StartPos, EndPos, ChangeDt, OrigText, ProblemText, ChangeCaseId) values (1, 10, 2005-10-19, TEST TEXT, MORE ...

44. generateSchemaUpdateScript and PostgreSQL    forum.hibernate.org

Hi, I've been playing with the Configuration.generateSchemaUpdateScript method and realised that the update sql output was always generating CREATE SEQUENCE statements for all sequences needed by the mapping document even when those sequences were clearly existing in the database. I then had a further look and saw that the PostgreSQLDialect doesn't overwrite the getQuerySequencesString() method and hence a call to this ...

45. Hibernate3 + Postgresql 8.0.4 Issue    forum.hibernate.org

Author Message faisalmahmoud Post subject: Hibernate3 + Postgresql 8.0.4 Issue Posted: Fri Dec 30, 2005 10:35 pm Newbie Joined: Fri Dec 30, 2005 10:21 pm Posts: 2 Hi, I am writing a web app with the following technologies: Java 1.4.2 Tomcat 5.0.28 JSF 1.1_01 Spring 1.2 Hibernate 3 PostGreSql 8.0.4 I'm having trouble retrieving items from a database table ...

46. Hibernate, PostgreSQL&pgPool - Strange Behavior (or C-JD    forum.hibernate.org

Hibernate version: 3.1 Name and version of the database you are using: pgPool 2.6.5 & PostgreSQL 8.0.4 Hello, we have some Problems with our actual Environment: Hibernate 3.1 pgPool 2.6.5 PostgreSQL 8.0.4 OS SuSE Linux Enterprise Server 9 SP2 Java 1.4.2_09 We are using pgPool for failover and replication, but it doesn't work with Hibernate (using the C3P0-Connection-Pool). It is configured ...

47. Configuration Hibernate with postgresql on linux    forum.hibernate.org

Hello all !!! I used hibernate 3.0 with postgresql on linux this is my configuration file : hibernate.cfg.xml ////////////////////// postgresConnection jdbc:postgresql://localhost:5432/myDB postgres org.postgresql.Driver org.hibernate.dialect.PostgreSQLDialect //////////////////////////////////////////// and this is my ...

48. connexion une base PostgreSQL    forum.hibernate.org

49. Usage of postgresql with hibernate and UTF8 encoding    forum.hibernate.org

Good day all, I am using postgresql 8.1 with UTF-8 database, with tables that have texts in hebrew and other non-latin languages. I wrote an HBM file that maps a POJO to one of the classes (I'm using hibernate 3.0 with J2SE 5.0) The POJO has fields of "username" and "password" I would like to obtain a "username" from a record ...

50. Hibernate with PostgreSQL Arrays    forum.hibernate.org

Is it possible to use PostgreSQL arrays with Hibernate? I have this table: CREATE TABLE test ( test_id INTEGER NOT NULL PRIMARY KEY, test_arr VARCHAR[] ); How can I map test_arr column? I tryed to use a single String (and use a formated array as content) but I can read but cannot write. The databes reports this error: "column "teste_arr" is ...

51. Creating Postgresql DB fails    forum.hibernate.org

Hi, I have a hibernate mapping here that works perfectly fine with mysql and MS SQL server, but when I try to create the database structure in a postgresql database it fails. I looks like the order in which the tables are created is not right, the errors I get are at the end of the post. Any idea how to ...

52. Hibernate and Postgresql-8.2    forum.hibernate.org

Problem is that all my app was perfectly running with postgresql-7.4 and as i move to postgresql8.2 (and change jdbc driver) some unexpected errors appear. Errors like 'such column does not exist, even having checked once and again that it exists. [post replicated at postgresql forums] BELOW INFO DATA::: Hibernate version: hibernate-3.2.5.ga.tar.gz Mapping documents: N/A Code between sessionFactory.openSession() and session.close(): N/A ...

53. PostgreSQL problems    forum.hibernate.org

Newbie Joined: Fri Feb 15, 2008 7:52 am Posts: 1 Hi all, I'm new to Hibernate and the forum ;) I'm trying to make an application using the Spring Framework, Hibernate and Postgre SQL. But I stumbled upon a problem that i can't solve. The problem I have is that the query that is generated by Hibernate doesn't seem to be ...

54. Problem with hibernate while using PostgreSQl as database    forum.hibernate.org

Hello all, I am facing the following exception while using the hibernate with postgresql what may be the problem. While i connect with MySQl its perfect.bcoz for mysql the table name start with "_".for postgre sql table name starts with ".." . Hibernate: select this_.durationID as durationID0_, this_.ruleinfoID as ruleinfoID13_0_, this_.itemID as itemID13_0_, this_.flag as flag13_0_ from ..duration_log this_ com.mchange.v2.c3p0.impl.NewPooledConnection@7ff5b6 invalidated ...

55. Migrate to PostgreSQl Problem    forum.hibernate.org

Hello all, My project is currently working fine with MySql through hibernate ,but now i want to mygrate my project to postgresql I change the driversettings and the username and password i am not able to connect and work with postgresql any come across with this please share with me. Regards, Venkat

56. PostgreSQL and VARCHAR length    forum.hibernate.org

Is there any good way for my custom PostgreSQL dialect to express that I want the default varchar length to be unlimited - that is, to have Strings map to "varchar" by default rather than "varchar(255)"? In PostgreSQL the length specification is entirely optional (only useful as an actual constraint), so I'd rather be rid of it rather than have to ...

57. PostgreSQL enumerated types    forum.hibernate.org

Hi, I would like to map a Java enum to a table column defined as a PostgreSQL enumerated type. Is this possible? The following is my SQL: create type day as enum ('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'); create table date ( ... day day not null ...); And the following is my Java code: public enum Day { Monday, ...

58. Problem With Postgresql 8.4    forum.hibernate.org

Hi, I'm having problems with postgresql 8.4 and hibernate. I have this table tbl_user but i have a problems. The database's name is moonstone and i created a schema under it named cctilos. the query that hibernate produces looks like this update cctilos.tbl_user set is_login = 0 it always says that is_login column does not exist. When i try to run ...