从glassfish 4.0迁移到Glassfish 4.1.1 - JDBC领域问题

时间:2016-11-18 22:11:46

标签: jaas glassfish-4.1 jdbcrealm payara

我在Glassfish domain.xml中有这个安全配置,适用于4.0但在4.1.1中失败,有人可以帮助识别错误。唯一的区别是类包“ee”

GF 4.0(附加ee

<auth-realm classname="com.sun.enterprise.security.ee.auth.realm.jdbc.JDBCRealm" name="authentication-realm">
<property name="jaas-context" value="jdbcRealm"></property>
<property name="password-column" value="password"></property>
<property name="datasource-jndi" value="jdbc/SomeDS"></property>
<property name="group-table" value="v_user_role"></property>
<property name="charset" value="UTF-8"></property>
<property name="user-table" value="v_user_role"></property>
<property name="group-name-column" value="rolename"></property>
<property name="digest-algorithm" value="SHA-256"></property>
<property name="user-name-column" value="username"></property>
<property name="digestrealm-password-enc-algorithm" value="SHA-256"></property>
<property name="encoding" value="Base64"></property>
</auth-realm>

GF 4.1.1

<auth-realm classname="com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm" name="authentication-realm">
<property name="jaas-context" value="jdbcRealm"></property>
<property name="password-column" value="password"></property>
<property name="datasource-jndi" value="jdbc/SomeDS"></property>
<property name="group-table" value="v_user_role"></property>
<property name="charset" value="UTF-8"></property>
<property name="user-table" value="v_user_role"></property>
<property name="group-name-column" value="rolename"></property>
<property name="digest-algorithm" value="SHA-256"></property>
<property name="user-name-column" value="username"></property>
<property name="digestrealm-password-enc-algorithm" value="SHA-256"></property>
<property name="encoding" value="Base64"></property>
</auth-realm>

1 个答案:

答案 0 :(得分:3)

问题出现了,因为我将来自glassfish 4.0的JBDC资源复制粘贴到glassfish 4.1.1 domain.xml。手动恢复JDBC资源并使用管理控制台或命令行重新创建后,问题得以解决。