2
votes
1answer
32 views

why hibernate on oracle jdbc fails when postgre driver is present in tomcat lib folder

I've installed in the same Tomcat7 alfresco and some of my applications that use hibernate. In the lib folder I've ojdbc7.jar (for my apps) and postgresql-9.3-1100.jdbc41.jar for alfresco. Adding the ...
0
votes
1answer
20 views

Hibernate/JDBC hanging when connecting top PostgreSQL 9.3.1 on Amazon RDS

Last thing shown in logs is : 2013-12-01 19:40:00,454 DEBUG localhost-startStop-1 org.hibernate.engine.jdbc.internal.JdbcServicesImpl - Database -> name : PostgreSQL version : 9.3.1 ...
1
vote
1answer
29 views

Execution time of a Prepared statement's executeQuery() method vs. corresponding Stored procedure execution time

I have some middleware java code running on a Server machine that calls a Stored procedure insertMessageOne in a Postgresql database (9.1) on a remote machine. PreparedStatement sendOne = ...
2
votes
1answer
40 views

Concept design for a MMO java engine

We are building a HTML5 MMO that will leverage AJAX calls to a REST API written in Python for actions ( buy, sell, build, trade, send , attack). Our second part of this project is a Java Server that ...
0
votes
1answer
15 views

Password Hash validation/checking in DBMS vs. Web-app layer

