尝试添加数据源时,Jboss-cli:JBAS014653(“预计[OBJECT]但是列出了”)

时间:2015-03-13 19:18:44

标签: postgresql jboss wildfly xa jboss-cli

我尝试在Wildfly 8.1中插入一个新的XA-Datasource:

/opt/wildfly/bin/jboss-cli.sh --connect --controller=192.168.1.220:9990

[standalone@192.168.1.220:9990 /] xa-data-source add --name=myName --jndi-name=java:jboss/datasources/myDS --driver-name=postgresql --user-name=myUser --password=myPass --use-java-context=true --use-ccm=true --min-pool-size=10 --max-pool-size=100 --transaction-isolation=TRANSACTION_READ_COMMITTED --pool-prefill=true --allocation-retry=1 --prepared-statements-cache-size=32 --share-prepared-statements=true --xa-datasource-class=org.postgresql.xa.PGXADataSource --xa-datasource-properties=[{ServerName=192.168.1.220},{PortNumber=5432},{DatabaseName=postgres}] --valid-connection-checker-class-name=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker --exception-sorter-properties=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter

但我收到了这个错误:

{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS014688: Wrong type for exception-sorter-properties. Expected [OBJECT] but was LIST"}}

在Web界面中,Exception Sorter的值是一个简单的字符串。

我尝试了很多值类型。

1 个答案:

答案 0 :(得分:1)

使用--exception-sorter-class-name=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter代替--exception-sorter-properties=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter