10 Replies Latest reply on Oct 30, 2015 5:19 AM by Reinhard Vielhaber

    Unable to run unreleased commands within Jython

      Hi everybody!


      I am trying to run unreleased commands within Jython, unfortunately without any luck yet.


      My installation contains Jython 2.5.2 and BL 8.0 SP10.


      I have found some discussion around unreleased commands in here and have set  a jvm argument in bljythonexe.cfg to be




      In that discussion bljython.cfg was mentioned. Somehow after installing RCP locally no bljython.cfg gets created. The only similar file I have is bljythonexe.cfg.


      Now everytime I run my command from within Jython I get following output: 

      2012-01-10 13:49:41,701 -  BladelogicXMLRpcService - Thread - ERROR - chw12345675 : 
      com.bladelogic.cli.factory.CommandNotFoundException: R: Cannot find command : PropertySetInstance, 
      findPropertySetInstanceByDBKey CHM06065743.ch.ad.hedani.net - - 
      [10/Jan/2012 13:49:41] "POST /RPC2 HTTP/1.1" 200 - 


      This is how I run the command(s) from Jython:


      propertyInstanceObject = blcli_run(jli, ['Server', 'printPropertyValue', hostname, customPropertyClass])
      dbKey = propertyInstanceObject.returnValue         
      instancePath = blcli_run(jli, ['PropertySetInstance', 'findPropertySetInstanceByDBKey', dbKey]) 


      Would be very appreciated if someone could give me a helping hand.




        • 1. Unable to run unreleased commands within Jython

          What is the complete error retunred, You can find errors in blcli.log which should be created in :

          Unix - $HOME/.bladelogic

          Windows/<user>Application data/BladeLogic

          Also, for windows the bljythonexe.cfg is the correct  file used.

          • 2. Re: Unable to run unreleased commands within Jython

            Hi Rohit,


            the only new line I see from the blcli.log is this - might be because I'm running the Jython script from within a Webservice?:


            10 Jan 2012 16:49:11,494 WARN [MESSAGE] appserverHost option is not supported [/MESSAGE]



            From an earlier run I see this though:


            03 Jan 2012 12:05:57,248 INFO [MESSAGE] Class://SystemObject/RDO-WIN-Location/CH/chw12345678 [/MESSAGE]
            03 Jan 2012 12:06:46,075 INFO [MESSAGE] Starting CLI session for single command [/MESSAGE]
            03 Jan 2012 12:06:46,844 ERROR [MESSAGE] Unknown command : name space = 'PropertySetInstance', command = 'findPropertySetInstanceBeanByDBKey'. [/MESSAGE]
            com.bladelogic.cli.factory.CommandNotFoundException: R: Cannot find command : PropertySetInstance, findPropertySetInstanceBeanByDBKey
                at com.bladelogic.cli.CLIEngine.executeCommand(CLIEngine.java:75)
                at com.bladelogic.cli.CLIMain.runSingleCommand(CLIMain.java:337)
                at com.bladelogic.cli.CLIMain.main(CLIMain.java:158)
            03 Jan 2012 12:06:46,851 INFO [MESSAGE] Cancelling operation... [/MESSAGE]
            03 Jan 2012 12:06:46,853 INFO [MESSAGE] No request for thread : main [/MESSAGE]


            I can run released commands without any issues.



            • 3. Unable to run unreleased commands within Jython
              Bill Robinson

              what bljythonexe.cfg did you modify?  on what system?  and how exactly are you running this ?  eg, where is the jython install, where is the WS running, etc.

              • 4. Re: Unable to run unreleased commands within Jython

                Hi Bill,


                I modified the bljythonexe.cfg in C:\Program Files\BMC Software\Bladelogic\8.0\NSH\br on my local Windows 7 x64 system.

                That's where I installed the Bladelogic Automation Console to.


                The webservice .py script runs on my local machine too - and connects to one of our testing appservers as soon as needed. (I.e. for running the blcli commands).

                • 5. Re: Unable to run unreleased commands within Jython
                  Bill Robinson

                  so you make a WS call to a jython listener that's listening on the local workstation.  that calls bljython and then that makes a request to bbsa ?


                  why not just use the WS in blade on the appserver? 


                  let's take the WS out of the picture.  can you run any of the unreleased commands straight through jython on your local system ?


                  also - i have a bljython.cfg on my system - do you also have that? try modifying that file ?

                  • 6. Re: Unable to run unreleased commands within Jython

                    Hi Bill,


                    thanks for your help.


                    I guess the WS was only integrated into the appserver after 8.1 right? We are still running 8.0 SP10 and will use the appservers WS in future I guess. But otherwise you got it correct. Since the jython script is listening we open up one jvm for all the commands we process and shut it down at the end then.


                    No luck running it on my local system neither. I get the same error when trying to run it locally..

                    I don't have any bljython.cfg after the installation of the 8.0 SP10 (1014) Automation console I'm afraid. But I also can't say why it's missing - I tried reinstalling the Automation console and also jython several times.


                    What I tried is copying the bljythonexe.cfg to a bljython.cfg file which didn't change anything - after that I also tried replacing bljythonexe.cfg instead of having them both but that caused bljython not to run anymore.


                    Basically we will need you guys to integrate that PropertySetInstance findPropertySetInstanceBeanByDBKey command to the released commands soon or later anyway - what would the process be to get a requirement for it? Should I inform support and ask them to open a requirement with you guys? You might be able to know an other way of doing what I need, I want to retrieve the full path (Class://class/subclass/subclass/instance) to an instance in the custom property dictionary in order to delete it by server object. (We have several instances linked to every server object - when decomissioning the server object we want to get rid of the instances too) Thanks Gavin

                    • 7. Re: Unable to run unreleased commands within Jython
                      Bill Robinson

                      open a ticket for the rfe w/ support.



                      for the commands, i have this:





                      and i can run unreleased commands.  i could not run the unreleased w/ the double quotes, i can w/o.

                      • 8. Re: Unable to run unreleased commands within Jython

                        Hi Bill and everybody,


                        to follow-up on this topic I have set my bljython.cfg as suggested by Bill and I still can't access unreleased commands, either with double-quotes or with no quote at all.


                        I'm using BSA 8.3 sp2


                        Thanks for your help.


                        • 9. Re: Unable to run unreleased commands within Jython

                          Hi all,


                          thanks to Bill Robinson, here is solution to my problem :


                          for UNIX systems, bljython.cfg is not used and one needs to modify directly the "bljython" script to add




                          to the java command line.

                          • 10. Re: Unable to run unreleased commands within Jython
                            Reinhard Vielhaber

                            Another way to get around this is to set this property directly in the Jython-scripts:



                            from java.lang import System





                            which essentially should do the same.


                            The drawback: you have to include it in each and every script

                            The benefit: you are independent of whatever config-file