pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem connecting to a pgsql database from Net Beans.
4+ messages / 4 participants
[nested] [flat]

* Problem connecting to a pgsql database from Net Beans.
@ 2007-08-30 01:53 Flavio Monteiro <flaviopinto.monteiro@gmail.com>
  2007-08-30 09:48 ` Re: Problem connecting to a pgsql database from Net Beans. Albe Laurenz <all@adv.magwien.gv.at>
  2007-08-30 10:30 ` Re: Problem connecting to a pgsql database from Net Beans. Mayuresh Nirhali <Mayuresh.Nirhali@Sun.COM>
  0 siblings, 2 replies; 4+ messages in thread

From: Flavio Monteiro @ 2007-08-30 01:53 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

now I've copied "postgresql-8.2-506.jdbc3.jar" into "/opt/SUNWappserver/lib"
and Im getting a less scaring log:

RAR5038:Unexpected exception while creating resource
RAR5117 : Failed to obtain/create connection. Reason : Connection could not
be allocated because: FATAL: database "null" does not exist
RAR5114 : Error allocating connection : [Error in allocating a connection.
Cause: Connection could not be allocated because: FATAL: database "null"
does not exist]
java.sql.SQLException: Error in allocating a connection. Cause: Connection
could not be allocated because: FATAL: database "null" does not exist
StandardWrapperValve[ClientInfo]: Servlet.service() for servlet ClientInfo
threw exception
java.lang.NullPointerException
        at org.ClientInfo.doGet(ClientInfo.java:38)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(
ApplicationFilterChain.java:397)
        at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:278)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:536)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(
StandardContextValve.java:240)
        at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:179)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:566)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:182)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:566)
        at com.sun.enterprise.web.VirtualServerPipeline.invoke(
VirtualServerPipeline.java:120)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:939)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:137)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:536)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:939)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(
CoyoteAdapter.java:239)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(
ProcessorTask.java:667)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(
ProcessorTask.java:574)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(
ProcessorTask.java:844)
        at
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(
ReadTask.java:287)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(
ReadTask.java:212)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(
TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(
WorkerThread.java:75)



-- 
Flavio Monteiro

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problem connecting to a pgsql database from Net Beans.
  2007-08-30 01:53 Problem connecting to a pgsql database from Net Beans. Flavio Monteiro <flaviopinto.monteiro@gmail.com>
@ 2007-08-30 09:48 ` Albe Laurenz <all@adv.magwien.gv.at>
  1 sibling, 0 replies; 4+ messages in thread

From: Albe Laurenz @ 2007-08-30 09:48 UTC (permalink / raw)
  To: Flavio Monteiro *EXTERN* <flaviopinto.monteiro@gmail.com>; pgsql-jdbc

Flavio Monteiro wrote:

[tries to use org.postgresql.ds.PGSimpleDataSource with an application
server or something]

> RAR5038:Unexpected exception while creating resource
> RAR5117 : Failed to obtain/create connection. Reason : Connection
could not be allocated because: FATAL: database "null" does not exist

I *guess* that there is someplace in "NetBeans" where you can configure
DataSource properties.
These are the properties:
http://jdbc.postgresql.org/documentation/82/ds-ds.html#ds-ds-props

I *guess* that you didn't specify "databaseName".

You can probably get better information about the NetBeans end of things
from their documentation...

Yours,
Laurenz Albe



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Problem connecting to a pgsql database from Net Beans.
  2007-08-30 01:53 Problem connecting to a pgsql database from Net Beans. Flavio Monteiro <flaviopinto.monteiro@gmail.com>
@ 2007-08-30 10:30 ` Mayuresh Nirhali <Mayuresh.Nirhali@Sun.COM>
  1 sibling, 0 replies; 4+ messages in thread

From: Mayuresh Nirhali @ 2007-08-30 10:30 UTC (permalink / raw)
  To: Flavio Monteiro <flaviopinto.monteiro@gmail.com>; +Cc: pgsql-jdbc

Flavio,

I am not NB expert, but I find it useful to setup my DB connections the 
following way,

Before, Configuring Connection Pool to your application, I prefer 
setting up the Database connection itself with the specific DB 
driver/datasource. I am using NB 5.5 as of now.

1. go to 'Runtime' tab, Click on 'Database'. Expand 'Drivers'. If you do 
not have your PG driver setup, set a new Driver by doing right click on 
'Drivers' -> 'New Driver'. Here, you could specify the location of the 
pgjdbc jar file and you need not worry about keeping that in specific 
directory.

2. Now, to setup DB connection, right click on 'Database', 'New 
Connection'. Follow the next screen and your connection should be ready, 
if things go well, NB will also test your connection as it will report 
if the connection has been established or not.

I found this to be pretty useful.
HTH

Mayuresh

Flavio Monteiro wrote:
> Hi,
>
> now I've copied "postgresql-8.2-506.jdbc3.jar" into 
> "/opt/SUNWappserver/lib" and Im getting a less scaring log:
>
> RAR5038:Unexpected exception while creating resource
> RAR5117 : Failed to obtain/create connection. Reason : Connection 
> could not be allocated because: FATAL: database "null" does not exist
> RAR5114 : Error allocating connection : [Error in allocating a 
> connection. Cause: Connection could not be allocated because: FATAL: 
> database "null" does not exist]
> java.sql.SQLException: Error in allocating a connection. Cause: 
> Connection could not be allocated because: FATAL: database "null" does 
> not exist
> StandardWrapperValve[ClientInfo]: Servlet.service() for servlet 
> ClientInfo threw exception
> java.lang.NullPointerException
>         at org.ClientInfo.doGet(ClientInfo.java:38)
>         at javax.servlet.http.HttpServlet.service (HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
>         at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
>         at 
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke 
> (StandardPipeline.java:536)
>         at 
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
>         at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java 
> :179)
>         at 
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>         at org.apache.catalina.core.StandardHostValve.invoke 
> (StandardHostValve.java:182)
>         at 
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at 
> com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>         at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>         at org.apache.catalina.core.StandardPipeline.doInvoke 
> (StandardPipeline.java:566)
>         at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service 
> (CoyoteAdapter.java:239)
>         at 
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>         at 
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java 
> :574)
>         at 
> com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>         at 
> com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>         at 
> com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>         at 
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run 
> (WorkerThread.java:75)
>
>
>
> -- 
> Flavio Monteiro 




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Problem connecting to a pgsql database from Net Beans.
@ 2007-08-30 15:39 Bob <luckyratfoot@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Bob @ 2007-08-30 15:39 UTC (permalink / raw)
  To: pgsql-jdbc; flaviopinto.monteiro@gmail.com

Show us your code that you are using to connect with.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2007-08-30 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-08-30 01:53 Problem connecting to a pgsql database from Net Beans. Flavio Monteiro <flaviopinto.monteiro@gmail.com>
2007-08-30 09:48 ` Albe Laurenz <all@adv.magwien.gv.at>
2007-08-30 10:30 ` Mayuresh Nirhali <Mayuresh.Nirhali@Sun.COM>
2007-08-30 15:39 Problem connecting to a pgsql database from Net Beans. Bob <luckyratfoot@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox