pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feed[Postgis][javax.sql.DataSource] Failed
4+ messages / 3 participants
[nested] [flat]
* [Postgis][javax.sql.DataSource] Failed
@ 2011-03-16 12:30 Micka <mickamusset@gmail.com>
2011-03-17 14:24 ` Re: [Postgis][javax.sql.DataSource] Failed Dave Cramer <pg@fastcrypt.com>
0 siblings, 1 reply; 4+ messages in thread
From: Micka @ 2011-03-16 12:30 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
I'm developping an application on Tomcat7.
I'm using the DataSource for pooling my connection :
<Context reloadable="false">
<Resource name="jdbc/TestPool"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="20000"
logAbandoned="true"
removeAbandoned="true"
removeAbandonedTimeout="10"
testOnBorrow="true"
validationQuery="SELECT 1"
validationInterval="30000"
username="Test"
password="**********"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://172.17.100.14/D_TEST?autoReconnect=true"
/>
</Context>
It seems that the connection that I got can't be casted to PGconnection :
java.lang.ClassCastException:
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper
cannot be cast to org.postgresql.PGConnection
at Test.DataBaseConnector.connection(DataBaseConnector.java:134)
at Test.DataBaseConnector.<init>(DataBaseConnector.java:94)
at Test.Guardian_Process.<init>(Guardian_Process.java:36)
at Test.ServletListener.contextInitialized(ServletListener.java:36)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4600)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5097)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5092)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
So my question is:
How can I manipulate geometry data In my case ?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [Postgis][javax.sql.DataSource] Failed
2011-03-16 12:30 [Postgis][javax.sql.DataSource] Failed Micka <mickamusset@gmail.com>
@ 2011-03-17 14:24 ` Dave Cramer <pg@fastcrypt.com>
2011-03-17 14:52 ` Re: [Postgis][javax.sql.DataSource] Failed Thomas Kellerer <spam_eater@gmx.net>
0 siblings, 1 reply; 4+ messages in thread
From: Dave Cramer @ 2011-03-17 14:24 UTC (permalink / raw)
To: Micka <mickamusset@gmail.com>; +Cc: pgsql-jdbc
Micka,
>
> So my question is:
>
> How can I manipulate geometry data In my case ?
>
AFAIR there is a way to get the underlying connection. You will have
to get that to cast it.
Dave
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [Postgis][javax.sql.DataSource] Failed
2011-03-16 12:30 [Postgis][javax.sql.DataSource] Failed Micka <mickamusset@gmail.com>
2011-03-17 14:24 ` Re: [Postgis][javax.sql.DataSource] Failed Dave Cramer <pg@fastcrypt.com>
@ 2011-03-17 14:52 ` Thomas Kellerer <spam_eater@gmx.net>
2011-03-17 15:01 ` Re: [Postgis][javax.sql.DataSource] Failed Micka <mickamusset@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Kellerer @ 2011-03-17 14:52 UTC (permalink / raw)
To: pgsql-jdbc
Dave Cramer, 17.03.2011 15:24:
> Micka,
>
>>
>> So my question is:
>>
>> How can I manipulate geometry data In my case ?
>>
>
>
> AFAIR there is a way to get the underlying connection. You will have
> to get that to cast it.
>
> Dave
>
See the description here:
http://commons.apache.org/dbcp/configuration.html
(property: accessToUnderlyingConnectionAllowed)
It also contains an example on how to obtain the physical java.sql.Connection
It should be possible to cast that to the PGConnection then.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [Postgis][javax.sql.DataSource] Failed
2011-03-16 12:30 [Postgis][javax.sql.DataSource] Failed Micka <mickamusset@gmail.com>
2011-03-17 14:24 ` Re: [Postgis][javax.sql.DataSource] Failed Dave Cramer <pg@fastcrypt.com>
2011-03-17 14:52 ` Re: [Postgis][javax.sql.DataSource] Failed Thomas Kellerer <spam_eater@gmx.net>
@ 2011-03-17 15:01 ` Micka <mickamusset@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Micka @ 2011-03-17 15:01 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc
Thx all !
You helped me a lot !
On Thu, Mar 17, 2011 at 3:52 PM, Thomas Kellerer <spam_eater@gmx.net> wrote:
> Dave Cramer, 17.03.2011 15:24:
>
> Micka,
>>
>>
>>> So my question is:
>>>
>>> How can I manipulate geometry data In my case ?
>>>
>>>
>>
>> AFAIR there is a way to get the underlying connection. You will have
>> to get that to cast it.
>>
>> Dave
>>
>>
> See the description here:
>
> http://commons.apache.org/dbcp/configuration.html
> (property: accessToUnderlyingConnectionAllowed)
>
> It also contains an example on how to obtain the physical
> java.sql.Connection
>
> It should be possible to cast that to the PGConnection then.
>
>
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2011-03-17 15:01 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-03-16 12:30 [Postgis][javax.sql.DataSource] Failed Micka <mickamusset@gmail.com>
2011-03-17 14:24 ` Dave Cramer <pg@fastcrypt.com>
2011-03-17 14:52 ` Thomas Kellerer <spam_eater@gmx.net>
2011-03-17 15:01 ` Micka <mickamusset@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