From: | Micka <mickamusset(at)gmail(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | [Postgis][javax.sql.DataSource] Failed |
Date: | 2011-03-16 12:30:27 |
Message-ID: | AANLkTimGkxuOVOLnLqGdwmhibPaaAP-JriWJq=oSR8Vq@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 ?
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2011-03-17 14:24:27 | Re: [Postgis][javax.sql.DataSource] Failed |
Previous Message | Dave Cramer | 2011-03-16 12:25:31 | Re: Problem with executeBatch and "A result was returned when none was expected" |