Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Reg : issues with upgrading service builder portlet
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. "
2) We tried manually configuring the portlet from Add Application , screen & find it is throwing the error , NPE in getService() service
Kindly let us know how to over come these issues.
regards,
Ramchand G
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 existsKindly let us know how to over come these issues.
regards,
Ramchand G
Hi Ramchand,
Please the following thread to solve your issue:
https://web.liferay.com/es/community/forums/-/message_boards/view_message/99729329
Regards.
Please the following thread to solve your issue:
https://web.liferay.com/es/community/forums/-/message_boards/view_message/99729329
Regards.
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.
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.
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.
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.
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.
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.
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.
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.
Thanks a lot. This helped us a lot.
regards,
Ramchand
regards,
Ramchand
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
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
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.
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.