从HSQL迁移到PostgreSQL后无法启动Liferay

时间:2017-05-08 16:31:06

标签: postgresql liferay database-migration hsqldb

我从HSQL(本地Liferay DB)迁移到PostgreSQL,将文件添加到Liferay根目录 portal-ext.properties

jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.url=jdbc:postgresql://localhost:5432/test
jdbc.default.username=postgres  
jdbc.default.password=root

但是当我尝试使用PostgreSQL配置启动Liferay时,它会在liferay控制台中出现错误。

 15:44:47,094 INFO  [localhost-startStop-1][DialectDetector:75] Determine dialect for PostgreSQL 9.5
15:44:47,377 INFO  [localhost-startStop-1][DialectDetector:148] Found dialect org.hibernate.dialect.PostgreSQLDialect
15:44:52,160 INFO  [localhost-startStop-1][BundleStartStopLogger:35] STARTED org.eclipse.osgi_3.10.200.v20150831-0856 [0]
15:44:52,344 INFO  [Start Level: Equinox Container: 6075fd41-0534-0017-10fa-897496bda72a][BundleStartStopLogger:35] STARTED com.liferay.util.taglib_2.4.1 [1]
15:44:52,348 INFO  [Start Level: Equinox Container: 6075fd41-0534-0017-10fa-897496bda72a][BundleStartStopLogger:35] STARTED com.liferay.osgi.util_3.0.2 [2]
15:44:52,368 INFO  [Start Level: Equinox Container: 6075fd41-0534-0017-10fa-897496bda72a][BundleStartStopLogger:35] STARTED com.liferay.petra.xml_1.0.3 [3]
15:44:52,371 INFO  [Start Level: Equinox Container: 6075fd41-0534-0017-10fa-897496bda72a][BundleStartStopLogger:35] STARTED com.liferay.portal.configuration.metat
ype_2.0.3 [4]
15:44:52,890 INFO  [Start Level: Equinox Container: 6075fd41-0534-0017-10fa-897496bda72a][BundleStartStopLogger:38] STOPPED com.liferay.portal.configuration.persi
stence_2.0.1 [5]
15:44:52,921 ERROR [Framework Event Dispatcher: Equinox Container: 6075fd41-0534-0017-10fa-897496bda72a][com_liferay_portal_configuration_persistence:97] Framewor
kEvent ERROR
org.osgi.framework.BundleException: Exception in com.liferay.portal.configuration.persistence.activator.ConfigurationPersistenceBundleActivator.start() of bundle
com.liferay.portal.configuration.persistence.
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:795)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:951)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:328)
        at org.eclipse.osgi.container.Module.doStart(Module.java:566)
        at org.eclipse.osgi.container.Module.start(Module.java:434)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
        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: ╨Ю╨и╨Ш╨С╨Ъ╨Р: ╤Б╤В╨╛╨╗╨▒╨╡╤Ж "configurationid" ╨╜╨╡ ╤Б╤Г╤Й╨╡╤Б╤В╨▓╤Г╨╡╤В_  ╨Я╨╛╨╖╨╕╤Ж╨╕╤П: 8 [Sanitized]
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2476)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2189)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:169)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:117)
        at com.liferay.portal.configuration.persistence.ConfigurationPersistenceManager.populateDictionaries(ConfigurationPersistenceManager.java:448)
        at com.liferay.portal.configuration.persistence.ConfigurationPersistenceManager.start(ConfigurationPersistenceManager.java:173)
        at com.liferay.portal.configuration.persistence.activator.ConfigurationPersistenceBundleActivator.start(ConfigurationPersistenceBundleActivator.java:63)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
        ... 12 more

此时它会停止加载。怎么了?这是数据库问题吗?

    15:45:02,242 INFO  [Start Level: Equinox Container: 6075fd41-0534-0017-10fa-897496bda72a][BundleStartStopLogger:35] STARTED org.osgi.service.metatype_1.3.0.201505
202024 [40]

更新

  `org.osgi.framework.BundleException: Exception in com.liferay.portal.configuration.persistence.activator.ConfigurationP sistenceBundleActivator.start() of bundle com.liferay.portal.configuration.persistence.
            at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:795)
            at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
            at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:951)
            at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:328)
            at org.eclipse.osgi.container.Module.doStart(Module.java:566)
            at org.eclipse.osgi.container.Module.start(Module.java:434)
            at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
            at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
            at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1 3)
            at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
            at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
            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: java.io.IOException: Unexpected token 78; expected: 61 (line=0, pos=435)
            at org.apache.felix.cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java:698)
            at org.apache.felix.cm.file.ConfigurationHandler.readInternal(ConfigurationHandler.java:302)
            at org.apache.felix.cm.file.ConfigurationHandler.read(ConfigurationHandler.java:265)
            at com.liferay.portal.configuration.persistence.ConfigurationPersistenceManager.toDictionary(ConfigurationPers tenceManager.java:536)
            at com.liferay.portal.configuration.persistence.ConfigurationPersistenceManager.populateDictionaries(Configura onPersistenceManager.java:454)
            at com.liferay.portal.configuration.persistence.ConfigurationPersistenceManager.start(ConfigurationPersistence nager.java:173)
            at com.liferay.portal.configuration.persistence.activator.ConfigurationPersistenceBundleActivator.start(Config ationPersistenceBundleActivator.java:63)
            at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
            at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
            ... 12 more Caused by: java.io.IOException: Unexpected token 78; expected: 61 (line=0, pos=435)
        at org.apache.felix.cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java:698)
        at org.apache.felix.cm.file.ConfigurationHandler.readInternal(ConfigurationHandler.java:302)
        at org.apache.felix.cm.file.ConfigurationHandler.read(ConfigurationHandler.java:265)
        at com.liferay.portal.configuration.persistence.ConfigurationPersistenceManager.toDictionary(ConfigurationPersis tenceManager.java:536)
        at com.liferay.portal.configuration.persistence.ConfigurationPersistenceManager.populateDictionaries(Configurati onPersistenceManager.java:454)
        at com.liferay.portal.configuration.persistence.ConfigurationPersistenceManager.start(ConfigurationPersistenceMa nager.java:173)
        at com.liferay.portal.configuration.persistence.activator.ConfigurationPersistenceBundleActivator.start(Configur ationPersistenceBundleActivator.java:63)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
        ... 12 more`

0 个答案:

没有答案