掲示板

Scheduler not sending jobs

6年前 に Micael Ericsson によって更新されました。

Scheduler not sending jobs

Regular Member 投稿: 169 参加年月日: 12/12/11 最新の投稿
Hi Neil

I'll look into replacing on LiferayFacesContext. Thanks for the information.

Another problem has occured. I am not sure it't related to new versions of liferay faces libs but thats the only I have changed (I thinkemoticon).
I have a scheduler-portlet which triggers a send sms/email function. From 1st of september this portlet has stopped working. No new send jobs have been created since that date. Below is settings in liferay.portlet.xml.

Since we are one week from release date this has high prio for us. Can you see if anything with liferay faces built can affect scheduler event?

<portlet>
		<portlet-name>Utskick</portlet-name>
		<scheduler-entry>
		  <scheduler-description>utskick-scheduler</scheduler-description>
		  <scheduler-event-listener-class>se.trm.utskick.UtskickJob</scheduler-event-listener-class>
		  <trigger>
			<!--simple>
				<simple-trigger-value>12</simple-trigger-value>
				<time-unit>hour</time-unit>
			</simple-->
			<!--
			Se http://quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger för beskrivning av
			syntaxen för det cronjob som Liferay använder.
			Värdet nedan betyder var 10e minut 8-17
			0 0/10 8-17 * * ? 
			-->
			<cron>
				<cron-trigger-value>0 0/10 8-17 * * ?</cron-trigger-value>
			</cron>
		  </trigger>
	   </scheduler-entry>
       <private-session-attributes>false</private-session-attributes>
	</portlet>
thumbnail
6年前 に Neil Griffin によって更新されました。

RE: Scheduler not sending jobs

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
Hi Micael,

I split the thread since this is technically a separate question.

Normally we try to focus on JSF specific issues in the Liferay Faces forum, but we would be happy to take a look -- please provide an SSCCE that would help us reproduce the issue (preferable a Maven-based project).

Thanks,

Neil
6年前 に Micael Ericsson によって更新されました。

RE: Scheduler not sending jobs

Regular Member 投稿: 169 参加年月日: 12/12/11 最新の投稿
Hi Neil

Portlet name is SchedulerTest. (Ignore old TestPortlet). I've been able to reproduce working scheduler and not working scheduler portlet, only by building with different versions of liferay faces libs.
Included zip has 3 versions of pom.xml:
  • pomR15.xml. Working version with older liferay faces libs (including special TRM-version)
  • REALEASEpom.xml. Version with release build of liferay faces. Not working.
  • SNAPSHOTpom.xml. Version with snapshot build of liferay faces. Not working.

Included is also special TRM-lib which is needed to build with pomR15. Current pom.xml is a copy of R15pom.xml - latest try.

Since I have today and monday before release I will build release with R15 setup. But I will continue to test and evaluate your suggestions and when it's working we will have another release.
thumbnail
6年前 に Neil Griffin によって更新されました。

RE: Scheduler not sending jobs

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
Hi Micael,

Thank you for providing the reproducer. Note that I had to make the following changes in order to get SchedulerPortlet to build and deploy correctly:

- Added missing module to portlets/pom.xml which prevented the portlet from building:

<module>SchedulerTest</module>

- Added missing descriptor: portlets/SchedulerTest/src/main/webapp/WEB-INF/faces-config.xml

- Added missing dependency from portlets/SchedulerTest/pom.xml since PRIMEFACES_MOBILE renderKitId is specified:

<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
</dependency>

- Added missing XHTML file due to the following error on render:
15:36:54,526 ERROR [ExternalContextCompat_2_0_Impl:491] Status code 404: /views/utloggadIntro.xhtml Not Found in ExternalContext as a Resource

- Removed non-functioning util-slf4j.jar from src/main/webapp/WEB-INF/liferay-plugin-package.properties

- It its place, addeddependency in portlets/SchedulerTest/pom.xml which was preventing output of logger messages to the console:

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

- Moved log4j.xml from incorrect src/test/resources to src/main/resources which was preventing output of logger messages to the console:

mv ./portlets/SchedulerTest/src/test/resources/log4j.xml portlets/SchedulerTest/src/main/resources

These changes can be found in the attached Root.zip archive.

I tried it with Liferay Portal 6.2.5 CE GA4 and I am happy to report that the scheduler worked correctly with the recently released Liferay Faces jars. emoticon

Note that I built it with the Java 1.8 JDK and ran with the Java 1.8 JRE. It also worked when I built it with the Java 1.7 JDK and ran with the Java 1.7 JRE.

Kind Regards,

Neil

添付ファイル:

6年前 に Micael Ericsson によって更新されました。

RE: Scheduler not sending jobs

Regular Member 投稿: 169 参加年月日: 12/12/11 最新の投稿
Hi Neil

Thank you for taking the time to correct my sloppy work. I built SchedulerTest from NetBeans and it worked so I thought, wrongly, that the structure should hold. Time pressure of coming release I guessemoticon.

Testing your supplied Root-structure, building with maven, worked fine. Deploying and testing SchedulerTest also worked fine. Something strange here since this didn't work last time. It could be a NetBeans related problem since I had similar build problem with the "memory" issue.

But still my real scheduler portlet doesn't work. And that portlet is built with maven. This week is occupied with release and other stuff. The release will be done with last working version och liferay faces. This is unfortunately but there is no time to analyze, fix and test whats wrong at the moment. When I am back next wednesday I will compare real and test scheduler portlet in order to figure out whats wrong.

Regards,
Micael
6年前 に Micael Ericsson によって更新されました。

RE: Scheduler not sending jobs

Regular Member 投稿: 169 参加年月日: 12/12/11 最新の投稿
Hi Neil

Finally I had some time to look at this problem.
I compared working SchedularTest with not working Utskick portlet.
Pretty quick I noticed that configuration file faces-config.xml was missing in our Utskick portlet. Adding this fil, rebuilding and testing - now it's working. When this file disappeared or if it's never been there I don't. But it's working now so this issue can ble closed.

Thanks again for taking time to help me with test portlet.

Regards,
Micael
thumbnail
6年前 に Neil Griffin によって更新されました。

RE: Scheduler not sending jobs

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
Hi Micael,

It was my pleasure to help. Thanks for letting us know that it is working for you now.

Kind Regards,

Neil