Foren

Liferay Code Upgrade Tool not working

Ra Jo Ga Cha, geändert vor 7 Jahren.

Liferay Code Upgrade Tool not working

Junior Member Beiträge: 77 Beitrittsdatum: 19.01.17 Neueste Beiträge
Hello everyone,

I'm stuck trying to use this tool. Yesterday i had some problems to go above step 2 but finally it started working, but today I restarted the steps to finally upgrade my plugins SDK and I can't get it working. Any directory I choose from "browse" or just write in the box, returns a "Plugins SDK location is not valid". Tried it with "/" bars, with plugin's SDKs in the workspace, in folders into my desktop, in folders under C:\ (I'm working on Windows), all this running Eclipse in administrator mode, but I can't get it running.

Thanks in advance!
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working (Antwort)

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hello Ra Jo,

In step 2, it just upgrade your 62 SDK to 70 SDK or Liferay Workspace. If u already finish the step 2. You can click show all pages icon in the top.
It can let u access the following steps. It will be OK in this way.
Thanks for your feedback. If u still have problem about code upgrade tool, please feel free to ask.

Sincerely,
Joye
Ra Jo Ga Cha, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Junior Member Beiträge: 77 Beitrittsdatum: 19.01.17 Neueste Beiträge
Hi Joye,

thanks for your prompt answer. I have a doubt about when you said "if u already finish the step ". You say assuming yesterday the step gone all right? Or you mean that the tool will ignore the error and take the written values? Yesterday I tried the tool with other plugins from other project that were natively coded in 6.2, so if this step is the one that upgrades my plugins SDK, I need it working.

My plugins are coming from 6.1, I used Liferay AUT tool to upgrade them from 6.1 to 6.2, and then I searched for remaining calls to Liferay 6.1, all of them had this references in its .properties and in .settings/or.eclipse.wst.common.project.facet.core.xml and in docroot/.classpath. I only modified it in the .properties because the other files are for Eclipse, maybe this is the reason because it isn't Liferay (6.2) plugins to upgrade?

Update: I understood now that step 2 is for updating Liferay Plugins SDK 6.2 instead of downloading 7.0 due to some personalization. I finally clicked Show all pages and, although the description is a bit confusing (it says things like "finish the update process" that I understood like finish the entire process and not only the actual step), nothing to change in step 3, but step 4 is problematic again.

More than a hundred errors were found, it's ok, but when I click on the auto correct all button I get this error: 'Auto correcting all of migration problem' has encountered a problem. An internal error ocurred during: "Auto correcting all of migration problem.". In the details box it says it's a java.lang.NullPointerException, but I'm also getting errors trying to check a checkbox in the "resolved" column on the left-down box. 'Marking migration problem as done' has encountered a problem. Unable to get file from problem. I thought the tool just got bugged or something so just restarted the tool. It found much less problems this time, so I'm assuming it corrected part of the problems before reaching the error (it was inmediate and there wasn't any progress window so I don't know what changes happened). Anyways, same both errors are reproducing again. I'm stuck!

Update 2: Still stuck, but with new info. I noticed that any time I launch Automatically Correct Problems, get the error, and update the list of breaking changes pressing clicking again on Find Breaking Changes, there's one less error. First time I got the error, it resolved ~60 problems of ~130. It reccessed problems to 73, and from that point, any time I make that steps... 72... 71... 70... 69... 68... so I think there should be a problem after solving the problem and before solving the next.
Thoughtfully.
Ra Jo.
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hi Ra Jo,

Thanks for you feedback first.
For update 1: the confusing information just means it will help u skip step 2 and enter the following steps. We will rewrite it soon. Thanks.
For update 2: I don't know what exactly your project is, so I can't reproduce your problems. And if u not sure what this step changed for u, u can make a backup for your project and see diffs by using git.
I am trying to reproduce the count problem. If I get any process, I will update it. ~~

Sincerely,
Joye
Ra Jo Ga Cha, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Junior Member Beiträge: 77 Beitrittsdatum: 19.01.17 Neueste Beiträge
Hi Joye,

many thanks for your help, despite the problems I had, the tool is wonderful, especially describing code problems and how to solve them. Just one more feedback, for any of the steps changes, a changelog would be great.

Best regards,
Ra Jo.
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hi Ra Jo,

Wow, that's a good idea.

Sincerely,
Joye
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Joye,
I'm also facing problem in using Liferay Code Upgrade tool. I'm attaching the screenshot below. If you can help please.
Ra Jo Ga Cha, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Junior Member Beiträge: 77 Beitrittsdatum: 19.01.17 Neueste Beiträge
At first, try my steps in my first message to try to avoid errors or at least bring to the configuration to the "less complaining" state. Then, use the button she said, top-right. I'm marking it in your screenshot with a red circle. Hope it helps!
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hello Ujjainee,

Thanks for Ra Jo Ga Cha's answer.
Actually, Failed to execute Liferay Workspace Bundle Init Command is mainly cause by internet problem.
What this command did for u:
1. download Liferay Bundle from Internet( bundle url)
2. unzip liferay bundle into bundles folder under your liferay workspace root directory
You can do it manually and then skip this step by using show all pages as Ra Jo said.

