Topic
8 replies Latest Post - ‏2014-08-25T16:23:01Z by mymaestro
SystemAdmin
SystemAdmin
194 Posts
ACCEPTED ANSWER

Pinned topic TWS 8.5.1 creating Java/Database Jobs

‏2012-08-27T04:41:04Z |
Using Tivoli workload scheduler 8.5.1 how to achieve following objectives:

Objective1: To access database(Oracle/MySQL) tables using Tivoli Workload Scheduler, here by Access I mean CRUD operations.

Objective2: To execute Java Classes through TWS instead of scheduling their scripts, and can we pass arguments along with it?

If these are not possible in 8.5.1, Please let us know in which version it is possible and suggest how to achieve these step by step.
Updated on 2012-09-14T13:02:46Z at 2012-09-14T13:02:46Z by SystemAdmin
  • umberto.caselli
    umberto.caselli
    9 Posts
    ACCEPTED ANSWER

    Re: TWS 8.5.1 creating Java/Database Jobs

    ‏2012-08-28T15:05:00Z  in response to SystemAdmin
    Hello,
    regarding objective 1: you can natively run SQL jobs with the "Database" job type (see http://pic.dhe.ibm.com/infocenter/tivihelp/v47r1/index.jsp?topic=%2Fcom.ibm.tivoli.itws.doc_8.6%2Fawsrgjobdefndb.htm)

    regarding objective 2: you can natively run your java class and pass arguments see (http://pic.dhe.ibm.com/infocenter/tivihelp/v47r1/index.jsp?topic=%2Fcom.ibm.tivoli.itws.doc_8.6%2Fawsrgjobdefnjava.htm)

    The database job type was already present in 8.5.1 while the java job type was added in 8.6.

    My suggestion is to upgrade to 8.6 before using these job types because the usability was much improved.

    Let me know if you need more details.
    Thanks, Umberto
    • SystemAdmin
      SystemAdmin
      194 Posts
      ACCEPTED ANSWER

      Re: TWS 8.5.1 creating Java/Database Jobs

      ‏2012-09-14T07:54:02Z  in response to umberto.caselli
      Thanks a ton Umberto.

      I've successfully creating the java job. Now i'm trying to create Database Job, and there I can see two types of defining it:

      1. Predefined (Oracle, DB2, MSSQL)
      2. Custom

      My query is: can we have MySQL as a Custom type. Also while creating job using Predefined(DB2) i'm always getting is message:

      AWSJCS011E An internal error has occurred. The error is the following: "AWSRES003E The REST service cannot be contacted. The internal error message is: Read timed out.".

      How can i get this fixed.

      Thanks Again

      Regards,
      Anand
  • SystemAdmin
    SystemAdmin
    194 Posts
    ACCEPTED ANSWER

    Re: TWS 8.5.1 creating Java/Database Jobs

    ‏2012-09-14T09:24:59Z  in response to SystemAdmin
    Previous question was answered, and posted a new question in the last post.
    • SystemAdmin
      SystemAdmin
      194 Posts
      ACCEPTED ANSWER

      Re: TWS 8.5.1 creating Java/Database Jobs

      ‏2012-09-14T09:45:41Z  in response to SystemAdmin
      I was not providing the JDBC jar class path. Now i have provided it and the following error is coming:
      Please help me to fix this out.

      AWSJCS011E An internal error has occurred. The error is the following: "AWKJDE142E The get execution log could not be requested from the address "https://bhukrk219280d:31114/ita/JobManager"
      The following error occurred: "AWSITA122E A Java exception occurred while calling the command "TestConnection". " ".
      Regards,
      Anand
      • umberto.caselli
        umberto.caselli
        9 Posts
        ACCEPTED ANSWER

        Re: TWS 8.5.1 creating Java/Database Jobs

        ‏2012-09-14T10:03:04Z  in response to SystemAdmin
        Hello Anand,
        can you check the JobManager_message.log file on the agent and see if there are additional details?
        The log files in the /opt/ibm/TWA86/TWS/JavaExt/logs directory may also have addition information.

        In case you don't find an appropriate error message you can:

        1. Stop the agent
        2. Edit the /opt/ibm/TWA86/TWS/JavaExt/cfg/logging.properties file
        3. Set the .level = ALL
        4. Start the agent
        5. Run the scenario
        6. Check the log files in the /opt/ibm/TWA86/TWS/JavaExt/logs directory.

        Thanks, Umberto
        • SystemAdmin
          SystemAdmin
          194 Posts
          ACCEPTED ANSWER

          Re: TWS 8.5.1 creating Java/Database Jobs

          ‏2012-09-14T13:02:46Z  in response to umberto.caselli
          Hi Umberto,

          I've set the level to ALL, the logs are coming but not the file name you mentioned, it is getting generated in the file named as javaExecutor0.log etc.

          Following is the logs generating while executing the Database Job using Oracle as a database:

          Sep 14, 2012 6:24:30 PM com.ibm.scheduling.agent.core.jobexecutor.LocalJobExecutorManager executeJob
          SEVERE: The following execption occured while executing job 'BHUKRK219280D_1#JOBS.DATABASE2.JNUM-81088074'
          Throwable occurred: com.ibm.scheduling.exception.OperationFailedException: oracle.jdbc.driver.DMSFactory (initialization failure)
          at com.ibm.scheduling.jobexecutor.JobExecutorManagerSupport.connectAndExecute(JobExecutorManagerSupport.java:139)
          at com.ibm.scheduling.agent.core.jobexecutor.LocalJobExecutorManager.executeJob(LocalJobExecutorManager.java:137)
          at com.ibm.scheduling.osgi.Framework.executeJob(Framework.java:105)

          Caused by: java.lang.NoClassDefFoundError: oracle.jdbc.driver.DMSFactory (initialization failure)
          at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
          at oracle.jdbc.driver.PhysicalConnection.createDMSSensors(PhysicalConnection.java:3601)
          at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:626)
          at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:222)
          at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
          at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:542)
          at com.ibm.scheduling.agent.database.jobexecutor.FakeDriver.connect(FakeDriver.java:38)
          at java.sql.DriverManager.getConnection(DriverManager.java:322)
          at java.sql.DriverManager.getConnection(DriverManager.java:358)
          at com.ibm.scheduling.agent.database.jobexecutor.DatabaseJobExecutor.createConnection(DatabaseJobExecutor.java:319)
          at com.ibm.scheduling.agent.database.jobexecutor.DatabaseJobExecutor.execute(DatabaseJobExecutor.java:466)
          at com.ibm.scheduling.jobexecutor.JobExecutorManagerSupport.execute(JobExecutorManagerSupport.java:349)
          at com.ibm.scheduling.jobexecutor.JobExecutorManagerSupport.connectAndExecute(JobExecutorManagerSupport.java:135)
          at com.ibm.scheduling.agent.core.jobexecutor.LocalJobExecutorManager.executeJob(LocalJobExecutorManager.java:137)
          at com.ibm.scheduling.osgi.Framework.executeJob(Framework.java:105)
          Please note that I've also created a Database Job using DB2, and the job executed succesfully.

          Thanks Again.

          Regards,
          Anand
  • HastinSihombing
    HastinSihombing
    3 Posts
    ACCEPTED ANSWER

    Re: TWS 8.5.1 creating Java/Database Jobs

    ‏2014-08-19T06:07:45Z  in response to SystemAdmin

    hello there,

     

    I've got the same error when try to test make some mssql jobs on TWS 8.6

     

    this is the error : AWSJCS011E An internal error has occurred. The error is the following: "AWKJDE505E The command cannot be executed on the agent at the address "https://192.168.40.135:31114/ita/JobManager"

    The following error occurred: "AWSRES003E The REST service cannot be contacted. Check the existence of firewall rules or some issues on the dns side resolving the server hostname that could prevent contacting the service. The internal error message is: Connection reset." ".

     

    could someone to help me..

    many thanks,

    Hastin Sihombing

    • mymaestro
      mymaestro
      199 Posts
      ACCEPTED ANSWER

      Re: TWS 8.5.1 creating Java/Database Jobs

      ‏2014-08-25T16:23:01Z  in response to HastinSihombing

      This is a different problem. Please start a new thread.