« Back to Technical Questions

sample code throw exception

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hi,
 
I tired 'UCXSI Sample code'. I have problem about this. Could you help me ?
It has error on getMacbyExt of FirstCallAppManager.java
 
java.lang.NullPointerException
     at FirstCallAppManager.getMacbyExt(FirstCallAppManager.java:156)
     at FirstCallAppManager.connectCME(FirstCallAppManager.java:95)
     at FirstCallAppManager.main(FirstCallAppManager.java:451)
 
I checked the application log. It seems that cme_http.getallDeivce() method request and CME responded all device data. But the metohd return 'null', so the code had exception.
I change the code to the following
 
try
{
      //response = cme_http.getAllDevice();
      response = cme_http.getDeviceByID(devID);
} catch (Exception e) {
 
then, it works. I use these environments
- 15.1(1)T (CME8.0)
- UCXSI SDK 1.0.0
- Java 1.6.0_20
 
Thanks,
Satoshi

Hi Satoshi,
 
I tried testing the image 15.1(1)T and did not get the exceptions that was thrown, the phones got added up successfully. Could you please paste all your configs to proceed further?
 
Thanks,
Anusha

Hi Satoshi,
 
Please do "sh ephone"
Check if the output macthes you currennt confiuration. In you current cinfiguration showing you have 6 ephones I guess when you do "show ephone" you will see more than that. Remove those "run away" configuartion then you show be fine.
 
Thanks,
 
Yawming

Hi Yawming, Anusha
 
I did "show ephone" then, my cme return 9 ephones. but my configure are 6.
I do that
(config)# no ephone 9
but, it not removed. so, I try again
(config)# ephone 9
(config-ephone) #exi
(config)# no ephone 9
it removed. I removed all garbage. after then run the sample code. it works!
 
Thanks!
Satoshi