If u still has problem about it, please let me know.

Joye
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Joye. I have downloaded Liferay bundle from internet only and unzipped it but I couldnot understand the workspace concept. It means I have to make a workspace first and there I need to keep my Liferay unzipped bundle?
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

There is the concept for Liferay Workspace.

For example, I have a Liferay 6.2 SDK project, and I want upgrade it to Liferay 7 workspace. For me, the directory is F:\liferay-upgrade\Liferay SDK 6
In order to reproduce your problem, I turn off my Internet.
1. before upgrade my directory will be like u1.
2. after failed the initBundle command,my directory will become like u2
3. it means your Sdk already turn into Liferay Workspace, you just need to add bundles to it manually, I create bundles folder under Liferay Workspace directory F:\liferay-upgrade\Liferay SDK 6\bundles, and then unzip my downloaded Liferay Bundle into it. Like u3.( And u can also put the zip file u have downloaded under your user directory like u4 , this will let u no need to download it again )
4. u almost finished step 2 by yourself, and then click show all pages to finish the following steps.

Hope that will be helpful~~
Regards,
Joye
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

By looking at your screenshot, it means u just want to upgrade Liferay SDK 7 to Liferay Workspace? Am I right?
Then it can be simple to do that.
1. create a liferay workspace project by using Liferay IDE.
2. create plugins-sdk folder under your workspace root directory
3. copy your whole sdk into plugins-sdk folder
4. run gradle task init-bundle in Liferay workspace project in Liferay IDE
Then, all the things done.
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Joye,
Actually I want to upgrade/migrate my Liferay 6.2 to Liferay DXP. Now I followed this link and tried to act like it-----https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/adapting-to-liferay-7s-api-with-the-code-upgrade-tool#step-1-welcome-to-the-liferay-code-upgrade-tool. But I received this error. If you can please elaborate to me all the steps which can help me migrate my Liferay 6.2 project to Liferay 7 it will be very helpful.
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

I would like to do that for u. But the detail steps depend on what exactly projects you have in your 62 SDK.
For example, if u have Lifereay Layout project in your SDK, you will need to upgrade layout files. If not, no need for that.(also for service builder step, custom JSP step).
One way to look what each step will do for u is clicking show all pages. Then read the descriptor in every page, it will show u the details.

If u still have problems, please feel free to ask.

Sincerely,
Joye
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Joye,
Actually I have a liferay 6.2 MVC portlet which has everything from service builder to custom jsps,css etc,etc. Yeah I have made it using 6.2 plugins sdk. Now I want to migrate it to Liferay DXP. Hope you can help me to solve this issue. And I have also arranged for open network. It will be provided to me soon. Then I would like to try again for the Code upgrade Tool as I was pointed out that it might be failing to execute the command for network issues as there are some security rules in our company. Till then if you can suggest me any other way to proceed it will be of great help.

Thanks in advance,
Ujjainee.
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

I just got a new idea for u. Do u notice that when u create a new Liferay Workspace in IDE, it provide u an optional box to choose whether u want to download liferay bundle or not. This means if u failed initBundle command in step 2, it just like u didn't check the optional checkbox. It doesn't matter for all your projects.
In Liferay IDE 3.1 m1, we just use liferay bundle from bundles folder in Convert Custom JSP step.
But in Liferay IDE 3.1 M2, if u don't have that folder, we will point it to your local Liferay Runtime in Convert Custom JSP step.

All the explanation means if u use Liferay IDE 3.1 m2, it will no side-effect for your download failure in step 2.
There are the download link for Liferay IDE 3.1 m2.

Hope that can be helpful~

Joye
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Yeah Joye! I just noticed the checkbox now. But do I need to import the project first or do I need to create a workspace project and do I need to import my 6.2 project in that workspace and then configure it with Code upgrade tool! Actually I'm a little confused now. Please if you can elaborate a little.


Sincerely,
Ujjainee.
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

It will be a little mixed with so many posts.
I will show u my steps with pictures.

1. my sdk 62 directory F:\liferay-upgrade\my-sdk-62(here need a sdk 62 nerver upgraded before)
2. turn off internet, choose update it to liferay workspace
It will be sucessful in step 2(just not download liferay bundles like we do not check the checkbox)

And I am happy for u solved the service builder problem. And I am using Liferay IDE 3.1 M2 for this test.
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Joye,
I'm facing this issue again and again. While my sdk path is correct, then why am I facing this issue? Can you please help.
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

I guess that your liferay.${username}.properties file has some problems.
You can try with import Liferay SDK wizard to see whether is right or not.

Hope it can works for u.

Sincerely,
Joye
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Thanks Joye,
I will be trying this. I have another doubt. Please if you can clarify. In Liferay 6.2 we used to keep our custom jsps in WEB-INF. In Liferay 7 where do we keep it?
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

Maybe u are looking for this OVERRIDING CORE JSPS.
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Thanks Joye for your tip of using Liferay upgrade tool. I have proceeded upto the configuring of project but no breaking changes are coming after that. But I'm getting descriptor files in step 4. Please can you clarify what the issues are(screenshots attached).
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