I have the ability to do password hashing in the Web-app layer of my system or in the DBMS (postgresql's pgcrypto). Is there any advantage to using either or? For more context, I will be using ...
0
votes
0answers
20 views

BIT(1) HIbernate JPA mapping

In Postgresql I have a column with type BIT(1). In JPA mapping it's like: @Column(columnDefinition="bit(1)") private String type; But, when I perform tests, this error occurs: ERROR: column "type" ...
1
vote
1answer
32 views

Exception : Callable statement did not return any value

I have written a java code to call a stored procedure which returns some data. Following is the code - CallableStatement callableStatement = null; List<OutputDTO> outputDTOList = new ...
0
votes
0answers
40 views

Column index out of range when creating alias with criteria

Ok so I get this weird issue that I can't fix. I have 3 entities ( i will write things that only matters imo) @Data @Entity // all @ are in javax @Table(name = "a", schema = "pl") ...
-2
votes
1answer
22 views

how to check which ip address accessing my database on 5432 port [closed]

i want to monitor my postgres database running on 5432 port. i want to see which ip address is accessing this at what time using java. How to do this?
0
votes
1answer
34 views

postgres migration error; unterminated dollar-quoted string

Well this is abit strange, could anyone help me point out where this function may be wrong. I have a function similar to CREATE FUNCTION check_password(uname TEXT, pass TEXT) RETURNS BOOLEAN AS $$ ...
0
votes
0answers
27 views

liferay: create a table during run time

Description : i am trying to edit the web form portlet. But by default it store the values in expando tables but i want to store it in new table. but again i want keep this portlet as flexible as ...
0
votes
1answer
46 views

Application is getting stuck at hibernate txOracle.commit();

try { sessionOracle = BaseDAO.getHibernateSession().openSession(); sessionPostgres = BaseDAOgis.getHibernateSession().openSession(); int id = 0; JSONArray jaRoute = new ...
0
votes
0answers
23 views

Multiple access to the same shared database postgres sequence

I have two different java web application than access a shared postgres database for reading and writing. My first web application in deployed on apache tomcat and my second web application is ...
1
vote
1answer
40 views

String interning in the database

I am using a PostgreSQL database to log various aspects of a long-running system I have and one particular item I am logging is the CLASSPATH of the various sub-ordinate processes the system spawns . ...
0
votes
1answer
34 views

Switching between MongoDB and JPA (Postgres) in the same project

In our current project we use MongoDB. Recently there was a request to switch to Postgres. We don't want to drop MongoDB and just migrate to Postges right away. It would be great to have some sort of ...
2
votes
0answers
35 views

How to pass a set of composite types (UDTs) in PostgreSQL using JDBC

We are migrating from Oracle to PostgreSQL Enterprise DB and we have a stored procedure that accepts table-like structure. We used STRUCT with Oracle and it worked very well. Now this table is ...
1
vote
0answers
25 views

Hardware sizing an application which runs fine on a laptop?

If an application already runs well on a laptop with a local webserver and db, how does it impact hardware sizing for when it is deployed into product? We're piloting this application for the first ...
-2
votes
0answers
51 views

How to retrieve data from database in java? [closed]

I have an Excel.java class which has database connections and my task is that i need to retrieve data from database to whatever query i write !! So i created an jlabel.java class in the same package ...
0
votes
3answers
53 views

Java SQL query execution, problems in reading the ResultSet rows

I'm writing simple Java code and I have to execute an SQL query on my Postgresql database. The result of this database (I've checked manually) is a simple table made by one column and two integer ...
0
votes
1answer
17 views

Access to the original query through SQLWarning

I was wondering if there's a way to access the original SQL query from a SQLException/SQLWarning. I thought that that was unlikely, but the sentence Warnings are silently chained to the object whose ...
4
votes
1answer
81 views

Hibernate Spatial - 'Invalid endian flag value encountered' Exception

I'm trying to run a simple query in Hibernate Spatial 4.0 on PostgreSQL 9.3. I have a number of objects in a table with latitude/longitude values, and I'm trying to query objects that fall within a ...
0
votes
0answers
23 views

Parse postgres object literals

I'm working on a java/postgres project, and one of the db tables contains a fairly complex composite type. The project uses Ebean for O/R mapping, and I'm trying to map an ebean class to the table in ...
0
votes
1answer
61 views

Postgres DB can't connect to R with RJDBC

I've been trying to query data from a PostgreSQL DB via R. I've tried skinning the cat with a few different packages (RODBC, RJDBC, DBI, RPostgres, etc), but I seem to keep getting driver errors. ...
1
vote
1answer
67 views

Slow JBoss startup, possibly related to DataSource pointing to Heroku Postgres

I am observing a slow JBoss startup. Specifically there is a freeze in the startup when deploying my application, it seems during Hibernate initialisation: 22:43:00,066 DEBUG ...
0
votes
0answers
33 views

Android, take an entire row from postgreSQL database and put in a table or another structure

i'm new to Android programming but i made a little application that interacts with a postgreSQL database via JDBC e made things that aren't related to my question. My main question is: i have a table ...
1
vote
0answers
34 views

How do I log postgres driver messages with slf4j?

I'm using postgres db in my webapp. I added following dependencies in my pom.xml: <dependency> <groupId>org.slf4j</groupId> ...
0
votes
1answer
45 views

Hibernate + PostgreSQL + Network Address Type (inet, cdir)

I have started my example project with Hibernate 4.2.7 and PostgreSQL 9.3.1 and everything is going well. At the moment I would like to use INET PostgreSQL type but I am not able to map it with ...
0
votes
2answers
35 views

Using Hibernate to CREATE SCHEMA in PostgreSQL

All i want is to execute the following SQL on my PostgreSQL server after my Hibernate SessionFactory has been initialized: CREATE SCHEMA IF NOT EXISTS "fooschema" AUTHORIZATION "foouser"; Currently ...
0
votes
0answers
24 views

How can Fix the TypeNotPresentExceptionProxy exception in java?

I am working in a java application and got the exception while migrating my users from postrgre sql db from mongo db getting the exception for the particular id, 2013-11-15 17:08:21,036 ERROR ...
0
votes
0answers
43 views

Storing Malformed Unicode Strings in Postgres

I want to store a string like following in one of my database tables: ygei@kqmfNk@?w@Ac@l@}CbEoD|EM`@MLK@KCKS[e@W[[o@yAuCSUi@[G@KAII?MFk@?cAKWIQ?YFIDEd@cBzA}KvBuPX}B`BwLt@iFFEzE}AlDaA|JqC@y This is ...
2
votes
0answers
35 views

Hibernate: Creating an index for an ElementCollection table

