IOException当我尝试从HSQL迁移到PostgreSQL后启动Liferay

时间:2017-05-09 08:49:12

标签: postgresql liferay database-migration hsqldb ioexception

我将原生lportal数据库从Hypersonic转换为PostgreSQL。使用我的PostgreSQL配置添加了portal-ext.properties个文件,并将postgresql-42.1.1添加到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它将正常工作!有什么问题??

  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

1 个答案:

答案 0 :(得分:0)

我遇到了从hsqldb迁移到mysql的相同问题。 在我的例子中,问题出在configuration_ table中相对于ldap服务器配置的json字符串中。 我通过从数据迁移脚本中删除相对于ldap配置服务器的2行来解决它。