我使用postgresql-9.1作为注册表数据库尝试了WSO2 - Identity Server 5.0.0,并遇到以下问题:
首先,我遇到了设置注册数据库的麻烦:
在第199行的文件$ {CARBON_HOME} /dbscripts/identity/postgresql.sql中我必须替换:
ID INTEGER INTEGER NEXTVAL('IDN_ASSOCIATED_ID_SEQ'),
通过
ID INTEGER DEFAULT NEXTVAL('IDN_ASSOCIATED_ID_SEQ'),
我必须替换每次出现的事件:
ID INTEGER NEXTVAL
通过
ID INTEGER DEFAULT NEXTVAL
在第249行,我不得不替换:
PROPERTY_BLOB_VALUE BLOB,
通过
PROPERTY_BLOB_VALUE BYTEA,
然后我可以创建注册表数据库,但我有其他一些麻烦
某些列的大小: 在我的配置中,用户通过他们的电子邮件进行标识(因此用户标识符可能很长),这在尝试添加服务提供商时会导致异常。例如,在REG_LOG表中,我不得不增加reg_user_id列的大小。我不确定是否有必要,但我也更改了表REG_CLUSTER_LOCK,REG_RESOURCE,REG_RESOURCE_HISTORY,REG_COMMENT,REG_RATING和REG_TAG
当我尝试添加服务提供商时,我遇到以下异常:
Caused by: org.postgresql.util.PSQLException: ERREUR: column « ID » doesn't exists Position : 125
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
at org.wso2.carbon.identity.application.mgt.dao.impl.ApplicationDAOImpl.createApplication(ApplicationDAOImpl.java:129)
... 50 more
看起来postgresql区分大小写。该列存在,但是小写......
当我尝试添加IdP提供程序时,我遇到以下异常:
Caused by: java.sql.SQLFeatureNotSupportedException: function org.postgresql.jdbc4.Jdbc4PreparedStatement.setBinaryStream(int, InputStream) not yet implemented.
at org.postgresql.Driver.notImplemented(Driver.java:727)
at org.postgresql.jdbc4.AbstractJdbc4Statement.setBinaryStream(AbstractJdbc4Statement.java:134)
at org.wso2.carbon.idp.mgt.dao.IdPManagementDAO.addIdP(IdPManagementDAO.java:1236)
... 122 more
我正在使用postgresql-9.3-1102.jdbc41.jar驱动程序。 看起来这个功能还不支持。是否可以使用setBinaryStream(int,InputStream,int)函数(最后一个参数是输入流的长度,以字节为单位)