You can click the first icon in the right of this page( there is the function button for find break changes) emoticon
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Joye,
Yes I have seen that there are two options provided---the first button probably for manually changing and the second with "bandage icon" for automatically changing. But whenever I'm clicking them am getting the following error and hence my project is full of errors. So do I need to change them manually now? Won't the tool be of any help? Am providing you the screenshot. Am currently working on the project Assetmyinterest as you can see I'v pointed out in the pic. You can see in breaking changes only this much error is being pointed out for the same but in Project Explorer almost all the projects have cross marks. I also wanted to see whether autocorrect can help me or not but it is giving the following error.So what should I do now? Should I proceed manually or the tool can be of any help?
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjianee,

I have seen you problems now.
I will answer you questions in two aspects:
1. find breaking changes will help u find all your breaking changes
2. auto fix will help u fix the ones which can be fix automatically

And rest of them, u need to solve manually according to the file we provided( click the problem it will show the correcting advice).
Hope u can upgrade it successfully.

Joye
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Joye,
Sorry I can't get which file you are talking about. Have you attached any file along with your post? Because nothing is visible to me as such. And can you tell me how much time we approximately need to upgrade our Liferay 6.2 MVC portlet which also have service builder,custom jsps,etc etc associated with it. Actually there are so many errors that manually it is taking a lot of time. And another thing,can we upgrade Liferay 6.1 portlets also with this Code upgrade tool?
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

See the pictures I attached here. In the right side, it will tell u how to change your code.
As for the time, it real depend on how familiar u are with Liferay Portal Programming.
And for Liferay 6.1, we may provide support for it in code upgrade in the future version.
Another thing is that if u find is hard for u to correct some errors manually, u can write a new pure 7.0 project. And then write new code for your project by following the original logic.

Hope that can be helpful.

Best Regards,
Joye

Anhänge:

thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Yeah Joye,
I have manually solved the java files issues. Now when I'm trying to start my server the following error is coming. Can you please say what does this mean?
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

You can open another thread for this problem. It's mainly about Liferay Portal.
Your problem will be better resolved if u put it in that category.

Hope that will be resolved soon.

Best Regards,

Joye
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Joye,
Thanks a lot for all your help and support. I will open this issue on a separate thread and look for the solutions.


With warm regards,
Ujjainee.
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Joye,
Sorry to bother you again. Actually I have tried to use the Liferay Code Upgrade tool to migrate my projects. The simple projects are migrated easily which do not have any huge database or sql file. But the projects with associated sql files from 6.2 CE are not running. Can you please tell me how to migrate the database also from Liferay 6.2CE to Liferay DXP/7CE?
thumbnail
James Hinkey, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Junior Member Beiträge: 62 Beitrittsdatum: 15.02.11 Neueste Beiträge
Hi Ujjainee,

Are you talking about the Liferay Portal database tables or an app's tables?

To upgrade Portal's database, see the upgrade instructions in the Deployment Guide.

Best regards,
Jim
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello James,
I'm talking about Liferay tables---the tables which were created when we built our liferay projects on 6.2CE. Thanks for the article. I shall go through it and let you know whether I face any problem or not.
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Joye,
can you help me with another problem also. As I was trying to change the project manually I'm facing this problem as to select what as my project template. When I'm selecting "service builder" and I'm writing my code which extends MVCPortlet I'm getting an exception error and when I'm using "mvc portlet" I'm getting error in service files. Now I need to combine both as we did in 6.2. So what is the way to do it in liferay 7?
thumbnail
Joye Luo, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 144 Beitrittsdatum: 03.05.16 Neueste Beiträge
Hey Ujjainee,

Yeah, There is a blog about How can we reference this service module in a mvc portlet module? Follow the example in this blog, u will know how to figure it out.

Hope that will be helpful~

Joye
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Thanks a lot Joye for the blog! I also referred to some youtube tutorials and manually am very close now to solve the issues. emoticon
thumbnail
Andy Wu, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 195 Beitrittsdatum: 05.05.15 Neueste Beiträge
hi Ujjainee, there maybe error log about then "Failed to execute initBundle" , can you port the error log here ?
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Andy. I didnot receive any log in the console but just received few warnings in the marker area.
thumbnail
Andy Wu, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 195 Beitrittsdatum: 05.05.15 Neueste Beiträge
yes , you can go to the error log view to see if there are any related log and open it and post it here .
thumbnail
Ujjainee Sarkar, geändert vor 7 Jahren.

RE: Liferay Code Upgrade Tool not working

Regular Member Beiträge: 127 Beitrittsdatum: 20.07.16 Neueste Beiträge
Hello Andy. Actually I didnt have the screenshot of the previous error log of the upgrade code so I tried to do the entire process again and give you the error log. But as you can see(screenshot attached) everything remaining same I'm not getting the option of importing my project and this new error is coming. Can you please help. I have made a new workspace for using this tool. The previous workspace was workspace 3 and now it is workspace 5.