tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Manzoni <>
Subject Re: connectionProperties is failing?
Date Thu, 23 Oct 2014 06:44:37 GMT
Il 23.10.2014 01.49, Christopher Schultz ha scritto:
> Hash: SHA256
> Alessandro,
> On 10/22/14 1:04 PM, Alessandro Manzoni wrote:
>> I configured a Resource datasouce inside context.xml but the
>> resulting connection is misconfigured.
>> The failing attribute appears as:
>> connectionProperties="sort=table;sort table=QSYS/QASCII"
>> but looking at the connection (while debugging) properties are
>> messed up, instead of the above 2 properties I see only 1:
>> sort=table=QSYS/QASCII
>> It looks like the property "sort table", with a blank inside the
>> name, was not correctly parsed.
> It sure does.
>> I'm using jtOpen.jar AS400JDBCDriver that supports a lot of such
>> strange property names:
> Aah,
> AS/400. You are a barrel of laughs.
>> If I try supplying the same properties using the
>> connect(Properties) method, or appending them to the url, all is
>> fine.
>> Is there some special syntax to achieve my goal?
> I think this is likely a bug.
> Whose bug it is depends upon which connection pool you are using. Are
> you using Tomcat's default pool (based upon commons-dbcp) or
> tomcat-pool. If you don't know, it's probably the former.
> If the bug belongs to commons-dbcp, you should report it over there
> and when it gets fixed, we'll consume the changes and then Tomcat
> should work properly.
> What version of Tomcat are you using?
I did nothing but inserting a <Resource element into context.xml with no 
factory declared, so I think it's Tomcat's default pool fault:
     <Resource name="jdbc/OmniaWebDB2400Pool" auth="Container"
         type="javax.sql.DataSource" maxActive="100" maxIdle="30" 
         username="USER" password="PASS"
         connectionProperties="sort=table;sort table=QSYS/QASCII;"
         url="jdbc:as400://dbserver/SCHEMA" />

I tried both 6.037 and 7.056 versions with the same result.

Itried 8.014 too, but the prgram stops, just while getting the 
connection from the datasource, datasource.getConnection() method, with 
this stack trace:





even if I didn't declare any validate query in datasource definition.

Basing upon AS400JDBCConnection docs, it's implementing 
java.sql.Connection interface from JDK 1.4.2, where there was no 
isValid() method.
Maybe this is possibly a bug too, in the sense that 
org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory could take in 
account the driver version before validating it, or cathing 
AbstractMethodError, that's telling that the method is not there.
By the way I cannot test tomcat 8.014 at all.

Thanks + best regards.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message