Forums de discussion

Upgrade from 5.1.1 to 5.1.2

thumbnail
Guido Kaltwasser, modifié il y a 15 années.

Upgrade from 5.1.1 to 5.1.2

New Member Publications: 18 Date d'inscription: 15/09/08 Publications récentes
Hi,

has anyone upgraded liferay 5.1.1 to 5.1.2 successfully yet.

I'd be grateful if you could describe the step you did to upgrade the application. Since the liferay 5.1.x administration guide is a bit thin on this topic at page 129. Would be nice if someone comes up with few do s and don't s ...

Cheers Guido
Crezo Ferreira, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2!

Junior Member Publications: 68 Date d'inscription: 13/10/08 Publications récentes
Unfortunately Ive got the same problem emoticon
thumbnail
Guido Kaltwasser, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2!

New Member Publications: 18 Date d'inscription: 15/09/08 Publications récentes
Hi Crezo,

we will start upgrading liferay 5.1.1 this week. I will post our successes and failures...

In the meantime anyone is welcome to help us out.

Cheers Guido
Andrew Tillinghast, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Junior Member Publications: 60 Date d'inscription: 05/09/08 Publications récentes
we were able to upgrade after some trial and error.

To upgrade we blew out the webapps/root folder and brought over the new one from the new distribution.
In webapps remove the folder for chat-portlet and any other similar one, you'll want to re-add them in the new version because they are dependent on class that have been removed.
In your tomcat root Lib folder there is an ext folder, update the files in there with the files from the distribution.

That should do it.
-Andrew
Rahul Sharma, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Regular Member Publications: 195 Date d'inscription: 25/07/08 Publications récentes
Hi,

While upgrading fornm 5.1.1 to 5.1.2, do i need to make any changes at the database level ?

Do i need to add additional database objects (tables , etc) in my existing 5.1.1 database (ORACLE)


Thanks
thumbnail
James Min, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Expert Publications: 293 Date d'inscription: 14/08/06 Publications récentes
Rahul Sharma:
Hi,

While upgrading fornm 5.1.1 to 5.1.2, do i need to make any changes at the database level ?

Do i need to add additional database objects (tables , etc) in my existing 5.1.1 database (ORACLE)


Thanks


If you run a deployed Liferay 5.1.2 deployment against an older DB, Liferay will look at the Release_ table for the build number. If it sees that the build # is a previous build it will automatically run upgrade processes and also upgrade the DB with any changes. In the source or in your EXT codebase, look in "sql/update-5.1.1-5.1.2" for reference, but again, it will be run automatically if Liferay senses it is running against an older DB.
Rahul Sharma, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Regular Member Publications: 195 Date d'inscription: 25/07/08 Publications récentes
If you run a deployed Liferay 5.1.2 deployment against an older DB, Liferay will look at the Release_ table for the build number. If it sees that the build # is a previous build it will automatically run upgrade processes and also upgrade the DB with any changes. In the source or in your EXT codebase, look in "sql/update-5.1.1-5.1.2" for reference, but again, it will be run automatically if Liferay senses it is running against an older DB.


Hi James,

If i point Liferay 5.1.2 deployment to 5.1.1 database, will it result in loss of data at the db level when new tables will be added by the 5.1.2. to 5.1.1 db

Also please guide , wht should be the right method (step by step method ) of migrating an existing 5.1.1 deployment to 5.1.2 deployment.


Thanks
thumbnail
James Min, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Expert Publications: 293 Date d'inscription: 14/08/06 Publications récentes
Rahul Sharma:
If you run a deployed Liferay 5.1.2 deployment against an older DB, Liferay will look at the Release_ table for the build number. If it sees that the build # is a previous build it will automatically run upgrade processes and also upgrade the DB with any changes. In the source or in your EXT codebase, look in "sql/update-5.1.1-5.1.2" for reference, but again, it will be run automatically if Liferay senses it is running against an older DB.


Hi James,

If i point Liferay 5.1.2 deployment to 5.1.1 database, will it result in loss of data at the db level when new tables will be added by the 5.1.2. to 5.1.1 db

Also please guide , wht should be the right method (step by step method ) of migrating an existing 5.1.1 deployment to 5.1.2 deployment.


Thanks


You will not lose DB data as there are java upgrade processes that migrate data if need be. 5.1.1 to 5.1.2 is not a major release so the first step is to get your DB upgraded. I can't really give you step by step because who knows what you have customized or developed in EXT or PluginsSDK. If you have an existing EXT, you need to replace the jars in the EXT from the 5.1.2 source code by running "ant clean start build-ext" from a 5.1.2 source, and pointing to your 5.1.1 EXT. This will update the jars. Then deploy from you newly updated 5.1.2 EXT to your app server. After that you need to upgrade all your customizations and custom portlets.

For major upgrades look here:
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Upgrade+Instructions+%28disambiguation%29
Rahul Sharma, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Regular Member Publications: 195 Date d'inscription: 25/07/08 Publications récentes

