2 Replies Latest reply: Mar 13, 2008 4:42 PM by 666705 RSS

    Exception: Invoking Data Services from Java Client

    666705
      I´ve created the dataservices in ALDSP 3.0 and the Java cliente in Workshop 9.2.2. I face the following exception:

      <WSEE>
      Error invoking br.com.vivo.scc.business.webservices.AutenticacaoService (POJO): java.lang.ClassCastException<ComponentHandler.handleRequest:115>
      <WSEE>java.lang.ClassCastException: com.bea.sdo.impl.data.DataObjectGeneral<ComponentHandler.handleRequest:115>
      java.lang.ClassCastException: com.bea.sdo.impl.data.DataObjectGeneral

      This is the cliente code....

                     Hashtable<String, String> hash = new Hashtable<String, String>();
                hash.put(Context.INITIAL_CONTEXT_FACTORY,
                "weblogic.jndi.WLInitialContextFactory");
                hash.put(Context.PROVIDER_URL,"t3://localhost:7001");
                hash.put(Context.SECURITY_PRINCIPAL,"weblogic");
                hash.put(Context.SECURITY_CREDENTIALS,"weblogic");
                ctx = new InitialContext(hash);
                ChaveAcessoDAS das = ChaveAcessoDAS.getInstance(ctx, "myDataSpace");               
                     DASResult<ChaveAcesso> chaves = das.ChaveAcesso();
                     ChaveAcesso chave = chaves.next(); // here the exception

      Any help will be appreciate!

      Thanks!

      --
      Edited by alexbll at 03/13/2008 1:53 PM