cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1907
Views
10
Helpful
11
Replies

cisco uccx version 11.01 json object support

Jenni
Level 1
Level 1

Hi ,

Contact Center, UCCX

As per the Cisco open source documentation of cisco uccx 11.0 following jar files are supported. 

 

JSON-Simple 1.1

ASM 1.5.3

 

Hence I am trying create a instance for the JSON object in the editor's variable pane.

net.minidev.json.JSONObject

 

But it does not allow me to create the instance saying "invalid variable type".  Will this be because of any connectivity issue or I need to upload the relevant jars again into the uccx server. Please guide,

 

Ref:

https://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_11_0/reference/guide/Open-Source-Used-In-Cisco-Unified-Contact-Center-Express-1101.pdf

 

 

 

 

11 Replies 11

Hi Jenni,

Can you please try to create an object instance like in the attached JSON.aef script.

JSON.png

Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

And the script file.

Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

Thank you Merek. This is what exactly I was trying to do. This was working well in the UCCX 11.6 version.

 

Currently I am working in 11.0 uccx environment. . 

Like you created "Test" instance of type "net.minidev.json.JSONObject", I am trying to create in the variable pane. It failed.

 

Which version of UCCX you are using ? Have you added json-smart<version>.jar to the uccx server classpath?

 

Regards,

Jenny.

My bad. I missed the version that you are working on. I did my test with version 11.6.

I think that the easiest way, to see if the library is available for development is to check the directory C:\Program Files (x86)\wfavvid_1161\lib (the place where Script Editor is installed). The json-smart.jar library should be there. If it's not available there, you will need to upload it (and dependencies) to the editor (same folder) and to UCCX.

Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

Hi Merek,

 

Thank you so much. I will try this and update you. Hope it should work.

And one more query, in client environment the scripts available in repository are not available in the script editor for reactive debugging although logged into the editor with appadmin credentials.

Any input on this would be great help.


regards,

Jenny

 

 

This might be helpful: https://community.cisco.com/t5/ip-telephony-and-phones/script-repository-issues-after-uccx-upgrade-from-10-0-to-10-5/td-p/2563474
Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

Merek,

 

Would adding the jar file in editor lib path alone make the JSONObject class available for editor? Or it should be connected with the UCCX server which has the same json-smart jar file? Any idea what would happen exactly when the user is logged in to the UCCX editor with Appadmin Credentials for the first time for synchronising the license. If development environment do not have UCCX server, what are the ways to use custom jar files.

When I tried to put the json-smart jar in wfavvid/lib path, uccx editor still not able to pick the class.

 

Jenni,

I did some more research and here is what I've got.

In the Script Editor I found the file: CustomFileClasspath.properties (C:\Program Files (x86)\wfavvid_1161\properties). Here is how this file looks like:

 

# //////////////////////////////////////////////////////////////////////////////
#
# Custom Classpath Properties File
#
# Add all custom classpath should be added with the following format:
#
# For custom class:
#
# classpath_custom-class=system_2.jar,dir_1\\sub_dir_1
#
# For custom subsystem:
#
# classpath_custom-subsystem=system_2.jar,dir_1\\sub_dir_1
#
# For custom steps:
#
# classpath_custom-step=step_1.jar,dir_1\\sub_dir_1
#
# NOTE: classpath should be added/appended to their respective keys. 
# The root directory path will be added to the relative path by classloaders.
#
# //////////////////////////////////////////////////////////////////////////////


classpath_custom-class=

classpath_custom-subsystem=

classpath_custom-step=

Based on the comments, it looks like it defines a 3rd party libraries that will be used for Script Editor. So I tried to add additional *.jar's and dir's but at the end the Editor was not able to load them.

 

