Skip to Content
author's profile photo Former Member
Former Member

Custom Scheduled Task

I've been over this it seems a 1000 times but I have to be missing something. I'm going to lay it out in what I hope to be enough detail so someone can tell me where things are going wrong.

Environment:

- Target platform - EP6.0 SP2

- SAP Developer Studio 2.0.11

Goal:

Create a custom task that can be run via the KM Scheduler that has access to portal specific information (users, etc).

Current Process:

- Follow Prakash Singh's article on creating a KM scheduled task (Did you know you can schedule jobs in portal using KM's Scheduler Task?) (create a portal app project, and use the Service, Filter, and Task generation wizard specifying EP6SP2)

- Before deploying the PAR, copy the 'local' folder under src.config to the same location but rename 'install'. (this keeps the PAR from erroring during building. Will get 'Cannot create config archive (you should have a valid data or meta folder)' error if I dont). <- I suspect that this step may be part of my issue.

- PAR deploys fine, will see a JDBC error (null pointer exception in the JDBC driver) in the log upon first deployment, (Strange since I'm not using JDBC here) but does not seem to affect the application. Possibly related to Hot Deployment issues of scheduled tasks (Problem with scheduler task and Scheduling ISchedulerTask)

when the server restarts the application loads OK.

- Task shows in KM Scheduler, and can configure schedule OK but no execution. No mention in the logs even with System.out statements. Its as if the task is not being executed at all. Even if I deliberately put in an error (div/0) I will not see anything in the console logs.

I have been through the component monitor and it seems that everything is running fine but the scheduled tasks do not execute.

JDBC Error in detail:

Loading application: ScheduledTestTask8

Loading services:

Loading service: ScheduledTestTask8|RFServiceWrapper

java.lang.NullPointerException

at com.sapportals.wcm.repository.service.eventlog.jdbc.JDBCConnection.log(JDBCConnection.java:129)

at com.sapportals.wcm.repository.service.eventlog.jdbc.EventLoggerThread.run(EventLoggerThread.java:74)

com.sapportals.wcm.service.applog.AppLogException: [SAP_Portals][SQLServer JDBC Driver][SQLServer]

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Sep 27, 2005 at 07:47 PM

    Hi Curt,

    first, welcome on SDN!

    About your question:

    Generally, I wouldn't advise to use NWDS to create config archives for SP2, even if this should be possible by theory; anyhow, if the Scheduler Task appears after deployment, this might have worked. But maybe not completely, who knows...

    Instead of deploying the config archive, you can also add all entries manually into the configuration. Try this.

    If it doesn't work, and if you haven't done this already, strip down your implementation to an absolute minimum (let's say schedule a single line, logging for example). Check if the RFWrapper Service get called correctly.

    If all this won't do it, you can mail me the project; it's hard to check everything offline. But it may take some days until I have the possibility to go through it.

    Hope it helps

    Detlev

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Ok, I've narrowed it down to the SchedulerService Task. I have gotten the test tasks to run in our secondary testing environment. Now I just have to figure out why our SchedulingService task is not starting correctly in our dev environment.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.