Payara 5 - 在执行此操作之前,应将Statement Wrapping设置为true

时间:2018-06-04 13:49:45

标签: configuration payara asadmin

在Payara 5中,我在尝试运行时收到“在执行此操作之前应将声明环绕设置为true”

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

简而言之:

./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

有人知道此错误消息的含义吗?

2 个答案:

答案 0 :(得分:3)

这意味着您必须先在连接池上启用“wrap-jdbc-objects”选项,然后才能设置此其他属性。在domain.xml中执行此操作

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

还有一个等效的asadmin命令。

看起来约束仅在Payara 5中强制执行,在早期版本中它没有产生此错误。

答案 1 :(得分:0)

在Payara 4.1.2.181中似乎也强制执行了此操作,因为在4.1.2.172中并不需要此