Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Kowbathullah Gnaniyar
Required Deployment Context Issue
June 27, 2013 5:09 AM
Answer

Kowbathullah Gnaniyar

Rank: Liferay Master

Posts: 606

Join Date: December 19, 2007

Recent Posts

To use the dependency service jar file from my hook, i added this property

1"required-deployment-contexts=common-services-portlet"
in my hook plugin's
liferay-plugin-package.properties.


But whenever i deploy , hook is not deployed because it shows
"Queueing My-hook for deploy because it is missing common-services-portlet""
.

I have tried all the way restarted the server and clean deploy , etc... But no luck it is not deploying properly.

After continuous deployment and cleaning temp folder it works fine some time.

Everytime we are facing this issue which kills our development time. Has Anybody faced this situation in Liferay 6.1 CE.?
David H Nebinger
RE: Required Deployment Context Issue
June 27, 2013 7:13 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11108

Join Date: September 1, 2006

Recent Posts

Hooks have no context of their own, they are used to hook the Liferay (ROOT) application. You cannot add a required deployment context to a hook.
Kowbathullah Gnaniyar
RE: Required Deployment Context Issue
June 27, 2013 8:05 AM
Answer

Kowbathullah Gnaniyar

Rank: Liferay Master

Posts: 606

Join Date: December 19, 2007

Recent Posts

//Hooks have no context of their own, they are used to hook the Liferay (ROOT) application. You cannot add a required deployment context to a hook. //


No. I have tried adding required deployment contexts with many hooks. It works fine. It just copies dependent jar file when deploying.

I am facing this issue even for portlet plugins also. Thanks for your quick reply.
vaseem bari
RE: Required Deployment Context Issue
October 24, 2013 5:22 AM
Answer

vaseem bari

Rank: Junior Member

Posts: 79

Join Date: March 26, 2008

Recent Posts

Hello,

I am also facing dependency issue. changed the tomcat bundle also, no success. Any help !!!!!


Vaseem bari
Kowbathullah Gnaniyar
RE: Required Deployment Context Issue
May 15, 2014 12:02 AM
Answer

Kowbathullah Gnaniyar

Rank: Liferay Master

Posts: 606

Join Date: December 19, 2007

Recent Posts

Once we declared required-deployment-contexts for any plugin, it should copy that jar file. But why we are getting "<plugin1> is still in queue and missing <plugin2>"....

Any solution from Liferay?
Kevin Rosso
RE: Required Deployment Context Issue
September 23, 2014 12:53 PM
Answer

Kevin Rosso

Rank: New Member

Posts: 4

Join Date: June 28, 2013

Recent Posts

Have you been able to solve this issue? I am also trying to add a portlet within a hook using required-deployment-contexts and am also receiving the message:
19:17:46,532 INFO [localhost-startStop-4][HotDeployEvent:109] Plugin my-hook requires my-remote-services-portlet-branch-3.0
19:17:46,809 INFO [localhost-startStop-4][HotDeployImpl:233] Queueing my-hook for deploy because it is missing my-remote-services-portlet-branch-3.0

Please let me know if you made any progress on this. If it is not possible as was mentioned above, what direction did you take?
Andrew Jardine
RE: Required Deployment Context Issue
September 23, 2014 1:22 PM
Answer

Andrew Jardine

Community Moderator

Rank: Liferay Legend

Posts: 1062

Join Date: December 22, 2010

Recent Posts

Kevin,

If that portlet is a service builder portlet, then you can move the jar file that contains the services stuff to the TOMCAT_HOME/lib/ext and remove the plugin dependency.
David H Nebinger
RE: Required Deployment Context Issue
September 23, 2014 1:52 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11108

Join Date: September 1, 2006

Recent Posts

If that portlet is a service builder portlet, then you can move the jar file that contains the services stuff to the TOMCAT_HOME/lib/ext and remove the plugin dependency.


Note, however, this has some bad side effects:

1) there should not be any other copy of the service jar in the webapps folder, so when deploying an update you need to then shut down tomcat to move the service jar to lib/ext overwriting the old one.
2) you cannot overwrite a jar from lib/ext while tomcat is running. This forces an app container restart on you at every deployment.
Kevin Rosso
RE: Required Deployment Context Issue
September 24, 2014 6:46 AM
Answer

Kevin Rosso

Rank: New Member

Posts: 4

Join Date: June 28, 2013

Recent Posts

Andrew,
When I move the .jar that contains the services, the hook deploys...but then when attempting to use the service code, I receive this error:
13:44:27,691 ERROR [http-bio-8080-exec-6][PortletBeanLocatorUtil:38] BeanLocator is null for servlet context my-remote-services-portlet-branch-3.0
13:44:27,698 ERROR [http-bio-8080-exec-6][render_portlet_jsp:154] com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set for servlet context my-remote-services-portlet-branch-3.0

Any ideas?
David H Nebinger
RE: Required Deployment Context Issue
September 24, 2014 6:56 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11108

Join Date: September 1, 2006

Recent Posts

This happens if you are trying to use the service jar before the plugin providing the service has loaded.

Can also happen if the service jar is deployed but the plugin providing the service is not deployed or not starting.
Kevin Rosso
RE: Required Deployment Context Issue
September 24, 2014 7:22 AM
Answer

Kevin Rosso

Rank: New Member

Posts: 4

Join Date: June 28, 2013

Recent Posts

My SB code is contained in a portlet that is deployed and I've also copied the .jar that it produces to the lib/ext folder within Tomcat. I call the service code from a hook and the same error happens every time. Do I need to try removing something? Adding something?
David H Nebinger
RE: Required Deployment Context Issue
September 24, 2014 7:24 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11108

Join Date: September 1, 2006

Recent Posts

Are you trying to invoke the service before it's available? I.e. some startup action or something?
Kevin Rosso
RE: Required Deployment Context Issue
September 24, 2014 7:26 AM
Answer

Kevin Rosso

Rank: New Member

Posts: 4

Join Date: June 28, 2013

Recent Posts

No. The service code is not called upon until a user selects to 'Edit' another user via the control panel