I can't really give you step by step because who knows what you have customized or developed in EXT or PluginsSDK. If you have an existing EXT, you need to replace the jars in the EXT from the 5.1.2 source code by running "ant clean start build-ext" from a 5.1.2 source, and pointing to your 5.1.1 EXT. This will update the jars. Then deploy from you newly updated 5.1.2 EXT to your app server. After that you need to upgrade all your customizations and custom portlets.


My 5.1.1 deployement is pretty straight forward i.e no changes to source code have been done , except
- few themes have been added
- portal.ext.properties file added to classes folder in WEB-INF\ROOT
- system-ext.properties file added to classes folder in WEB-INF\ROOT

Also there are couple of documents and journal articles in 5.1.1 CMS.

So for migarting my deployement to 5.1.2 , wht sequence of steps should i follow ?


Thanks
thumbnail
James Min, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Expert Publications: 293 Date d'inscription: 14/08/06 Publications récentes
Rahul Sharma:

I can't really give you step by step because who knows what you have customized or developed in EXT or PluginsSDK. If you have an existing EXT, you need to replace the jars in the EXT from the 5.1.2 source code by running "ant clean start build-ext" from a 5.1.2 source, and pointing to your 5.1.1 EXT. This will update the jars. Then deploy from you newly updated 5.1.2 EXT to your app server. After that you need to upgrade all your customizations and custom portlets.


My 5.1.1 deployement is pretty straight forward i.e no changes to source code have been done , except
- few themes have been added
- portal.ext.properties file added to classes folder in WEB-INF\ROOT
- system-ext.properties file added to classes folder in WEB-INF\ROOT

Also there are couple of documents and journal articles in 5.1.1 CMS.

So for migarting my deployement to 5.1.2 , wht sequence of steps should i follow ?


Thanks



Ideally you want those properties files in the EXT SDK so that when you do a "ant deploy" from EXT they will be there in WEB-INF.

Here's what I suggest you do:

1) back up everything (app server instance, DB, etc)
2) download a 5.1.2 bundle.
3) run the 5.1.2 bundle connect to your old 5.1.1 DB.
4) check for errors.
5) if no errors, it is all downhill from there.
6) download the 5.1.2 EXT SDK
7) put your properties files in /EXT/ext-impl/src/
8) deploy from EXT to the app server bundle
9) make sure it all comes up OK.

If you haven't made any other code changes that should do it.

As for the theme, after all the above steps, I recommend first trying to depoy the theme to your newly upgraded Liferay 5.1.2 via auto deploy. If it works OK and there are no errors, just keep it as it is.
Rahul Sharma, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Regular Member Publications: 195 Date d'inscription: 25/07/08 Publications récentes
Hi James,

How can i migrate the contenet of Liferay CMS (files) ?

Thanks
thumbnail
James Min, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Expert Publications: 293 Date d'inscription: 14/08/06 Publications récentes
Rahul Sharma:
Hi James,

How can i migrate the contenet of Liferay CMS (files) ?

Thanks



Your CMS content is in the database, when you run 5.1.2 against the 5.1.1 database, everything should be moved over automatically.

If you are running 5.1.2 on the same machine, you should be fine. Do you have content in the Document Library or Liferay Image Gallery? Or just Liferay Journal? If just Liferay Journal, you should be OK. If you have stuff in DL or IG, then those are stored in Jackrabbit ({user home}/liferay/jackrabbit) but if if you are on the same machine, your new Liferay 5.1.2 will be pointing to the same Jackrabbit repos and it should be OK.
thumbnail
James Min, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Expert Publications: 293 Date d'inscription: 14/08/06 Publications récentes
And please remember to back up everything before you try it!
thumbnail
Guido Kaltwasser, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

New Member Publications: 18 Date d'inscription: 15/09/08 Publications récentes
Hi Andrew,

we followed your suggestion, but we are still getting a few Exception. Would be great if you could help us out.

Cheers Guido
Andrew Tillinghast, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Junior Member Publications: 60 Date d'inscription: 05/09/08 Publications récentes
Our DB update fine automatically, what exceptions are you still getting?

-Andrew
thumbnail
Guido Kaltwasser, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

New Member Publications: 18 Date d'inscription: 15/09/08 Publications récentes
Dear all,

finally the upgrade from 5.1.1 to 5.1.2 has worked well, thanks to everybody who gave as hints and best practice advices. Here is the way we did it:

setup

Eclipse Projects:
/bundles
/tomcat-6.0.16/
/ext
/plugins
/portal


1) copied the 5.1.1 sources from the stage server to bundels/tomcat-6.0.16
2) start liferay and undeployed portlets, e.g. chat-portlet, wol-portlet, etc.
3) call > ant deploy within the portal project
3) cal > ant deploy within the plugin projekt to deploy the portlets we customised, one by one or all together
4) copied the other portlets (the ones we did not touch) manually to the deploy folder
5) changed the portal-ext.properties file, added upgrade.processes = com.liferay.portal.upgrade.UpgradeProcess_5_1_2
6) started liferay


