RE: Reg : issues with upgrading service builder portlet

Ramchand Gururajan, modified 8 Years ago. Junior Member Posts: 33 Join Date: 4/5/16 Recent Posts
Hi Folks,
We had used service builder portlets in 6.2 .
For the DXP upgrade , we have made them into OSGI complaint modules ( api , service , web) & tested this in a standalone instance of the Liferay DXP bundle it works fine.
Now as the the next step , we upgraded the DB of 6.2 instance to DXP using code upgrade tool , after we DB upgrade we deployed OSGI equivalent jar of this portlet & we found below issues.

1) In old pages where this portlet was deployed we got messages "This portlet has been undeployed. Please redeploy it or remove it from the page. "
--> Kindly let us know how to ensure new OSGI complaint portlets automatically come up here .

2) We tried manually configuring the portlet from Add Application , screen & find it is throwing the error , NPE in getService() service
. The service module is started in lb console , but we still get this error. When we scrolled in logs , we found below lines when the service module was getting deployed

Caused by: org.postgresql.util.PSQLException: ERROR: relation "XXXXXXX" already exists


Kindly let us know how to over come these issues.

regards,
Ramchand G
thumbnail
Alberto Chaparro, modified 8 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts
Hi Ramchand,

Please the following thread to solve your issue:
https://web.liferay.com/es/community/forums/-/message_boards/view_message/99729329

Regards.
Ramchand Gururajan, modified 8 Years ago. Junior Member Posts: 33 Join Date: 4/5/16 Recent Posts
Hi Alberto,
Thanks a lot . Will check this out.

"This portlet has been undeployed. Please redeploy it or remove it from the page. " Will the above link resolve this issue as well?

regards,
Ramchand.
thumbnail
Alberto Chaparro, modified 8 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts
Hi Ramchand,

It seems that the portal does not recognize the new portlet. Have you changed the id of the portlet? If so, you should create an upgrade process to modify of all records from old id to the new id.

Let me know if it works.

Regards.
Ramchand Gururajan, modified 8 Years ago. Junior Member Posts: 33 Join Date: 4/5/16 Recent Posts
Hi Alberto,
No we did not change id of the portlet. We did not use any id attribute in 6.2 as well.
It appears 6.2 has created portlets in page with following conventions since this shown as header in side.

<<PORTLETNAME>>_WAR_<<WARNAME>> .

Any pointers on resolving the issue would be great ?

Note : We have successfully resolved service table creation issue now. Thanks for the help on this.

regards,
Ramchand.
thumbnail
Alberto Chaparro, modified 8 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts
Verify that the javax.portlet.name is the same than in 6.2. This is an example about where that name is defined:
https://github.com/achaparro/liferay-portal/blob/master/modules/apps/chat/chat-web/src/main/java/com/liferay/chat/web/portlet/ChatPortlet.java#L49

If you have another name, you have two options:
- Use the previous one used in 6.2
- Do an upgrade process to switch to the new name in all tables. Like this:
https://github.com/achaparro/liferay-portal/blob/master/modules/apps/chat/chat-web/src/main/java/com/liferay/chat/web/upgrade/ChatWebUpgrade.java

I hope it helps.
Ramchand Gururajan, modified 8 Years ago. Junior Member Posts: 33 Join Date: 4/5/16 Recent Posts
Thanks a lot. This helped us a lot.

regards,
Ramchand
Ramchand Gururajan, modified 8 Years ago. Junior Member Posts: 33 Join Date: 4/5/16 Recent Posts
Hi Alberto,
Unfortunately we landed into another issue.

Now the service is not getting registered. Though its deployed & in active state.

When we use XXXLocalServiceUtil.getXXXX() , this throwing null internally getService() method used inside.
When we try to use @Reference , the portlet is coming not up in Add application like shown in link https://web.liferay.com/community/forums/-/message_boards/message/103346926 .

There are some work arounds provided for gradle , but we are using maven in our case , so we are not able to use them.

Kindly provide us few pointers which can help us to resolve the service not registered issue .

regards,
Ramchand
thumbnail
Abhishek Jain, modified 7 Years ago. Regular Member Posts: 226 Join Date: 8/20/16 Recent Posts
I am too facing the same problem...the service is not getting registered though it is showing active status. I have also run the upgrade process changing the servletcontext name in the release_ table ..Please help ...any help would be appreciated.
thumbnail
Alberto Chaparro, modified 7 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts

Hi Abhishek,

 

Please, provide more information about what you did: " I have also run the upgrade process changing the servletcontext name in the release_ table"

 

Thanks.