cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
879
Views
0
Helpful
6
Replies

CUCM 8.6 AXL addRegion relatedRegions return "no rows" exception

alexandre.ratel
Level 1
Level 1

Hi,

I am currently using AXL Management with a CUCM version 8.6. (I am using Java)

Most of my request works fine and I am able to provisioned users, partition, device pool...

But I am currently experiencing an issue regarding the "addRegion" request. if I try to add "relatedRegions" in the request I received a "No rows" exception from the CUCM.

I checked already the CUCM AXL logs and it seems that CUCM correctly received the AXL request but when it try to update the region table in the database, the SQL request return nothing. Actually, the SQL request looks a bit like that : "select * from region where name=''" which of course return nothing and raise the "No rows" exception.

I found a Workaround by creating the region using the AXL request "addregion" without the "relatedRegions" parameter and then I add the necessary rows manually in the "regionmatrix" table using the AXL query "executeSQLUpdate".

What I need to know is if somebody already experienced the same issue before and if it is a kind of bug ?

Best Regards

RATEL Alexandre

6 Replies 6

amoherek
Cisco Employee
Cisco Employee

I'm moving this post to the AXL community forums.

Thanks it is indeed much suitable

npetrele
Cisco Employee
Cisco Employee

Could you post the Java code where you prepare to call addRegion?  The relatedRegion should work, so perhaps there's a problem with constructing the objects to make the call. 

Thanks!

Hi,

Please find here below my Java code :

com.cisco.axl.api._8.AddRegionReq req = new com.cisco.axl.api._8.AddRegionReq();
com.cisco.axl.api._8.XRegion params = new com.cisco.axl.api._8.XRegion();

/***************
* We set the item parameters
*/
params.setName(this.getName());//Name
params.setDefaultCodec(this.defaultCodec);

com.cisco.axl.api._8.XRegion.RelatedRegions myRRS = new com.cisco.axl.api._8.XRegion.RelatedRegions();

for(RelatedRegionDetail r : g711RegionList) //RelatedRegionDetail is an object containing a related region informations

      {
      com.cisco.axl.api._8.XRegionRelationship myRR = new com.cisco.axl.api._8.XRegionRelationship();
      myRR.setRegionName(SimpleRequest.getUUIDV85(itemType.region, r.getRegionName()));
      myRR.setBandwidth(r.getBandwidth());
      myRR.setVideoBandwidth(r.getVideoBandwidth());

      myRRS.getRelatedRegion().add(myRR);
      }

params.setRelatedRegions(myRRS);
/************/

req.setRegion(params);//We add the parameters to the request
com.cisco.axl.api._8.StandardResponse resp = Variables.getAXLConnectionToCUCM().addRegion(req);//We send the request to the CUCM

Thanks.  The code looks okay, but I'll have to try it to see if I can find the problem. 

Perhaps you're trying to combine two steps into one?  It will fail with that same kind of "no rows" error if you do that.  I can't tell from your code if you're doing that, but I suspect it is the case.

For example, let's say you want to create region "Regis" with a related region "Philbin", and neither of those regions yet exist. You have to do that in two steps.  First, do this (here's the XML version you'd have to replicate in Java):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:addRegion sequence="?">

         <region>

            <name>Philbin</name>

         </region>

      </ns:addRegion>

   </soapenv:Body>

</soapenv:Envelope>

Now that you have created the region "Philbin", you can create "Regis" with "Philbin" as a related region like this.  Note that "Philbin" must already exist before you make this call.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:addRegion sequence="?">

         <region>

            <name>Regis</name>

            <relatedRegions>

               <relatedRegion>

                  <regionName>Philbin</regionName>

                  <bandwidth>G.711</bandwidth>

                  <videoBandwidth>384</videoBandwidth>

               </relatedRegion>

            </relatedRegions>

         </region>

      </ns:addRegion>

   </soapenv:Body>

</soapenv:Envelope>

If you try to skip the first step and just do the second AXL operation, you will get the "no rows" error, because it expects "Philbin" to exist already.

The above examples are for CUCM 10.5, but it should work the same for you.