Message Boards

SVN Checkout: constantly running UpgradeProcess_4_4_0

thumbnail
Fuad Efendi, modified 16 Years ago.

SVN Checkout: constantly running UpgradeProcess_4_4_0

Regular Member Posts: 180 Join Date: 4/5/07 Recent Posts
Hello,


After SVN checkout and 'ant all' I have Upgrade Process running even after several restarts of Tomcat:

[DynamicDialect:102] Using dialect org.hibernate.dialect.MySQLDialect
[StartupAction:129] Running upgrade com.liferay.portal.upgrade.UpgradeProcess_4_4_0
[UpgradeProcess_4_4_0:47] Upgrading
[UpgradeDocumentLibrary:46] Upgrading


I was forced to manually run some SQL (due to some exceptions), and database schema looks upgraded (manually). But upgrade process still run after restart of a server.


Another issue:
15:05:07,277 WARN [TagsAssetGroupIdUpgradeColumnImpl:85] com.liferay.portlet.journal.NoSuchArticleResourceException: No JournalArticleResource exists
with the primary key 0

com.liferay.portlet.journal.NoSuchArticleResourceException: No JournalArticleResource exists with the primary key 0
at com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistenceImpl.findByPrimaryKey(JournalArticleResourcePersistenceImp
l.java:222)
at com.liferay.portlet.journal.service.impl.JournalArticleResourceLocalServiceImpl.getArticleResource(JournalArticleResourceLocalServiceImpl.j
ava:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy4.getArticleResource(Unknown Source)
at com.liferay.portlet.journal.service.JournalArticleResourceLocalServiceUtil.getArticleResource(JournalArticleResourceLocalServiceUtil.java:2
13)
at com.liferay.portal.upgrade.v4_4_0.util.TagsAssetGroupIdUpgradeColumnImpl.getGroupId(TagsAssetGroupIdUpgradeColumnImpl.java:117)
at com.liferay.portal.upgrade.v4_4_0.util.TagsAssetGroupIdUpgradeColumnImpl.getNewValue(TagsAssetGroupIdUpgradeColumnImpl.java:80)
at com.liferay.portal.upgrade.util.DefaultUpgradeTableImpl.getExportedData(DefaultUpgradeTableImpl.java:239)
at com.liferay.portal.upgrade.util.BaseUpgradeTableImpl.getTempFileName(BaseUpgradeTableImpl.java:407)
at com.liferay.portal.upgrade.util.BaseUpgradeTableImpl.updateTable(BaseUpgradeTableImpl.java:358)
at com.liferay.portal.upgrade.v4_4_0.UpgradeTags.doUpgrade(UpgradeTags.java:72)
at com.liferay.portal.upgrade.v4_4_0.UpgradeTags.upgrade(UpgradeTags.java:49)
at com.liferay.portal.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:77)
at com.liferay.portal.upgrade.UpgradeProcess_4_4_0.upgrade(UpgradeProcess_4_4_0.java:52)
at com.liferay.portal.events.StartupAction.run(StartupAction.java:133)
at com.liferay.portal.events.EventsProcessor._process(EventsProcessor.java:151)
thumbnail
Björn Ryding, modified 16 Years ago.

RE: SVN Checkout: constantly running UpgradeProcess_4_4_0

Liferay Master Posts: 582 Join Date: 5/16/07 Recent Posts
thumbnail
Daren Sefcik, modified 16 Years ago.

RE: SVN Checkout: constantly running UpgradeProcess_4_4_0

Junior Member Posts: 62 Join Date: 5/18/07 Recent Posts
I am having the same problem. I followed the resolved instructions from the other post but it did not solve this problem for me. Can anyone tell me what should be in the JournalArticleResource table? I seem to have records in there that have not been approved and vice-versa. It would be great to know exactly what records should be in there.

tia,
Daren
thumbnail
Jerry Niu, modified 16 Years ago.

