
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Upgraded 9.22 to 10.20 but now cant run JUNOS command scripts
I had recently upgraded from 9.22 to 10.20 for some new features but then it seems that I lost a lot more. I am trying to run a command script to push configurations to Juniper JUNOS EX switches but it keeps failing with the same method as I did in 9.22 where it worked.
Select Device
Run Command Script
Juniper configuration
set system host-name testing
commit
Save
But this throws an error and it doesnt actually run
TypeError: com.rendition.util.StringUtils.explode is not a function in java_parser.js at line number 395
Did the format of entering how the script change?
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
So we got the issue resolved, however our issue stemmed from having an older .rdp file in the following path:
/opt/NA/prod/server/lib/drivers/
/opt/NA/prod/server/lib/drivers/JavascriptBaseDriver-old.rdp
/opt/NA/prod/server/lib/drivers/JavascriptBaseDriver.rdp
By default it loads the first file in that directory path regardless of name so we were having all sorts of issues with it. Found out there can only be 1 file in there.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
I recommend you to open a case with support if you have a valid support contract, since that was reported a couple of days ago,
BR,
Customer Support Engineer
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the THUMB at the bottom left of the post and show your appreciation.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I have the same exact errors. they are not for just junos devices but for all command scripts. they all fail with that same error message.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Additionaly, check your Driver pack version, use the lastest then if the problem persists the error looks like a driver or JavaScriptBase driver bug
Cheers,
HP SW Technical Consultant
Cloud and Automation Professional Services


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
So we got the issue resolved, however our issue stemmed from having an older .rdp file in the following path:
/opt/NA/prod/server/lib/drivers/
/opt/NA/prod/server/lib/drivers/JavascriptBaseDriver-old.rdp
/opt/NA/prod/server/lib/drivers/JavascriptBaseDriver.rdp
By default it loads the first file in that directory path regardless of name so we were having all sorts of issues with it. Found out there can only be 1 file in there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Support had provided a hotfix that was due to the Javascript driver that seems it affected more than just the Juniper driver.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Any other insights into the cause of this error?
I am encountering the same issue. I don't have a JavascriptBaseDriver_old.rdp file and I'm running the latest version with the latest hotfixes (Network Automation 10.20.00.01 64-bit Build 261-071316+hf147115) and the latest driver pack (Build 8448-072616).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I have same error we updated 10.0 to 10.20
I have JavascriptBaseDriver_old.rdp Should I delete it?
Regards


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
After some tinkering and digging, I managed to fix the driver myself and have custom diagnostics and command scripts working again. It looks like the javascript driver base is not compatible with the new interpreter (Nashorn) included in Java 8. Here is what I did to fix it:
1. Unzip <NA-install-folder>/NA/server/lib/drivers/JavascriptBaseDriver.rdp. Ignore the file extension. It's a zip file.
2. Edit java_parser.js that was just unzipped.
3. Replace com.rendition.util.StringUtils.explode with com.rendition.util.BaseStringUtils.explode.
4. Replace com.rendition.util.StringUtils.implode with com.rendition.util.BaseStringUtils.implode.
5. Save your changes.
6. Zip the contents back into JavascriptBaseDriver.rdp. Remember to backup your original, just in case.
7. Log into HPNA as an administrator and go to Admin -> Drivers.
8. Click Reload Drivers. The JavascriptBaseDriver should be flagged as modified, but it will still use it.
Now try running a diagnostic or command script that uses a Javascript driver (Cisco IOS, Junos, F5, ...) and the TypeError should be gone.
Hope this helps until an official fix is released.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello I tried your advice but it didn't work.
But my drivers are old.
I tried to dowloand a lot of time new driver pack from here
But always interupted there is a problem o webside
Can you send me your modifed driver?
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
it works fine thank it was my mistake
regards