core icon indicating copy to clipboard operation
core copied to clipboard

since 2.3 upgrade from 1.9.x is broken

Open dotjorgeu opened this issue 13 years ago • 6 comments

We add new fields to structure in Task01015AddPublishExpireDateToIdentifier but in tasks before that we try to save structures and it fail because of the missing fields. The workaround it to add the fields before the upgrade

``SQL alter table structure add expire_date_var varchar(255); alter table structure add publish_date_var varchar(255);``

And comment those lines in the upgrade task so it doesn't fail for already existing field.

So we need to document this OR fix the upgrade tasks.

dotjorgeu avatar Oct 13 '13 17:10 dotjorgeu

we should fix.

jtesser avatar Oct 14 '13 13:10 jtesser

similar problem for those new mod_date we added in 2.5.1

dotjorgeu avatar Oct 14 '13 16:10 dotjorgeu

Here is the stacktrace

013-10-14 10:42:44,242 WARN  net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 42703
2013-10-14 10:42:44,242 ERROR net.sf.hibernate.util.JDBCExceptionReporter - ERROR: column inode.mod_date does not exist
  Position: 645
2013-10-14 10:42:44,243 WARN  net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 42703
2013-10-14 10:42:44,243 ERROR net.sf.hibernate.util.JDBCExceptionReporter - ERROR: column inode.mod_date does not exist
  Position: 645
2013-10-14 10:42:44,244 WARN  com.dotmarketing.db.HibernateUtil - ---------- DotHibernate: error on list ---------------
net.sf.hibernate.exception.SQLGrammarException: Could not execute query
    at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:58)
    at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
    at net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4131)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1557)
    at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
    at com.dotmarketing.db.HibernateUtil.list(HibernateUtil.java:277)
    at com.dotmarketing.factories.InodeFactory.getInodesOfClassByConditionAndOrderBy(InodeFactory.java:899)
    at com.dotmarketing.factories.InodeFactory.getInodesOfClassByConditionAndOrderBy(InodeFactory.java:882)
    at com.dotmarketing.portlets.structure.factories.FieldFactory.getFieldsByContentletField(FieldFactory.java:75)
    at com.dotmarketing.portlets.structure.factories.FieldFactory.getNextAvaliableFieldNumber(FieldFactory.java:126)
    at com.dotmarketing.portlets.structure.model.Field.<init>(Field.java:160)
    at com.dotmarketing.portlets.fileassets.business.FileAssetAPIImpl.createBaseFileAssetFields(FileAssetAPIImpl.java:113)
    at com.dotmarketing.startup.runonce.Task00810FilesAsContentChanges.createDefaultFileAssetStructure(Task00810FilesAsContentChanges.java:110)
    at com.dotmarketing.startup.runonce.Task00810FilesAsContentChanges.executeUpgrade(Task00810FilesAsContentChanges.java:47)
    at com.dotmarketing.startup.StartupTasksExecutor.executeUpgrades(StartupTasksExecutor.java:260)
    at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:117)

dotjorgeu avatar Oct 14 '13 16:10 dotjorgeu

I will need to merge this to a 2.5.2 after we release 2.5.1

jtesser avatar Oct 14 '13 17:10 jtesser

here is the merge for 2.5.x https://github.com/dotCMS/dotCMS/pull/4233

dotjorgeu avatar Oct 14 '13 17:10 dotjorgeu

Fix is working on 3.2.1 build

shaydotcms avatar Jun 19 '15 14:06 shaydotcms