从 glassfish 4.0 迁移到 Glassfish 4.1.1 - JDBC 领域问题
Migration from glassfish 4.0 to Glassfish 4.1.1 - JDBC Realm issue
我在 Glassfish domain.xml 中有这个安全配置,它适用于 4.0,但在 4.1.1 中失败,有人可以帮助确定问题所在。唯一的区别是 class 包 "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>
问题的发生是因为我将 JBDC 资源从 glassfish 4.0 复制粘贴到 glassfish 4.1.1 domain.xml。手动恢复 JDBC 资源并使用管理控制台或命令行重新创建后问题得到解决。
我在 Glassfish domain.xml 中有这个安全配置,它适用于 4.0,但在 4.1.1 中失败,有人可以帮助确定问题所在。唯一的区别是 class 包 "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>
问题的发生是因为我将 JBDC 资源从 glassfish 4.0 复制粘贴到 glassfish 4.1.1 domain.xml。手动恢复 JDBC 资源并使用管理控制台或命令行重新创建后问题得到解决。