0 Replies Latest reply: Feb 1, 2010 5:32 AM by 843851 RSS

    InvalidLocatorException when selecting a new service

    843851
      Hello to everyone, i tried this piece of code to select a new service :

      public void switchToService(XletContext context)
      {
      ServiceContextFactory scf =
      ServiceContextFactory.getInstance();

      try
      {
      sc = scf.getServiceContext(context);
      }
      catch(ServiceContextException e)
      {
      e.printStackTrace();
      }
      catch(NullPointerException e)
      {
      e.printStackTrace();
      }

      //istanzio un Locator sull base del path dvb esadecimale
      try
      {
      locator = LocatorFactory.getInstance().createLocator(path);
      }
      catch(javax.tv.locator.MalformedLocatorException e)
      {
      e.printStackTrace();
      }

      locators[0] = locator;
      try
      {
      sc.select(locators);
      }

      catch(javax.tv.locator.InvalidLocatorException e2)
      {
      e2.printStackTrace();
      }
      catch(InvalidServiceComponentException e)
      {
      e.printStackTrace();
      }
      }

      When variable path is "dvb://217c.176f.3ea" the selection works fine, but when is "dvb://217c.176f.3eb" I receive an InvalidLocatorException (the corresponding service exists but it's not signaled).
      Thanks! Bye