Payara 5 - Statement Wrapping should be set to true before performing this operation

364 Views Asked by At

In Payara 5 I am getting a "Statement Wrapping should be set to true before performing this operation" when trying to run

"./asadmin set resources.jdbc-connection-pool.mysql_MY-DB-NAME_rootPool.max-wait-time-in-millis=604800"

In a nutshell:

./asadmin set resources.jdbc-connection-pool.mysql_MY-DB-NAME_rootPool.max-wait-time-in-millis=604800

Enter admin user name>  MY_ADMIN_USER
Enter admin password for user "MY_ADMIN_USER">

remote failure: Could not change the attributes: Constraints for this JdbcConnectionPool configuration have been violated: on property [  ] violation reason [ Statement Wrapping should be set to true before performing this operation ]
Constraints for this JdbcConnectionPool configuration have been violated: on property [  ] violation reason [ Statement Wrapping should be set to true before performing this operation ]
Command set failed

Does anybody know what this error message means?

2

There are 2 best solutions below

0
On BEST ANSWER

It means you have to enable the "wrap-jdbc-objects" option on the connection pool before it will allow you to set this other property. In domain.xml do this

  <jdbc-connection-pool
        name="my-conn-pool"
        wrap-jdbc-objects="true" ...>

There is also an equivalent asadmin command.

It looks like the constraint is only enforced in Payara 5, in earlier versions it did not produce this error.

0
On

This also appears to be enforced in Payara 4.1.2.181 as it wasn't needed in 4.1.2.172