RE: SVN Checkout: constantly running UpgradeProcess_4_4_0

Expert Posts: 451 Join Date: 6/21/06 Recent Posts
Which DB are you using?

From SVN, the upgrade process will not increment the buildNumber column in the Release_ table until a release is finalized. You'll have to do that manually after the first time the upgrade runs.

For example,

mysql> select * from release_;
+-----------+---------------------+---------------------+-------------+---------------------+----------+
| releaseId | createDate          | modifiedDate        | buildNumber | buildDate           | verified |
+-----------+---------------------+---------------------+-------------+---------------------+----------+
|         1 | 2007-11-07 07:45:56 | 2007-11-09 22:18:15 |        4304 | 2007-11-05 00:00:00 |        1 |
+-----------+---------------------+---------------------+-------------+---------------------+----------+


Increase 4304 to 4305 or greater depending on your build number.

You should also find out your upgrade classes from the portal.properties file to make sure all is ok:
upgrade.processes
thumbnail
Alexander Chow, modified 16 Years ago.

RE: SVN Checkout: constantly running UpgradeProcess_4_4_0

Liferay Master Posts: 518 Join Date: 7/20/05 Recent Posts
So, if you are running from SVN trunk, that is true. This is because we have so many developers working on the code simultaneously and this automates the upgrade of their development databases. Running those upgrade classes multiple times should not hurt (they verify that the upgrade is needed before doing it). Simply, they are not setting the release number in the Release_ table. If you want to turn that off, just disable it in your portal-ext.properties.

As another comment (though you probably already know this), be aware that you should not be running trunk on your development environment.
thumbnail
Daren Sefcik, modified 16 Years ago.

RE: SVN Checkout: constantly running UpgradeProcess_4_4_0

Junior Member Posts: 62 Join Date: 5/18/07 Recent Posts
I think maybe I might need a better understanding of how/when to use svn. I just starting using the trunk build thinking it would give me a more up-to-date system. I am planning on building with the ext environment as well once I become comfortable with how everything works. I have had successful upgrades using the release bundles from all of the 4.x builds so this is the first time I have had errors. What/where are the best resources for me to understand the different svn builds and which to use in which environment(production/development)? Maybe I can understand and solve this problem by first understanding what the svn code base is doing.

tia,
Daren
thumbnail
Björn Ryding, modified 16 Years ago.

RE: SVN Checkout: constantly running UpgradeProcess_4_4_0

Liferay Master Posts: 582 Join Date: 5/16/07 Recent Posts
Use SVN trunk if you are curious about upcoming features or want to take part in the development of Liferay itself.

For development, use the latest stable build in the appropriate SVN branch.

In production, use only releases that you have successfully tested with your solution.

Do not make changes to the portal source if you do not absolutely have to. Instead, use the extension environment for customizations and develop portlets and themes with the Plugins SDK.
thumbnail
Daren Sefcik, modified 16 Years ago.

RE: SVN Checkout: constantly running UpgradeProcess_4_4_0

Junior Member Posts: 62 Join Date: 5/18/07 Recent Posts
Thank you, that is exactly what I wanted to know.

Daren
thumbnail
Fuad Efendi, modified 16 Years ago.

RE: SVN Checkout: constantly running UpgradeProcess_4_4

Regular Member Posts: 180 Join Date: 4/5/07 Recent Posts
Thanks a lot!


I temporary disabled upgrades via portal-ext.properties file.

I need SVN checkout versions from trunk for production release of our website emoticonemoticon

SVN trunk has Asset Publisher with pagination, and more.

Upgrade process does not hurt, but we are forced to run some new SQL statements manually, or at least as multiple separate transactions (and not as a batch script). For instance, previous upgrade added _uuid column to some tables, and new one adds new tables to the same script. Script fails because it finds _uuid for older tables, and I need to run SQL snippets manually for newer tables. And 'backup' for some tables during upgrade, I am unsure what may happen for production ready database...

Thanks