Eager to Code, Enjoy to Debug ~ Embark into Each Stage with Your Heart

Archive for the ‘PostgreSQL’ Category

How to Reset Postgres Forgotten Password?

Posted by: Chyne on: September 28, 2009

Today, I was being asked whether I know any methods on how to retrieve or reset Postgres password. Although we had done some research but the provided solutions are quite confusing and not giving detailed explanations. We just left the research aside and continue with our work but I still feel this is doable. The [...]

“No suitable driver” for PostgreSQL

Posted by: Chyne on: September 6, 2009

Error message when performing a connection the postgreSQL database:

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.asip.servlet.ProcLogin.doPost(ProcLogin.java:73) // source code line that throws this error

Possible Root Causes & Solutions

The jdbc jar file is not yet added into the project.

Right click the project
Properties > Libraries > Add External JARs (Applicable for Eclipse)
Add the jar file (postgresql-x.x-xxx.xxx.jar)
Restart [...]

Failure in Connecting to Postgresql Database

Posted by: Chyne on: May 31, 2008

When I enter the password to access into the database, a failure message prompts out:-
An error has occurred:
Error connecting to the server: server closed the connection unexpectedly
This probably means the server terminated abnormally before or while processing the request.
Steps to Identify the Problem
1. Check postgresql log in C:\Program Files\PostgreSQL\8.2\pg_log
2. The log message shows the following:
2008-05-31 [...]

Primary Key Constraint

Posted by: Chyne on: March 22, 2008

Notes:

1. The primary key only can be set constraint during the creation of the table. Else it will display an error that the field returns null value and primary key cannot be created.
2. If you want to change the primary key after the table has been created, you have to drop the table and creates the table [...]


Friday’s Java Snack


In Java, "thread" means:

  • An instance of class java.lang.Thread
  • A thread of execution


An instance of Thread is just an object that has variables and methods, and lives and dies on the heap.
 
A thread of execution is an individual process that has its own call stack (one thread per call stack).

 

November 2009
M T W T F S S
« Oct    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Archives


  • Polprav: Hello from Russia! Can I quote a post in your blog with the link to you?
  • Alex: Huge Thanks! This bug has annoyed me for a long time.
  • Donnieboy: Just wanted to drop you a line to say, I enjoy reading your site. I thought about starting a blog myself but don't have the time. Oh well maybe one

StatCounter

free hit counters