@Entity public class FruitStore { @Id private Long storeId; @ElementCollection private Set<Fruit> fruits; } Of course, the Fruit class is marked @Embeddable. In the database (postgresql to ...
2
votes
2answers
32 views

One hour discrepancy in UTC offset between Postgresql and Java

I have a java program that generates timezone values in the binary format expected by Postgresql's COPY command in binary format. The data is written to a binary file which I then insert into ...
0
votes
1answer
32 views

Postgres sql error code for insert statement

A insert statement is generated in my java program that results in an error given as : ERROR: @20111@ SQL state: P0001 -- Executing query: insert into C_OrderLine (AD_Client_ID, AD_Org_ID, ...
0
votes
0answers
22 views

Postgresql server refuses connection despite authorizing it

I'm connecting to a Postgresql server (version 8.4) with a Spring application. My connection parameters are: <Environment name="/db/driver_class" value="org.postgresql.Driver" ...
0
votes
0answers
37 views

Postgresql org.hibernate.exception.SQLGrammarException: could not retrieve generated id after insert:

I have an application with Spring MVC and Hibernate, and had not given problem, lately I get problem when I delete a value and then want to add to the same table, the table use a sequence for id and ...
0
votes
0answers
43 views

postgres 9 | jdk 7.45 | irregular “No results were returned by the query”

this thing is making me stupid for nothing since yesterday (googled a lot without finding any other developer with the same problem). I'm upgrading an application server written in java (jdk5), which ...
0
votes
0answers
30 views

Getting error while updating an image into database using Java Spring

I tried the code below. I'm using both image and text for update, but I'm getting an application error. Can't infer the SQL type to use for an instance of this error I'm getting. QuestionRef ...
0
votes
1answer
57 views

JDBC - select where column is NULL

I have a simple table in my Postgres 9.0 database: create table test (id int not null, value int); I have populated it with a few rows: insert into test values (1, 1); insert into test values (2, ...
0
votes
0answers
28 views

alter column type from bytea to timestamp with data retention in a Postgres Database

The field in the java class looked like this : private LocalDateTime updateTime; However, Hibernate stores it in the database like this: (output of "select update_time from my_table;") ac ed 00 ...
0
votes
2answers
102 views

unable to create new database with flyway

Question: Is it possible to create a new DB in a migration script and then connect to it? How? My Scenario: I'm trying to use flyway in my Java project (RESTful application using Jersey2.4 + tomcat 7 ...
2
votes
2answers
78 views

PostgreSQL JDBC getGeneratedKeys returns all columns

I've recently switched from MySQL to PostgreSQL for the back end of a project and discovered some of my database proxy methods needed reviewing. To insert linked objects I use a transaction to make ...
0
votes
1answer
50 views

PGpoint hibernate (de)serialization exception

In my database I've this table: CREATE TABLE base_station ( MCC INT NOT NULL, MNC INT NOT NULL, LAC INT NOT NULL, CID INT NOT NULL, type TEXT NOT NULL, geoposition point NOT ...
0
votes
1answer
57 views

ClassNotFoundException (org.postgresql.Driver) with connection pooling example

I am using the sample code found here to implement Connection Pooling for my webapp: http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Plain_Ol'_Java Since I am using PostgreSQL as my database, ...
2
votes
2answers
78 views

Order By Date Desc with Spring Data

I try to make an application with Spring-Data-JPA on a table in order by DESC but it gives me an error: Invalid derived query! No property asc found for type java.util.Calendar Why ? ...
0
votes
1answer
20 views

Find ColumnDefinition Enum or Constants

I am looking a class that will contain the constants or enum for JPA columnDefinition. Ex: public class MyEntity { @JoinColumn(name = "my_value", columnDefinition = "BIGINT") private ...
1
vote
1answer
38 views

CallableStatement with parameter names on PostgreSQL

I've tried to call a stored procedure with parameter names specified, but the JDBC failed to accept the parameters. It says: Method ...
1
vote
0answers
41 views

Strange lock with PostgreSQL and Hibernate

I have a web application using Hibernate and PostgreSQL. In this application I have several entities and one of them is: @Entity public class UniverseTime extends Model { @Required public ...
0
votes
1answer
29 views

hadoop - DBInputFormat causing error when configuring object

I know that my error revolves around the fact that not all the nodes in my cluster don't see the Postgresql driver jar, but I don't know which file to edit to have the postgres jar visible to all ...
0
votes
0answers
30 views

tryit failure on slow query

I've been continuing to work on this, but I cannot run a query that runs for more than one minute. I need to do this. If this is possible, what do I need to do? I have the same problem using the ...
0
votes
1answer
80 views

Criteria: ClassCastException Integer to Long

I'm using Hibernate 4.2, and PostgreSQL. I have this table in postgres: id bigserial NOT NULL (chave primária) name text And my entity is: @Entity @Table(name="customer") public class ...

15 30 50 per page