• Joao

    Joao - 2005-09-20


    I tested the TV Sample with Intel Device Validator for UPnP Technologies version 1.0.1768.24077 and the result was the following:

    java.lang.StringIndexOutOfBoundsException: String index out of range: -5

        at java.lang.String.substring(

        at org.cybergarage.upnp.event.Subscription.getSID(

        at org.cybergarage.upnp.event.SubscriptionRequest.getSID(

        at org.cybergarage.upnp.event.SubscriptionRequest.hasSID(

        at org.cybergarage.upnp.Device.deviceEventSubscriptionRecieved(

        at org.cybergarage.upnp.Device.httpRequestRecieved(

        at org.cybergarage.http.HTTPServer.performRequestListener(


    I think this exception was thrown when the validator tried to do the command StateVariable: Power.

    Joo Paulo Lima

    • Joao

      Joao - 2005-09-20


      Actually, the exception is raised when the validator tries to unsubscribe from the power event, in the subscription tests.

      Joo Paulo Lima

    • Satoshi Konno

      Satoshi Konno - 2005-09-21

      Hi Joo,

      According to your output, the subscription request has a short subscription id. The subscription id might be started from "uuid" string. Fix Subscription::getSID() as the following to avoid the error.

          public final static String getSID(String headerValue)
              if (headerValue == null)
                  return "";
              if (headerValue.startsWith(Subscription.UUID) == false)
                  return headerValue;
              return headerValue.substring(Subscription.UUID.length(), headerValue.length());

      I will check your problem in more detail.


Log in to post a comment.