4 Replies Latest reply on Jul 25, 2011 10:11 AM by Eyal NameToUpdate

    Read input file over the network with BL Jython

      Hi All,

       

      I'm using Blade Logic 8.0.6.622 with Jython 2.5.2

       

      I'm trying to read a version number from a text file using jython.

       

      I wrote this script:

      import os
      filePath = os.path.normpath("//fileserver/deploy/trunk/version.txt")
      versionFile = open(filePath)
      componentVersion = versionFile.read()
      versionFile.close()
      print componentVersion
      


      and it works when I execute it on the Blade Logic application server using the base jython.bat

       

      I am trying to run the jython script as a Blade Logic job as suggested in https://communities.bmc.com/communities/message/127661#127661

       

      I created an NSH script of type 2 (execute the script once), that calls my jython script.

       

      "/D/Program Files/BMC Software/BladeLogic/8.0/NSH/bin/bljython.bat" "D:\General\Create_Package\CreateDeployProcess.jy"

       

      but I get the error:

      Error 22:49:53 04/07/2011 IOError: [Errno 2] No such file or directory.

       

      Is that an authentication problem?

      I tried using the automation principles to set authentication - but I get the exact same error.

       

      Thanks,

      Eyal