从HSQL迁移到PostgreSQL后尝试启动Liferay时出现IOException [英] IOException when I try to start Liferay after migration from HSQL to PostgreSQL

查看:120
本文介绍了从HSQL迁移到PostgreSQL后尝试启动Liferay时出现IOException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将本机lportal DB从Hypersonic转换为PostgreSQL.在我的PostgreSQL配置中添加了portal-ext.properties文件,并在D:\files\liferay-ce-portal-7.0-ga3\tomcat-8.0.32\lib\ext

I converted native lportal DB from Hypersonic to PostgreSQL. Added portal-ext.properties files with my PostgreSQL configurations and added postgresql-42.1.1 to D:\files\liferay-ce-portal-7.0-ga3\tomcat-8.0.32\lib\ext

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

当我开始我的人生历程时,它向我显示了一个异常.但是,如果我删除portal-ext.properties,它将正常工作!有什么问题吗?

And when I'm starting my liferay it shows me an Exception. But If I remove portal-ext.properties it will work fine! What the problem??

  08:36:35,748 ERROR [Framework Event Dispatcher: Equinox Container: c01a6f97-9234-0017-1185-a19cbf92201a][com_liferay_portal_configuration_persistence:97] FrameworkEvent 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: 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(ConfigurationPersistenceManager.java:536)
    at com.liferay.portal.configuration.persistence.ConfigurationPersistenceManager.populateDictionaries(ConfigurationPersistenceManager.java:454)
    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

推荐答案

从hsqldb迁移到mysql时,我遇到了同样的问题. 在我的情况下,问题出在与ldap服务器配置有关的configuration_表中的json字符串中. 我通过从数据迁移脚本中删除相对于ldap配置服务器的2行来解决了该问题.

I had the same problem migrating from hsqldb to mysql. In my case the problem was in a json string in the configuration_ table relative to the ldap server configuration. I solved it by removing the 2 rows relative to the ldap configuration server from the data migration script.

这篇关于从HSQL迁移到PostgreSQL后尝试启动Liferay时出现IOException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