掲示板

Deploy module and service builder over other lifer server

thumbnail
6年前 に Viviana Salcedo によって更新されました。

Deploy module and service builder over other lifer server

New Member 投稿: 10 参加年月日: 17/09/25 最新の投稿
Hello,

I am new at liferay. At the moment I have created a module witch consume data from a service builder that connected ddmcontent table. I haver test it and it works fine over my localhost server of liferay. Now I have to deploy the same module and service builder on the server of liferay I haver running over an AWS instance.

I try using *.jar files located on my local server ($ {liferayworkspace}/bundles/osgi/modules/) and pasting them on my server on AWS, this time I paste the files over $ {liferaydirectory}/deploy/. Then I try accessing the new module but I have this error con catalina.out:

15:45:18,881 ERROR [http-nio-8080-exec-2][render_portlet_jsp:131] null
java.lang.NullPointerException
at com.enmarkate.service.ddmcontentLocalServiceUtil.getddmcontentsCount(ddmcontentLocalServiceUtil.java:149)
at com.enmarkate.portlet.CampanhaPortlet.doView(CampanhaPortlet.java:55)
at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:303)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:497)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:262)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.render(MVCPortlet.java:317)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:57)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117)
at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:530)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:605)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:391)
at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.render(MonitoringInvokerPortlet.java:265)
[centos@ip-10-0-0-82 logs]$ packet_write_wait: Connection to 35.163.3.229 port 22: Broken pipe


The line 55 of my class is just a print line of the item count over the ddmcontent table:
int ddmcount = ddmcontentLocalServiceUtil.getddmcontentsCount();
System.out.println("DDMContent count is ===> " +ddmcount);

I have to clarify that the same module is working on my local server.

Does anyone have idea of what it is going on?

Thank you!
thumbnail
6年前 に David H Nebinger によって更新されました。

RE: Deploy module and service builder over other lifer server

Liferay Legend 投稿: 14917 参加年月日: 06/09/02 最新の投稿
First, don't try to paste across the net to the deploy folder. Liferay will often start trying to process the file before it has been fully uploaded and may end up blacklisting the file. Instead, for network copies, you want to upload to another location and then move into deploy folder locally.

Next, your naming seems a little questionable. ddmcontentLocalServiceUtil seems to be a play on the DDMContentLocalServiceUtil which is a static class, one that you shouldn't be doing a create on nor a reference injection.









Come meet me at 2017 LSNA!
thumbnail
6年前 に Viviana Salcedo によって更新されました。

RE: Deploy module and service builder over other lifer server

New Member 投稿: 10 参加年月日: 17/09/25 最新の投稿
I download the JAR files to my virtual machine on anther folder and the copied one by one the file to deploy folder. Is there a better way to deploy the module and service and api JAR files?
By the way, I don't know if DDMContentLocalServiceUtil can be used in my module.
thumbnail
6年前 に David H Nebinger によって更新されました。

RE: Deploy module and service builder over other lifer server

Liferay Legend 投稿: 14917 参加年月日: 06/09/02 最新の投稿
Viviana Salcedo:
I download the JAR files to my virtual machine on anther folder and the copied one by one the file to deploy folder. Is there a better way to deploy the module and service and api JAR files?


At this point, no. That said, last week at Devcon I learned about OSGi subsystems; I'm currently doing some research on these as I believe it will help with many possible deployment issues.

By the way, I don't know if DDMContentLocalServiceUtil can be used in my module.


Well, you shouldn't, of course. Normally you would see code like:

  @Reference(unbind = "-")
  protected void setDDMContentLocalService(final DDMContentLocalService ddmContentLocalService) {
    _ddmContentLocalService = ddmContentLocalService;
  }

  private DDMContentLocalService _ddmContentLocalService;


This would be the service instance that you would reference and use in your code.








Come meet me at 2017 LSNA!