IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

CORBA Discussion :

Erreur incomprensible POA


Sujet :

CORBA

  1. #1
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2010
    Messages
    51
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2010
    Messages : 51
    Points : 26
    Points
    26
    Par défaut Erreur incomprensible POA
    je suis entrain de developpez un serveur en corba et j'ai eux une erreur que je l'ai pas compris:

    org.omg.CORBA.BAD_OPERATION: ----------BEGIN server-side stack trace----------
    org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: Maybe
    at agent.ComponentAgentPOA._invoke(ComponentAgentPOA.java:39)
    at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(Unknown Source)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(Unknown Source)
    at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(Unknown Source)
    at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)

    ----------END server-side stack trace---------- vmcid: 0x0 minor code: 0 completed: Maybe

    Merci

  2. #2
    Membre averti
    Homme Profil pro
    Architecte technique
    Inscrit en
    Septembre 2006
    Messages
    219
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Activité : Architecte technique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2006
    Messages : 219
    Points : 302
    Points
    302
    Par défaut
    Cette exception indique que le POA n'a pas trouvé l'opération correspondante à une requête sur l'objet cible.
    Cela arrive en général avec une incohérence entre les stubs et skeletons générés depuis l'IDL. (IDL modifié/compilé et client ou serveur non recompilé).

  3. #3
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2010
    Messages
    51
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2010
    Messages : 51
    Points : 26
    Points
    26
    Par défaut
    en fait je n'ai pas modifié le fichier IDL.
    et voila les deux methodes qui me permettes de creer l'agent et le service:

    public void createAgent(AgentConfiguration agentconfiguration,org.omg.PortableServer.Servant agent) throws ServantAlreadyActive, ObjectAlreadyActive, WrongPolicy, NotFound, CannotProceed, InvalidName, AdapterInactive, AdapterAlreadyExists, InvalidPolicy
    {
    String agent_poa_name = agentconfiguration.getCorbaName() + "_poa";
    String agent_corba_name=agentconfiguration.getCorbaName();
    POA agentPoa = _rootPOA.create_POA(agent_poa_name, null, null);
    agentPoa.activate_object_with_id(agent_corba_name.getBytes(), agent);
    _nameService.rebind(_nameService.to_name(agent_corba_name), agent._this_object());
    _rootPOA.the_POAManager().activate();
    System.out.println("Server " + agent_corba_name + " ready ...");

    }

    public void createService(CorbaConfiguration configuration,AgentConfiguration agentconfiguration,org.omg.PortableServer.Servant service) throws AdapterNonExistent,
    ServantAlreadyActive,WrongPolicy, NotFound, CannotProceed,
    InvalidName, AdapterInactive, AdapterAlreadyExists, InvalidPolicy, ObjectAlreadyActive
    { String service_corba_name=configuration.getCorbaName();
    String agent_poa_name=agentconfiguration.getCorbaName()+"_poa";
    String service_poa_name=service_corba_name+"_poa";

    POA agentPoa=_rootPOA.find_POA(agent_poa_name, false);
    if(agentPoa!=null)
    {System.out.println("POA AGENT Exist");}
    else {System.out.println("POA Agent Do Not Exist");}
    POA servicePoa=agentPoa.create_POA(service_poa_name, null, null);
    if(servicePoa!=null)
    {System.out.println("POA SERVICE Exist");
    }
    else {System.out.println("POA Service Do Not Exist");}

    servicePoa.activate_object_with_id(service_corba_name.getBytes(),service);

    _nameService.rebind(_nameService.to_name(service_corba_name), service._this_object());
    _rootPOA.the_POAManager().activate();

    System.out.println("Service "+service_corba_name+ " ready ...");
    }


    Sachant que quand je creer un service, je voix bien que le POA d'agent et le POA de service existent (!=null).

  4. #4
    Membre averti
    Homme Profil pro
    Architecte technique
    Inscrit en
    Septembre 2006
    Messages
    219
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Activité : Architecte technique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2006
    Messages : 219
    Points : 302
    Points
    302
    Par défaut
    L'exception BAD_OPERATION ne provient d'aucune de ces deux opérations (cf la stack).
    D'ailleurs ces deux opérations ne peuvent pas être définie en IDL (org.omg.PortableServer.Servant est un type natif qui ne peut être marshallé dans une requête CORBA).

    Quel est l'appel côté client qui provoque l'exception BAD_OPERATION côté serveur ?

  5. #5
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Mai 2010
    Messages
    51
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2010
    Messages : 51
    Points : 26
    Points
    26
    Par défaut
    voila le client de test:

    public static void main(String []arg)
    {
    LogService logserviceImpl;
    System.out.println("Begin execution !!!");
    try{
    String args[] = null;
    Properties props = new Properties();
    props.put("org.omg.CORBA.ORBInitialHost","localhost");
    props.put("org.omg.CORBA.ORBInitialPort","10001");
    // create and initialize the ORB
    ORB orb = ORB.init(args,props);

    // get the root naming context
    org.omg.CORBA.Object objRef =
    orb.resolve_initial_references("NameService");
    // Use NamingContextExt instead of NamingContext. This is
    // part of the Interoperable naming Service.
    NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

    // resolve the Object Reference in Naming
    String name = "Log";
    logserviceImpl = LogServiceHelper.narrow(ncRef.resolve_str(name));
    logserviceImpl.logmessage("anis ayachi message");
    System.out.println("Reponse de service de LOG :"+logserviceImpl.getmessage());
    } catch (Exception e) {
    System.out.println(e.toString());
    }

    System.out.println("End Execution");

    }

    sachant que les deux methodes décrite ne sont pas definit dans l'Idl et la methode "getmessage()" est bien decrite dans l'idl.

  6. #6
    Membre averti
    Homme Profil pro
    Architecte technique
    Inscrit en
    Septembre 2006
    Messages
    219
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Activité : Architecte technique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2006
    Messages : 219
    Points : 302
    Points
    302
    Par défaut
    Bonjour,

    ce code ne m'indique pas à quelle ligne a lieu l'erreur.
    Peux-tu rajouter un e.printStackTrace() dans ton catch, et me donner la stack ?

Discussions similaires

  1. [MySQL] message d'erreur incomprensible apres requete
    Par heek1985 dans le forum PHP & Base de données
    Réponses: 5
    Dernier message: 09/05/2013, 22h05
  2. Erreur incomprensible -> DWORD et sysutils
    Par pradox_pdx dans le forum Débuter
    Réponses: 11
    Dernier message: 21/02/2009, 23h25
  3. [Framework] Coincé : Spring POA "erreur de configuration"
    Par otam_otam dans le forum Spring
    Réponses: 1
    Dernier message: 25/05/2008, 23h35
  4. erreur IDL:omg.org/CORBA/MARSHAL:1.0
    Par Pinggui dans le forum CORBA
    Réponses: 3
    Dernier message: 13/05/2002, 15h05
  5. [Kylix] Erreur objet
    Par Anonymous dans le forum EDI
    Réponses: 1
    Dernier message: 22/03/2002, 09h41

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo