[英]Can't create jdbc realm in Glassfish 4
I am trying to create a jdbc realm in Glassfish 4.0 but it gives me the following error. 我正在尝试在Glassfish 4.0中创建一个jdbc领域,但它给了我以下错误。
Creation of Authrealm realmforsuggestboard failed.
Authrealm realmforsuggestboard的创建失败。 java.lang.SecurityException: java.io.IOException: Configuration Error: Invalid control flag, REQUİRED java.lang.SecurityException: java.io.IOException: Configuration Error: Invalid control flag, REQUİRED
java.lang.SecurityException:java.io.IOException:配置错误:无效的控制标志,REQUİREDjava.lang.SecurityException:java.io.IOException:配置错误:无效的控制标志,REQUİRED
I tried to ping the connection pool and it works fine. 我尝试对连接池执行ping操作,效果很好。
Here is the log output. 这是日志输出。
[2014-07-01T10:21:44.674+0300] [glassfish 4.0] [INFO] [realm.loaded.successfully] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=190 _ThreadName=admin-listener(8)] [timeMillis: 1404199304674] [levelValue: 800] [[ SEC1115: Realm [realmformyboard] of classtype [com.sun.enterprise.security.ee.auth.realm.jdbc.JDBCRealm] successfully created.]]
[2014-07-01T10:21:44.674 + 0300] [glassfish 4.0] [INFO] [成功加载领域] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid:_ThreadID = 190 _ThreadName = admin-listener(8)] [timeMillis:1404199304674] [levelValue:800] [[SEC1115:类类型为[com.sun.enterprise.security.ee.auth.auth.realm]的领域[realmformyboard]。 jdbc.JDBCRealm]已成功创建。]]
[2014-07-01T10:21:44.679+0300] [glassfish 4.0] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1404199304679] [levelValue: 1000] [[ RestResponse.getResponse() gives FAILURE.
[2014-07-01T10:21:44.679 + 0300] [glassfish 4.0] [SEVERE] [] [org.glassfish.admingui] [tid:_ThreadID = 37 _ThreadName = admin-listener(4)] [timeMillis:1404199304679] [ levelValue:1000] [[RestResponse.getResponse()给出失败。 endpoint = ' http://localhost.com:4848/management/domain/configs/config/default-config/security-service/auth-realm ';
端点=' http://localhost.com:4848/management/domain/configs/config/default-config/security-service/auth-realm '; attrs = '{classname=com.sun.enterprise.security.ee.auth.realm.jdbc.JDBCRealm, name=realmformyboard, property=jaas-context=jdbcRealm:datasource-jndi=jdbc/myboard:user-table=users:user-name-column=email:password-column=password:group-table=groups:group-table-user-name-column=email:group-name-column=group_name:digestrealm-password-enc-algorithm=SHA-256:, target=default-config}']]
attrs ='{classname = com.sun.enterprise.security.ee.auth.realm.jdbc.JDBCRealm,name = realmformyboard,property = jaas-context = jdbcRealm:datasource-jndi = jdbc / myboard:user-table = users:用户名栏=电子邮件:密码列=密码:组表=基团:基团的表的用户名栏=电子邮件:组名称列=组名:digestrealm-密码ENC-算法SHA-= 256 :, target = default-config}']]
It turns out that the problem was locale language of JVM. 事实证明,问题出在JVM的语言环境。 When i add the following properties to JVM Options in Glassfish, everything begun to work properly.
当我将以下属性添加到Glassfish中的JVM选项时,一切开始正常工作。
-Duser.language=en
-Duser.language = EN
-Duser.region=US
-Duser.region = US
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.