Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-47411

Unable to Schedule a job by class instance - NPE is thrown



      Issue: If you create a job using an instance of a Listener instead of the Class Name of the Listener, no job is created.

      Steps to Reproduce:

      1) Deploy my demo portlet and add it to a page.
      2) Ensure no Scheduled Jobs are present.
      3) Click the Actions Button.
      4) Select "Create Job (Schedule Entry using Class)"
      5) Notice a new Scheduled Job appears.
      6) Delete it.
      7) Click the Actions Button
      8) Select "Create Job (Schedule Entry using Class Instance)"

      Expected Job: A job is created and is displayed in the Portlet as in Step 5.
      ACtual Result: No job is created and no job displays in the Portlet.

      there is only 1 line of code different between the two.
      <code>entry.setEventListener(new MyMessageListener());</code>

      Tested and reproduced in 6.2.x and Trunk

      trunk commit 90f9fa55878283ea66bbbafd58cf66363454f8f6
      6.2.x commit 9e06fc42a2ef3d265c97f9f0a2fd123e963decb5

      (To test the Portlet in Trunk, open the WAR file and change the Liferay Version to 7.0.0 in the liferay-plugin-package.properties file).


          Issue Links



              • Assignee:
                felix.zhang Felix Zhang
                andrew.betts Andrew Betts
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created:
                  Days since last comment:
                  6 years, 12 weeks, 5 days ago


                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1