Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Lieutenant Commander
Lieutenant Commander
1324 views

Upgraded 9.22 to 10.20 but now cant run JUNOS command scripts

Jump to solution

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?

 

 

1 Solution

Accepted Solutions
Cadet 3rd Class Cadet 3rd Class
Cadet 3rd Class

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.

 

View solution in original post

11 Replies
Absent Member.. Absent Member..
Absent Member..
hello bxscig , I`m now also upgrade from 9.22 version to version 10.00 first and then I will upgrade to higher versions my question to you how long time does this task take with you specially upgrading the DB because it take along time with me and my DB size = 52 GB is that normal or not ?
0 Likes
Fleet Admiral
Fleet Admiral

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,

Pedro A. Batista
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.
0 Likes
Cadet 3rd Class Cadet 3rd Class
Cadet 3rd Class

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.

0 Likes
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

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,

 

Marius Herculea
HP SW Technical Consultant

Cloud and Automation Professional Services

0 Likes
Cadet 3rd Class Cadet 3rd Class
Cadet 3rd Class

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.

 

View solution in original post

Lieutenant Commander
Lieutenant Commander

Support had provided a hotfix that was due to the Javascript driver that seems it affected more than just the Juniper driver.

0 Likes
Absent Member.. Absent Member..
Absent Member..

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).

0 Likes
Commander
Commander

I have same error we updated 10.0 to 10.20

I have JavascriptBaseDriver_old.rdp Should I delete it?

Regards

0 Likes
Absent Member.. Absent Member..
Absent Member..

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.

0 Likes
Commander
Commander

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

https://hpln.hpe.com/

But always interupted there is a problem o webside

Can you send me your modifed driver?

Regards

0 Likes
Commander
Commander

it works fine thank it was my mistake

regards

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.