Cheers
Guido
Monte Glenn Gardner, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

Junior Member Publications: 37 Date d'inscription: 11/07/08 Publications récentes
Guido Kaltwasser:
Dear all,
1) copied the 5.1.1 sources from the stage server to bundels/tomcat-6.0.16
2) start liferay and undeployed portlets, e.g. chat-portlet, wol-portlet, etc.
3) call > ant deploy within the portal project
3) cal > ant deploy within the plugin projekt to deploy the portlets we customised, one by one or all together
4) copied the other portlets (the ones we did not touch) manually to the deploy folder
5) changed the portal-ext.properties file, added upgrade.processes = com.liferay.portal.upgrade.UpgradeProcess_5_1_2
6) started liferay

Cheers
Guido


Our setup is a little more basic. We don't have an EXT environment or and Eclipse setup, still just working with text editors and command prompts. How does this change the above instructions?

1. What is meant by "stage server"?
5. What xml file do I add this property too if I don't have an EXT setup yet?
thumbnail
Guido Kaltwasser, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

New Member Publications: 18 Date d'inscription: 15/09/08 Publications récentes
Hi Glenn,

the Process should be the same, since you can call ant from the command line as well. We don't really use Eclipse as an IDE, it has to function as a comfortable text editor. Please let me know if that procedure worked for you.

Cheers

Guido
Giuseppe Fiameni, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

New Member Publications: 8 Date d'inscription: 24/09/08 Publications récentes
Hi there,
did anyone manage to upgrade portal services developed using Liferay EXT 5.1.1 ?
Moving from 5.1.1 to 5.1.2 my portal services fail to compile because the com.liferay.portal.kernel.bean.InitializingBean class seems to not exist anymore.

If I try to regenerate the services classes ( ant build-services ), a Spring expection is being threw.

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayTransactionManager' defined in class path resource [META-INF/hibernate-spring.xml]: Cannot resolve reference to bean 'liferayDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSource' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot resolve reference to bean 'liferayDataSourceTarget' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSourceTarget' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
[java] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
[java] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
[java] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
[java] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
[java] ... 21 more
[java] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSource' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot resolve reference to bean 'liferayDataSourceTarget' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSourceTarget' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
[java] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
[java] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
[java] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
[java] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
[java] ... 34 more
[java] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSourceTarget' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
[java] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
[java] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
[java] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
[java] ... 47 more
[java] Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
[java] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
[java] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
[java] at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at com.liferay.portal.kernel.jndi.JNDIUtil._lookup(JNDIUtil.java:168)
[java] at com.liferay.portal.kernel.jndi.JNDIUtil.lookup(JNDIUtil.java:64)
[java] at com.liferay.portal.kernel.jndi.JNDIUtil.lookup(JNDIUtil.java:46)
[java] at com.liferay.portal.spring.jndi.JndiObjectFactoryBean.lookup(JndiObjectFactoryBean.java:40)
[java] at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:200)
[java] at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:186)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368)
[java] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)
[java] ... 57 more
[java] Java Result: 1


Any suggestion ?

Many thanks for your help.

Giuseppe
thumbnail
Guido Kaltwasser, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

New Member Publications: 18 Date d'inscription: 15/09/08 Publications récentes
Hi Guiseppe,

that exception is probably due to the fact that your using a portlet that was written for 5.1.1. Most of them are not compatible with 5.1.2, since there is a major change in the way liferay is using spring now.

We discovered the same problem with the twitter portlet. The only chance we had was using the twitter portlet from the trunk or just don't deploy it, if that is an option.

Cheers

Guido
Giuseppe Fiameni, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

New Member Publications: 8 Date d'inscription: 24/09/08 Publications récentes
Hi Guido,
thank for your reply.

Guido Kaltwasser:
Hi Guiseppe,
that exception is probably due to the fact that your using a portlet that was written for 5.1.1. Most of them are not compatible with 5.1.2, since there is a major change in the way liferay is using spring now.


I finally suceeded in getting my portal services to compile with Liferay 5.1.2.

I had to manually:
- update all the libraries
- remove all the libraries which are not included anymore in 5.1.2
- update all the building scripts (build-common.xml, build-parent.xml)

Sincerely,
Giuseppe
Aw SH, modifié il y a 15 années.

RE: Upgrade from 5.1.1 to 5.1.2

New Member Publications: 16 Date d'inscription: 24/11/08 Publications récentes
Giuseppe,

this is a long thread to follow. Do you think you can post up the step by step guides that you have undertaken to upgrade to 5.1.2 ? I am running a very basic out of the box setup for 5.1.1 (e.g. run with mysql, customization is all in the -ext.properties file)

Thanks in advance