Then I came and reviewed the Script editor logs (I've highlighted the interesting sections):

 

1051: sty 21 08:13:47.501 CET %MEDT-CFG_MGR-3-CONFIG_MGR_GET_REMOTEPROP_ERROR:[MXXX_MGR_MGR_INIT2] SynchronizedRegProperties: Config Manager get remote properties failed: Properties name=CustomFileClasspath.properties,Exception=com.cisco.config.ConfigException: RemoteConfigManagerImpl.getAll(); nested exception is: 
	java.lang.ArrayIndexOutOfBoundsException: 0 
1052: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:com.cisco.config.ConfigException: RemoteConfigManagerImpl.getAll(); nested exception is: 
1053: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	java.lang.ArrayIndexOutOfBoundsException: 0
1054: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.RemoteConfigManagerImpl.getAll(RemoteConfigManagerImpl.java:766)
1055: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.Config.getAll(Config.java:1030)
1056: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.Config.get(Config.java:811)
1057: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.Config.get(Config.java:744)
1058: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.crs.cluster.config.PropertiesConfig.getPropertiesConfig(PropertiesConfig.java:145)
1059: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.SynchronizedRegProperties.getRemoteProperties(SynchronizedRegProperties.java:155)
1060: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.util.SyncRegistryProperties.performSynchronization(SyncRegistryProperties.java:262)
1061: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.SynchronizedRegProperties.<init>(SynchronizedRegProperties.java:106)
1062: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.SyncCustomFileClasspathProperties.<init>(SyncCustomFileClasspathProperties.java:55)
1063: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.RemoteConfigManagerImpl.generarateRegProperties(RemoteConfigManagerImpl.java:1348)
1064: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.RemoteConfigManagerImpl.getProperties(RemoteConfigManagerImpl.java:1078)
1065: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.Config.getProperties(Config.java:612)
1066: sty 21 08:13:47.502 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.manager.impl.ManagerManagerImpl.addCustomClasspath(ManagerManagerImpl.java:2579)
1067: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.manager.impl.ManagerManagerImpl.access$3100(ManagerManagerImpl.java:189)
1068: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.manager.impl.ManagerManagerImpl$2.run(ManagerManagerImpl.java:960)
1069: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	nested stack trace is: 
1070: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	java.lang.ArrayIndexOutOfBoundsException: 0
1071: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.ClusterProfileInfo.getIpAddress(ClusterProfileInfo.java:316)
1072: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.RemoteConfigManagerImpl.doRemote(RemoteConfigManagerImpl.java:488)
1073: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.RemoteConfigManagerImpl.doRemote(RemoteConfigManagerImpl.java:434)
1074: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.RemoteConfigManagerImpl.getAll(RemoteConfigManagerImpl.java:742)
1075: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.Config.getAll(Config.java:1030)
1076: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.Config.get(Config.java:811)
1077: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.Config.get(Config.java:744)
1078: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.crs.cluster.config.PropertiesConfig.getPropertiesConfig(PropertiesConfig.java:145)
1079: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.SynchronizedRegProperties.getRemoteProperties(SynchronizedRegProperties.java:155)
1080: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.util.SyncRegistryProperties.performSynchronization(SyncRegistryProperties.java:262)
1081: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.SynchronizedRegProperties.<init>(SynchronizedRegProperties.java:106)
1082: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.SyncCustomFileClasspathProperties.<init>(SyncCustomFileClasspathProperties.java:55)
1083: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.RemoteConfigManagerImpl.generarateRegProperties(RemoteConfigManagerImpl.java:1348)
1084: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.impl.RemoteConfigManagerImpl.getProperties(RemoteConfigManagerImpl.java:1078)
1085: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.config.Config.getProperties(Config.java:612)
1086: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.manager.impl.ManagerManagerImpl.addCustomClasspath(ManagerManagerImpl.java:2579)
1087: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.manager.impl.ManagerManagerImpl.access$3100(ManagerManagerImpl.java:189)
1088: sty 21 08:13:47.503 CET %MEDT-CFG_MGR-3-EXCEPTION:	at com.cisco.manager.impl.ManagerManagerImpl$2.run(ManagerManagerImpl.java:960)
1089: sty 21 08:13:47.503 CET %MEDT-MGR_MGR-7-UNK:[MXXX_MGR_MGR_INIT2] ManagerManagerImpl: *** Adding Custom Classpath... 
1090: sty 21 08:13:47.503 CET %MEDT-MGR_MGR-7-UNK:[MXXX_MGR_MGR_INIT2] ManagerManagerImpl: *** Retrieving classpath value =  for key = classpath_custom-step 
1091: sty 21 08:13:47.503 CET %MEDT-MGR_MGR-7-UNK:[MXXX_MGR_MGR_INIT2] ManagerManagerImpl: *** Retrieving classpath value =  for key = classpath_custom-class 
1092: sty 21 08:13:47.503 CET %MEDT-MGR_MGR-7-UNK:[MXXX_MGR_MGR_INIT2] ManagerManagerImpl: *** Finished adding Custom Classpath... 

Even though my classpath looked like this:

 

  • classpath_custom-class=test.jar
  • classpath_custom-class=c:\temp\test.jar

Still, the system was not able to load jars. But the logs show something interesting. When you run Editor in Anonymous mode it still tries to connect to remote resources to bind the resources - including external jars. Probably you will need to upload jar on the server and connect to uccx server to sync libs. I suspect then you can work in the background as the lib repository should be in sync. But this is something that you will need to check in lab.

Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

Thank you so much for your elaborate response. I understood that the custom jars should be in sync with server and editor. Once that's been done, the custom classes and methods would be available for further usage.

 

By the way, what is the location of logs in editor. I could see the logs only under 

C:\Program Files (x86)\wfavvid_1161\Uninstall_Cisco Unified CCX Editor_1161\Logs

 

Is that the same you are referring or something else?

I've my logs in this location: C:\Program Files (x86)\wfavvid_1161\log. Maybe if you don't see the folder you should consider running Script Editor in Administrator mode.Maybe then the folder will appear.
Marek https://gaman-gt.com
UCCE, PCCE, UCCX, WxCC, Cisco Finesse, Custom Gadget, CVP, CUIC, CUCM

Hi Merek,

Its interesting to see the logs while running the Editor in Administrator mode. Thank you so much. Hope these logs would help me to debug the jar issue in site too.

Learnt new things from your responses. Thank you so much.

 

Regards,

Jenny