问题
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
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
回答1:
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.
来源:https://stackoverflow.com/questions/43865210/ioexception-when-i-try-to-start-liferay-after-migration-from-hsql-to-postgresql