我将GReg 4.5.0配置为在postgresql中使用外部数据库。 当我运行wso2server.bat -Dsetup时,我看到了这个错误:
TID: [-1234] [WSO2 Governance Registry] [2012-10-17 23:35:38,514] ERROR {org.wso2.carbon.humantask.core.HumanTaskServer} - Humantask Database Initialization failed. {org.wso2.carbon.humantask.core.HumanTaskServer}
TID: [-1234] [WSO2 Governance Registry] [2012-10-17 23:35:38,527] ERROR {org.wso2.carbon.humantask.core.internal.HumanTaskServiceComponent} - Failed to activate the HumanTaskServiceComponent. {org.wso2.carbon.humantask.core.internal.HumanTaskServiceComponent}
org.wso2.carbon.humantask.core.engine.HumanTaskServerException: Humantask Database Initialization failed.
at org.wso2.carbon.humantask.core.HumanTaskServer.initDataSource(HumanTaskServer.java:169)
at org.wso2.carbon.humantask.core.HumanTaskServer.init(HumanTaskServer.java:95)
at org.wso2.carbon.humantask.core.internal.HumanTaskServiceComponent.initHumanTaskServer(HumanTaskServiceComponent.java:102)
at org.wso2.carbon.humantask.core.internal.HumanTaskServiceComponent.activate(HumanTaskServiceComponent.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
....
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: org.wso2.carbon.humantask.core.engine.HumanTaskServerException: Error creating HumanTask database
at org.wso2.carbon.humantask.core.db.Database.setupHumanTaskDatabase(Database.java:98)
at org.wso2.carbon.humantask.core.db.Database.start(Database.java:78)
at org.wso2.carbon.humantask.core.HumanTaskServer.initDataSource(HumanTaskServer.java:165)
... 131 more
Caused by: java.lang.Exception: Error occurred while executing SQL script for creating registry database
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQLScript(DatabaseCreator.java:333)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.createRegistryDatabase(DatabaseCreator.java:61)
at org.wso2.carbon.humantask.core.db.Database.setupHumanTaskDatabase(Database.java:94)
... 133 more
Caused by: java.io.FileNotFoundException: D:\Jorge\DESARR~1\GREG\WSO2GR~1.0\bin\..\dbscripts\bps\postgresql.sql (El sistema no puede encontrar el archivo especificado)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:97)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQLScript(DatabaseCreator.java:294)
... 135 more
TID: [] [WSO2 Governance Registry] [2012-10-17 23:36:31,777] WARN {org.wso2.carbon.core.init.CarbonServerManager} - Carbon initialization is delayed due to the following unsatisfied items: {org.wso2.carbon.core.init.CarbonServerManager}
TID: [] [WSO2 Governance Registry] [2012-10-17 23:36:31,781] WARN {org.wso2.carbon.core.init.CarbonServerManager} - Waiting for required OSGi Service: org.wso2.carbon.humantask.core.HumanTaskEngineService {org.wso2.carbon.core.init.CarbonServerManager}
这是由于文件中的wrog名称,GReg尝试查找postgresql.sql但在该目录中只能看到postgres.sql。我只是更改名称并提出另一个错误:
TID: [-1234] [WSO2 Governance Registry] [2012-10-17 23:38:20,393] ERROR {org.wso2.carbon.humantask.core.db.Database} - Error creating HumanTask database {org.wso2.carbon.humantask.core.db.Database}
java.lang.Exception: Error occurred while executing : CREATE TABLE HT_MESSAGE (MESSAGE_ID BIGINT NOT NULL, MESSAGE_DATA CLOB, MESSAGE_HEADER CLOB, MESSAGE_TYPE VARCHAR(255), MESSAGE_NAME VARCHAR(512), TASK_ID BIGINT, PRIMARY KEY (MESSAGE_ID))
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQL(DatabaseCreator.java:169)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQLScript(DatabaseCreator.java:323)
....
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: org.postgresql.util.PSQLException: ERROR: no existe el tipo «clob»
Position: 68
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQL(DatabaseCreator.java:139)
... 136 more
TID: [-1234] [WSO2 Governance Registry] [2012-10-17 23:38:20,437] ERROR {org.wso2.carbon.humantask.core.HumanTaskServer} - Humantask Database Initialization failed. {org.wso2.carbon.humantask.core.HumanTaskServer}
我通过TEXT解决此问题更改CLOB。但是出现了另一个错误:
Caused by: org.wso2.carbon.humantask.core.engine.HumanTaskServerException: Error creating HumanTask database
at org.wso2.carbon.humantask.core.db.Database.setupHumanTaskDatabase(Database.java:98)
at org.wso2.carbon.humantask.core.db.Database.start(Database.java:78)
at org.wso2.carbon.humantask.core.HumanTaskServer.initDataSource(HumanTaskServer.java:165)
... 131 more
Caused by: java.lang.Exception: Error occurred while executing : CREATE TABLE ATTACHMENT ( id BIGINT NOT NULL, ATTACHMENT_CONTENT BYTEA, CONTENT_TYPE VA
RCHAR(255) NOT NULL, CREATED_BY VARCHAR(255) NOT NULL, CREATED_TIME Timestamp NOT NULL WITH DEFAULT current_timestamp, ATTACHMENT_NAME VARCHAR(255) NOT NUL
L, ATTACHMENT_URL VARCHAR(2048) NOT NULL, PRIMARY KEY (id) )
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQL(DatabaseCreator.java:169)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQLScript(DatabaseCreator.java:323)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.createRegistryDatabase(DatabaseCreator.java:61)
at org.wso2.carbon.humantask.core.db.Database.setupHumanTaskDatabase(Database.java:94)
... 133 more
Caused by: org.postgresql.util.PSQLException: ERROR: error de sintaxis en o cerca de ½WITH DEFAULT+
Position: 178
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQL(DatabaseCreator.java:139)
... 136 more
[2012-10-18 14:21:44,489] WARN {org.wso2.carbon.core.init.CarbonServerManager} - Carbon initialization is delayed due to the following unsatisfied items:
[2012-10-18 14:21:44,493] WARN {org.wso2.carbon.core.init.CarbonServerManager} - Waiting for required OSGi Service: org.wso2.carbon.humantask.core.HumanT
askEngineService
在这种情况下,我删除了WITH表达式,最后我可以将GREG 4.5.0与Postgresql一起使用。这可以在下次发布时修复吗?