Foros de discusión

Errors coming after importing previous versions liferay project

thumbnail
Ujjainee Sarkar, modificado hace 6 años.

Errors coming after importing previous versions liferay project

Regular Member Mensajes: 127 Fecha de incorporación: 20/07/16 Mensajes recientes
Hello,
I had two liferay projects which were created using Liferay 6.2 and jdk at that time was was 1.7. Now we have upgraded to jdk 1.8 for creating projects on Liferay 7 but we need to run simultaneously our Liferay 6.2 projects also. I was creating Liferay 7 portlets on Eclipse Mars and to run Liferay 6 projects i opened Eclipse Luna and configured the server of 6.2CE by changing the ports so that both 6.2 and & can run on my machine and then imported my Liferay 6.2 projects in the workspace of Luna. But the problem arose is that now several errors are occuring in the projects which were not there before and mostly are related to imports and liferay classes. I want to know what the problem actually is? We have not made any changes in the projects then why are errors occuring now.
Note:We have used service builders in Liferay 6.2 projects(I have read in some previous posts in Liferay forum that it can be a potential cause of error so i mentioned it)
thumbnail
Olaf Kock, modificado hace 6 años.

RE: Errors coming after importing previous versions liferay project

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
Ujjainee Sarkar:
Hello,
I had two liferay projects which were created using Liferay 6.2 and jdk at that time was was 1.7. Now we have upgraded to jdk 1.8 for creating projects on Liferay 7 but we need to run simultaneously our Liferay 6.2 projects also. I was creating Liferay 7 portlets on Eclipse Mars and to run Liferay 6 projects i opened Eclipse Luna and configured the server of 6.2CE by changing the ports so that both 6.2 and & can run on my machine and then imported my Liferay 6.2 projects in the workspace of Luna. But the problem arose is that now several errors are occuring in the projects which were not there before and mostly are related to imports and liferay classes. I want to know what the problem actually is? We have not made any changes in the projects then why are errors occuring now.
Note:We have used service builders in Liferay 6.2 projects(I have read in some previous posts in Liferay forum that it can be a potential cause of error so i mentioned it)


You'll need two different workspaces for working on projects for both versions - there are a lot of breaking changes that mostly will be caught by the upgrade wizard in Liferay IDE - however, your Liferay 7 plugins will differ from your Liferay 6.2 plugins for exactly this reason. Plus, you might want to migrate them to be proper OSGi bundles instead of WAR plugins in 7 - it just will ease your future work.
thumbnail
Ujjainee Sarkar, modificado hace 6 años.

RE: Errors coming after importing previous versions liferay project

Regular Member Mensajes: 127 Fecha de incorporación: 20/07/16 Mensajes recientes
Yeah Olaf! Workspaces are different and currently we donot want to migrate the 6.2 projects to Liferay 7. But still the errors are coming. emoticon
thumbnail
Olaf Kock, modificado hace 6 años.

RE: Errors coming after importing previous versions liferay project

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
Ujjainee Sarkar:
Yeah Olaf! Workspaces are different and currently we donot want to migrate the 6.2 projects to Liferay 7. But still the errors are coming. emoticon


If I understand correctly you have chosen not to adapt your code, that is running on Liferay 6.2, to Liferay 7? Well, with that decision, you will keep these errors there and you simply can't run this code on Liferay 7. The way to make the 6.2 code run on 7 is to migrate it. There's no way around it, and the decision to willingly not migrate it means that you have also chosen not to run on Liferay 7.
thumbnail
Ujjainee Sarkar, modificado hace 6 años.

RE: Errors coming after importing previous versions liferay project

Regular Member Mensajes: 127 Fecha de incorporación: 20/07/16 Mensajes recientes
But my question is I am running Liferay 6.2CE in port 8083 and liferay 7 in port 8080 and both basic portal are opening. Then why my previous projects which were created in Liferay 6.2 after reimporting them and running liferay 6.2 server compile time error is coming? Is it because of the jdk version? Like we had created those projects using jdk 1.7 and now we have upgraded to jdk 1.8 for running Liferay 7 as well in our machine. So is this the problem?
thumbnail
Olaf Kock, modificado hace 6 años.

RE: Errors coming after importing previous versions liferay project

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
Ujjainee Sarkar:
Like we had created those projects using jdk 1.7 and now we have upgraded to jdk 1.8 for running Liferay 7 as well in our machine. So is this the problem?


Nope, it's most likely not the JDK (because code written for JDK 7 will still work on JDK 8.

However, I've linked the breaking changes between Liferay 6.2 and Liferay 7 above. These imply that you can't run the same code on both versions. You must upgrade. If you decide not to upgrade, you'll not be able to run on Liferay 7 with the unchanged code.

There's an upgrade wizard in Liferay IDE that can help you with the bulk of those tasks. But the basic information is: Plugins for 6.2 will cause compiler errors on Liferay 7. That seems to be what you experience.
thumbnail
Ujjainee Sarkar, modificado hace 6 años.

RE: Errors coming after importing previous versions liferay project

Regular Member Mensajes: 127 Fecha de incorporación: 20/07/16 Mensajes recientes
ok but the thing is that I want to run my 6.2CE code in liferay 6.2 only and the plugins are that of 6.2 and the server is also that of 6.2. I cant understand then why this error is coming. Liferay 7 is run on different port and we want to run both Liferay 6.2ce and liferay 7 simultaneously in our machine.
thumbnail
Olaf Kock, modificado hace 6 años.

RE: Errors coming after importing previous versions liferay project

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
Ujjainee Sarkar:
ok but the thing is that I want to run my 6.2CE code in liferay 6.2 only and the plugins are that of 6.2 and the server is also that of 6.2. I cant understand then why this error is coming. Liferay 7 is run on different port and we want to run both Liferay 6.2ce and liferay 7 simultaneously in our machine.


Running both in parallel is not a problem. You just can't deploy your 6.2 plugins to Liferay 7 without upgrading them. And I understood that this was your objective. This is independent of running both systems on the same server.
thumbnail
Ujjainee Sarkar, modificado hace 6 años.

RE: Errors coming after importing previous versions liferay project

Regular Member Mensajes: 127 Fecha de incorporación: 20/07/16 Mensajes recientes
Yeah Olaf,
That problem is now resolved. Only thing is that I am getting some portlets as undeployed as I wrote in my another post(please refer to the link)--- https://web.liferay.com/community/forums/-/message_boards/message/98680090