csharpdotcom wrote:
> Hi - I've been using JSF with Glassfish successfully for the last few
> months, but up to now have not tried to use databases with it, which
> I'm now trying for the first time. Before I try writing any code, I
> wanted to test out the code in chapter 10 of "Core JavaServer Faces"
> to see if database access works with my configuration, and it does
> not!
>
> I configured the server as given in the book, and specified the JNDI
> name as "jdbc/mydb", and compiled the code provided, created a war
> file and deployed it. Online I found a file called
> "postgresql-8.3dev-601.jdbc4.jar.zip", copied it to my "/glassfish/
> domains/domain1/lib/ext/" folder, as instructed and started the server
> and the application. However, after starting the application and
> attempting to log in on its test page, I get the "Internal Error"
> message produced by the code. In checking the log at localhost:4848 I
> get various error messages saying that the connection was refused,
> including that I should check TCP/IP.
>
> Could someone kindly advise me on what is going wrong, as until I can
> get an example running from the book, I can't go any further. The book
> says on page 466 that I first have to create a table with a few
> entries, with an example given, but nothing is said as to how I can do
> that.
>
> Some help would be most appreciated.
The error seems to indicate that there is nothing wrong with your JDBC
driver but it just can't connect to a PostgreSQL database server. Is
that up and running and did you configure the correct JDBC connection URL?
Regards,
Silvio Bierman


|