Title says it all: Which JDBC jar should I use with java 1.5.0_16 and PostgreSQL 8.3.5?
|
I'm trying to vacuum my Postgres database by running the following SQL instruction within Java:
vacuum verbose analyze
Sometimes it just seems to "hang" is there any clean way to abort the process? ... |
can some one please tell me how to connect java file to postgresql database (if posible wit code n explanation)
|
I'm creating a test which will perform some stress testing of the app which talks to a Postgres database. In order to make it replicable I'd like to recreate the database ... |
Currently, I have an application that uses Firebird in embedded mode to connect to a relatively simple database stored as a file on my hard drive. I want to switch to ... |
I am busy with a project that requires me to read from a database and display certain results on mobile(J2ME). For example: I must list all customers in the database (SELECT ... |
I've been reading StackOverflow for quite a while now and I'm only now building the nerve to ask a question. I'm 20 years old and currently enrolled in college in IT ... |
|
Is there a way to disable the Postgresql translation of messages? I´m running my appl and Postgresql on a pt_BR Windows machine and when a exception is thrown the error message ... |
I inherited some code that is using the Apache commons-dbcp Connection pools in an OSGi bundle. This code works fine with Eclipse/Equinox OSGi version 3.4.3 (R34x_v20081215), commons-dbcp 1.2.2 and the postgres ... |
hi im using postgresql database, I want to insert my datas into database,but whenever i run the server,it was display the following Error.
Error:org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
How to solve ... |
Is there a way to update xpath_table in postgres or java
|
I want to store the Arraylist values into database(postgresql database) in java.
ArrayList<String> ActiveProcess = new ArrayList<String>();
ArrayList<String> InActiveProcess = new ArrayList<String>();
I want to ... |
greetings all
i want to know what's equivalent to Long data type in postgresql
which i can retrieve in a long variable.
|
I've seen this problem many places, that is to say the problem with programmatically making backups from PostgreSQL. My solution is to use ExpectJ, but I'm having trouble getting my code ... |
I've been searching for an answer, but no luck so far...
I want to perform bulk operations on a database with potentially millions of records, reading the PostgreSQL guide: '13.4 Populating a ... |
I'm trying to use the 8 threads from my new processor to handle transactions on the PostgreSQL database. It have to process geographic data in PostGIS, what I already do with ... |
In our application, we've implemented an automatic DB migration triggered from within our code. Now we want to backup the existing DB before doing any migration.
Can anyone explain how to ... |
Here is the latest code. I wanted to try something different but I am still getting the same results.
I am using postgres DB and I created a column called file with ... |
I've a problem with my sql query in PostgreSQL while I'm trying to join a lot of tables.
In section 'WHERE' I've a few conditions where I'm comparing some id values, e.g.
operator.agent_id ...
|
I have a running local instance of PostgreSql on a linux machine. When I use psql command from the shell I success to log in without any problem. I need to ... |
Let's say I have a table named transaction with transaction_date, deposit, withdrawal fields. There may or may not be transaction on a day but can have multiple transactions for each ... |
i searched many ways but i didn't get the information about how to write the data to a file when call the database function (postgresql) in the java program.. please clarify ... |
Possible Duplicate:
how to create a file using postgresql function call?
i want to create a text file when i call a postgresql function for first ... |
I'm running Mac OSX 10.6 with PostgreSQL 9.0. I wrote a simple Java application that insert an image in a bytea field and then query the same field to check it.
The ... |
I am trying to access a table from PostgreSQL present in other machine.
I am getting the following error.
Connection refused. Check that the hostname and port are correct and that the
postmaster ...
|
how can i create xml file from postgresql? i m new with this so help me.....
|
When I'm connecting to my database (PostgreSQL 8.2) through JDBC it gives an error ClassNotFound and something related to drivers. How do I fix this?
|
I have a Javascript widget that will be included on other websites. It displays information, identified by a few IDs. I'm planning on saving all the widget impressions (could be tens ... |
Postgres JDBC driver seems to not handle UTF-8 clobs correctly. When you retrieve the clob the characters are not correct (you get ? marks for non ascii characters).
Supposedly this is a ... |
ok, my code is written in java, and i am really new to java, so i hope my explanations are correct:
i have a java written web service that works with a ... |
I've got data in a large object, now I want to make a copy of it so I can append to it while keeping the copy of the original. Is ... |
In my current project i have an @Entity bean, with, among others, an int[] field, which should match an integer[] field in my postgres database.
However, upon persisting my object i get ... |
Postgresql has a geom_id that is basically an id generated by the latitude and longitude of a point on a map. How do I use that id to create a JSON ... |
I am working on building a web service from scratch with JDBC for postgreSQL. thing is that the operations given in the wsdl file do not show the corresponding database relation ... |
How to replace single quote in Java with Postgres?
select * from where id in ('<45646300.KDSFJJSKJSDF95'fdgdfgdfgd>', 'fdgdfgdg');
I always use params like
select * from where id = ?;
But in this case i have ... |
After many search on the subject I finally think the solution of my problem is to ask you.
So my problem is in the way to create logs on my web application ... |
I am using postgresql9.0 and JDK6.
I am running pg_controldata command in postgresql. in that I need "Time of latest checkpoint:" value. it is a date & time with timezone.
while running through ... |
I'm using JDBC to connect to a PostgreSQL database. We are trying to block access to the database for the users themselves; instead they should be forced to use our frontend. ... |
This code takes picture test.gif and puts the picture bit value into a bytea coloumn.
public void addImage() throws SQLException, IOException {
Connection con = openConnection();
...
|
I've been thrown in at the deep end a bit here, as I never expected I would have to do something like this and I have no idea where to start; ... |
Recently I made an application in using Swing, AWT and JDBC that manages some database. I used PostgreSQL as the backend with JDBC drivers to connect to the database. What I ... |
I’m really having trouble installing Pl/Java on Mac, any help would be appreciated.
I’ll describe the exact steps I’ve done in accordance with the README here, but I still get ... |
In my Java application I want to implement the option to dump/restore a PostgreSQL database. Some google research showed me that calling pg_dump/pg_restore via Java's ProcessBuilder is probably the best way ... |
I am following the example here
http://www.postgresql.org/docs/current/interactive/sql-fetch.html
And then looping the following command manually
FETCH FORWARD 5 FROM liahona;
in java. I have the above in an infinite loop and would like to ... |
I create a connection to a postgres 9 database using the stardard JDBC driver.
...
Connection myCon = DriverManager.getConnection("jdbc:postgresql://localhost/test?&user=test&password=test");
...
When I check the server status with PgAdmin and display all database sessions, I ... |
I have a database with a lot of web pages stored.
I will need to process all the data I have so I have two options: recover the data to the program ... |
Could some please suggest the best way to implement this:
Essentially what I want to have is a virtual-table in PostgreSQL that when queried, it looks up the data from some other ... |
I’ve been struggling with this problem a lot, and can’t figure out what’s going wrong.
Consider very simple PlJava code shown below, in order to call some Java function:
public class Org {
...
|
I’m implementing a function using the Pl/Java library, very similar to the one shown here: http://wiki.tada.se/index.php?title=Functions_returning_sets#Using_the_ResultSetProvider_interface
Now, everything works fine until I include some xpath code, see below:
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import ...
|
I have table with column "date" and type Date in format: "2011-09-06"
and i want to execute query:
select * from tvprograms where date=?
And I try this:
Date startDate;
java.util.Date date;
Calendar cal = Calendar.getInstance();
cal.set(2011, 9, ...
|
What would be the best way to insert XML data ,that i get from webpage, into Postgresql database? Im using Java and need little help finding good way to read this ... |
Some time ago, I started a new Java app wich function was to provide access to a remote DB, to browse, sort, filter and operate with some registers. To test it ... |
Here I am trying to create a method for the update function. But this part of the code, which works successfully for delete method, is not working for update method. Can ... |
So I had PostgreSQL working in Ubuntu 11.04 using 8.4(?), however, when I upgraded it also upgraded PostgreSQL to 9.1 and now I can't connect using JDBC.
I added the following to ... |
I have setup Streaming replication. WAL receiver and sender process are running.
I have made the entry for trigger_file in recovery.conf file.
When I trigger failover, Its creating trigger file but failover didnt ... |
normally i would solve this with a simple union. but this one has me. i have a table replicated to two different database engines. one copy in postgres, ... |
I have a very database-intensive application which runs for many hours and uses multiple threads, all talking to Postgresql via JDBC. The symptom I'm seeing is that occasionally (one to ... |
I have a table called Token in my database that represents texts tokenized.
Each row haves attributes like textblock, sentence and position(for identifying the text that the token is from) and ... |
I have created a set of SQL queries that modify a database, and now I want to test them.
How can I create a local and temporary PostgreSQL database to test my ... |
I am trying to customize the installation of JasperServer.
I have downloaded the source. I have deployed successfully using MySQL database. I want to use PostgreSQL and remove the MySQL database. ... |
I actually get the input source from PostgreSQL.
The table column type is bytea. I want to convert the byte back to original image.
BuffredImage bImageFromConvert = ImageIo.read(new ByteArrayInputStream(rsvalue.getBytes(10)));
ImageIO.write(bImageFromConvert, "jpg", new File("D:\\"+ ...
|
How do I stream large objects from PostgreSQL in JRuby?
|
If entity.getHistory() is null following code snippet:
(getEntityManager() returns spring injected EntityManager, database field history type is: text or varchar2(2000)
Query query = getEntityManager().createNativeQuery("insert into table_name(..., history, ....) values (?, ?, ?, ?, ...
|
Running NB 6.9.1 on XP box, PostgreSQL 8.4 on remote Ubuntu 10.04.1) box. PgSQL server is set up, and a blank database has been created. Attempting to register SQL server with: Host: jdbc:postgresql://host.company.com/schema.database Port: 5432 This gives an error message "DatabaseException: Unknown host". But I can ping the host successfully with the same string. Ubuntu box IS enabled for remote access ... |
|
Can netbeans 6.9 generate annotations for a SequenceGenerator for an entity class from PostgreSQL databse? Currently, I get this code: this code with annotation for entity class from a PostgreSQL database? @Entity @Table(name = "a_user") public class AUser implements Serializable { .... @Id @Basic(optional = false) @Column(name = "id") private Integer id; ... } But this code doesn't work with a ... |
Hello I'm new to both NetBeans and Java so i would realy appreciate the help. So I'm trying to connect to my Java Application (which is on Windows) a Postgresql database (which is on a virtual machine running Debian OS). The problem is even tough I've managed to link a table from the database to a Jtable when i run the ... |
Hello ! I have the same error with Netbeans and Postgresql: Please help me! run: [TopLink Info]: 2011.03.09 04:23:32.102--ServerSession(9814147)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007)) [TopLink Info]: 2011.03.09 04:23:32.836--ServerSession(9814147)--file:/C:/Users/gesti/Documents/accessdoors1/build/classes/-accessdoorsPU login successful [TopLink Warning]: 2011.03.09 04:23:32.890--UnitOfWork(4300037)--Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: ERROR: relation "public.doors" does not exist Error Code: 0 Call: ... |
|
|
|
|
Hi, I am very new to postgresql. I have project which is working right now with Oracle,I need to make it work with Postgresql. For this, (1)What should I need to download(I mean what version of database & which driver. Do I need type 4 driver)? Please note that I have windows professional 2000 on my computer. Thanks, Angela |
|
We've been using a servlet/JSP app with a commercial database for a couple of years, but the db has been giving us trouble and we're thinking about moving, but what to we don't know. Right now, we just have a single Windows web server running Tomcat and a Linux server running our db. We're taking a hard look at PostgreSQL, but ... |
|
|
Hi, I have written a JSP page and using PostgreSQL database.Now i want to connect to PostgreSQL using JDBC.I have used the driver : org.postgresql.Driver as Class.forName("org.postgresql.Driver"); con=DriverManager.getConnection("jdbc:postgresql://192.168.15.139:8080/MGS","username", "password"); I am not able to display the JSP page.I am getting the error as : java.lang.ClassNotFoundException: org.postgresql.Driver at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at project.mgs.MyDriver.getConnection(MyDriver.java:11) ... |
|
Database tables don't have a "size". At least, not one you can do anything about. The only "size" I can think of for a database table is the number of rows. But what's this "cell" thing you are asking about? It rather looks like you are asking about some form of display. Please provide more details so we can move this ... |
|
Hi all, I'm relatively new to Java and have the following problem with accessing a Postgresql database. I connect to the database and do a select, then iterate over the result set and build objects from the data. This works without a problem when the select returns only a few rows, but when I get a really large result (ca. 380,000 ... |
|
Hi Folks, Im not sure whether this is the right place to post .Im facing a problem while using prepared statement along with the update query (I use Postgresql.).I've placed my code below, public DomainBean updateDB(DomainBean bean) throws Exception { Connection con = null; PreparedStatement stmt = null; ResultSet rs = null; DomainBean domainBean = new DomainBean(); int result = 0; ... |
|
Hi All, I'm trying to write a preparedstatement query as below. String query= "SELECT count(*) over () as ROWCOUNT, CONSUMER_ID,WENEXA_ID,CONSUMER_NAME,CONTACT_NO,residing_village " + "from db_consumer " + "WHERE (lower(CONSUMER_NAME) LIKE (lower('%"+name+"%'))OR (lower('" + name + "')='')) " + "AND (lower(RESIDING_VILLAGE) LIKE (lower('%"+village+"%')) OR (lower('" + village + "')='')) " + "AND (lower(WENEXA_ID) LIKE (lower('%"+wenexaid+"%'))OR(lower( '" + wenexaid + "')='')) LIMIT '"+pageLimit+"'OFFSET '"+pageOffset+"'"; ... |
Komo (Hawaiian for "enter") is a basic client user interface on which custom client UI applications can be built. It is customized for PostgreSQL but minor changes would allow it to be used with other client-server RDBMS systems. It includes basic program functions, advanced UI features (such as searchable help, welcome screen, splash screen, preference pages, wizards), database connectivity via JDBC, ... |
i am faced with a decision of either a massive code overhaul or a nasty method/program to convert my Oracle based queries into a Oracle9i / Postgresql friendly manner. the issue- all my code was initially written against oracle7, oracle8i using sql queries that ran in these databases, for clients that used them. honestly, there is over a couple hundred thousand ... |
I'm using Postgresql 7.2, Tomcat 4.1.24, JDK1.4.2 on Linux. I set the charset to SQL_ASCII in the connection string for the JDBC driver. This used to work on Tomcat 4.0.3 and JDK1.3.1. The database contains characters like the copyright sign, and the funny upside-down quotes that MSWord uses. These now display on the site as ? instead of the correct characters. ... |
Hello, I need some help. I have installed SQL code to add PostgreSQL support to MS Project from http://techdocs.postgresql.org/source.php#fmsproject. MS Project can write data to PostgreSQL but when read project data, every fields containing date/time (eg task_start_date, task_stop_date) are not read. MS Project inserts in this fields default date/time. I have checked that in database all data/time fields are witten correctly ... |
I am trying to access a PGSQL DB via JDBC and have had no success. My environment is as follows: RH9 (kernel 2.4.20) j2sdk1.4.2_01 PostgreSQL 7.3.4 I have tried accessing the DB via the psql.java app provided by PGSQL with no success. Any other attempts with other java progs does not work either. The URL's that have been tried so far ... |
Hi I'm looking for a way to write a java program which can access a PostgreSQL databse. The catch is the database only has unix domain sockets. I'm specifically avoiding opening up TCP sockets as that will cause a lot of complication with authentication. Before I dive into JNI myself, is anyone aware of an existing PostgreSQL driver for java (JDBC ... |
|
|
Hi there .. Im new in java ... i want to show some data from a data base that it was create en postgresql. Im using a framework that is called ZK i made my model of my page with this framework. Now i create a class to connect Postgre with Java ... but now i don't now what to do! ... |
|
Hi I am trying to connect java to postgresql. my code is working fine on RHEl4 but there is problem on Fedora core 4. i am not able to understand what could be the reason. All my settings are same as i did on linux. the exception came is java.net.SocketException: Invalid argument or cannot assign Can anyone plz help??? its very ... |
I've got Netbeans 5.5 with Postgresql 8.1.5 installed. I'm using the postgresql-8.1-408.jdbc3.jar file to connect to my Postgesql db. It does connect and allows me to create new tables, but it never shows the tables which are in that database. This works for Mysql fine, but not Postgresql, is there some switch or something I've forgotten to set? How can I ... |
here's my dbConnect.class: /* * dbConnect.java * * Created on November 14, 2006, 5:06 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ /** * * @author darkoasis */ package csfwdbillingmodules; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.SocketAddress; import java.net.SocketException; import java.net.SocketImpl; ... |
|