users@glassfish.java.net

[gf-users] Properties substitution issue

From: Alessio Gennari <alessio.gennari78_at_gmail.com>
Date: Thu, 11 Sep 2014 14:17:30 +0200

Hi there,
I found an issue with properties substitution in Glassfish 4.1 on a Windows
7 64bit environment.

I build an application in which I used glassfish-resources.xml file to
define a jdbc-resource and a jdbc-connection-pool: for database parameters
I used three property aliases. They are listet below:

${postgres_user}
${postgres_port}
${postgres_host}

At the same time I did set the corresponing system properties with the
correct values.

After application deploying (deployed by NetBeans 8.0.1) by glassfifh
interface, I tried to ping jdbc connection pool (from application
resources) and I got this error:

Ping Connection Pool failed for { PoolInfo : (name=java:app/RedevoDBPool),
(applicationName=RedevoServer-ejb) }. Connection could not be allocated
because: FATAL: password authentication failed for user "${postgres_user}

" Please check the server.log for more details.

So, I went to "Additiona Properties" of jdbc connection pool and I clicked
on Save button. After that, I tried again to ping connection pool and the
operation ended without any error.

So we can assume that it is an issue in substitution of System Property
values after their "deploying" by glassfish-resources.xml file.

I am available for any other explanation.

Very kind regards.

Mephysto