[omniORB] upgrade from omniORB280 to omniORB305

Smith, Wayne wsmith2@titan.com
Thu Nov 14 20:04:00 2002


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C28C18.D5673610
Content-Type: text/plain;
	charset="iso-8859-1"

I'm attempting to upgrade from omniORB280 to omniORB305.
I get the following error:


Compiling: exeMsnMaintDlg.C
exeMsnMaintDlg.C: In function `void * writeTapeThread(void *)':
exeMsnMaintDlg.C:596: no matching function for call to
`MyModule::ArchiveClient::_duplicate (ArchiveClient_Impl *&)'
/export/home/finder/sf_jmod/src/sharedServices/idl/storyFinder_s.hh:412:
candidates are: static class MyModule::_objref_ArchiveClient *
MyModule::ArchiveClient::_duplicate(MyModule::_objref_ArchiveClient *)
exeMsnMaintDlg.C: In function `void * readTapeThread(void *)':
exeMsnMaintDlg.C:623: no matching function for call to
`MyModule::ArchiveClient::_duplicate (ArchiveClient_Impl *&)'
/export/home/finder/sf_jmod/src/sharedServices/idl/storyFinder_s.hh:412:
candidates are: static class MyModule::_objref_ArchiveClient *
MyModule::ArchiveClient::_duplicate(MyModule::_objref_ArchiveClient *)
make: *** [exeMsnMaintDlg.o] Error 1

to the following code, the macros are necessary because we compile with
different ORBs:

void publishObj(CORBA::Object_var o, const char *nam, const char *id);
#define PUBLISH(o, mod, cls, id) publishObj( \
                mod ## :: ## cls::_duplicate(o), #mod "::" #cls, id)

#define SKEL_MODULE(n) n
#define SKEL_CLASS(n) _sk_ ## n
#define ACTIVATE_OBJECT(o) (boa->obj_is_ready(o), o->_this())


MyModule.idl:

module MyModule
{

[...]

  typedef sequence <File> FileSeq;
  typedef sequence <string> NameSeq;

  interface ArchiveClient
  {
    void processMessage(in string msg);
    oneway void thatsAll();
  };

[...]

};


exeMsnMaintDlg.C:

[...]

class ArchiveClient_Impl
    : public SKEL_MODULE(MyModule)::SKEL_CLASS(ArchiveClient)
{
  void processMessage(const char *msg) {
    message_queue.put(c=stralloc(msg));
  }
  void thatsAll() {}
};

[...]

static void *writeTapeThread(void*)
{
  int i;       

  HERE"S WHERE THE ERROR OCCURS

 => ArchiveClient_Impl *clnt = new ArchiveClient_Impl; 
  MyModule::ArchiveClient_ptr corba_obj = ACTIVATE_OBJECT(clnt);
  PUBLISH(corba_obj, MyModule, ArchiveClient, SF_USER_ID);

  MyModule::NameSeq_var missions = new MyModule::NameSeq;
  getSelection(listMissions);
  missions->length(listMissions->nSelected);


  for (i=0; i<listMissions->nSelected; i++) {
    missions[i] = CORBA::string_dup(
               NAME_STRING(listMissions, listMissions->selectList[i] - 1));
  }

  MyModule::NameSeq_var pulses = new MyModule::NameSeq;
  getSelection(listPulses);
  pulses->length(listPulses->nSelected);

  for (i=0; i<listPulses->nSelected; i++) {
    pulses[i] = CORBA::string_dup(
               NAME_STRING(listPulses, listPulses->selectList[i] - 1));
  }

  if (!sf->writeArchive(
       MyModule::ArchiveClient::_duplicate(clnt), missions, pulses)) {
    message_queue.put(c=stralloc("tape write failed"));
  }

  delete clnt;
  message_queue.put(c=stralloc("Operation complete"));
  return 0;
}

I can't seem to solve this one. 

------_=_NextPart_001_01C28C18.D5673610
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE> upgrade from omniORB280 to omniORB305 </TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>I'm attempting to upgrade from omniORB280 to =
omniORB305.</FONT>
<BR><FONT SIZE=3D2>I get the following error:</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Compiling: exeMsnMaintDlg.C</FONT>
<BR><FONT SIZE=3D2>exeMsnMaintDlg.C: In function `void * =
writeTapeThread(void *)':</FONT>
<BR><FONT SIZE=3D2>exeMsnMaintDlg.C:596: no matching function for call =
to `MyModule::ArchiveClient::_duplicate (ArchiveClient_Impl =
*&amp;)'</FONT>
<BR><FONT =
SIZE=3D2>/export/home/finder/sf_jmod/src/sharedServices/idl/storyFinder_=
s.hh:412: candidates are: static class MyModule::_objref_ArchiveClient =
* MyModule::ArchiveClient::_duplicate(MyModule::_objref_ArchiveClient =
*)</FONT></P>

<P><FONT SIZE=3D2>exeMsnMaintDlg.C: In function `void * =
readTapeThread(void *)':</FONT>
<BR><FONT SIZE=3D2>exeMsnMaintDlg.C:623: no matching function for call =
to `MyModule::ArchiveClient::_duplicate (ArchiveClient_Impl =
*&amp;)'</FONT>
<BR><FONT =
SIZE=3D2>/export/home/finder/sf_jmod/src/sharedServices/idl/storyFinder_=
s.hh:412: candidates are: static class MyModule::_objref_ArchiveClient =
* MyModule::ArchiveClient::_duplicate(MyModule::_objref_ArchiveClient =
*)</FONT></P>

<P><FONT SIZE=3D2>make: *** [exeMsnMaintDlg.o] Error 1</FONT>
</P>

<P><FONT SIZE=3D2>to the following code, the macros are necessary =
because we compile with different ORBs:</FONT>
</P>

<P><FONT SIZE=3D2>void publishObj(CORBA::Object_var o, const char *nam, =
const char *id);</FONT>
<BR><FONT SIZE=3D2>#define PUBLISH(o, mod, cls, id) publishObj( =
\</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; mod ## :: ## cls::_duplicate(o), #mod =
&quot;::&quot; #cls, id)</FONT>
</P>

<P><FONT SIZE=3D2>#define SKEL_MODULE(n) n</FONT>
<BR><FONT SIZE=3D2>#define SKEL_CLASS(n) _sk_ ## n</FONT>
<BR><FONT SIZE=3D2>#define ACTIVATE_OBJECT(o) (boa-&gt;obj_is_ready(o), =
o-&gt;_this())</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>MyModule.idl:</FONT>
</P>

<P><FONT SIZE=3D2>module MyModule</FONT>
<BR><FONT SIZE=3D2>{</FONT>
</P>

<P><FONT SIZE=3D2>[...]</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; typedef sequence &lt;File&gt; FileSeq;</FONT>
<BR><FONT SIZE=3D2>&nbsp; typedef sequence &lt;string&gt; =
NameSeq;</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; interface ArchiveClient</FONT>
<BR><FONT SIZE=3D2>&nbsp; {</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; void processMessage(in string =
msg);</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; oneway void thatsAll();</FONT>
<BR><FONT SIZE=3D2>&nbsp; };</FONT>
</P>

<P><FONT SIZE=3D2>[...]</FONT>
</P>

<P><FONT SIZE=3D2>};</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>exeMsnMaintDlg.C:</FONT>
</P>

<P><FONT SIZE=3D2>[...]</FONT>
</P>

<P><FONT SIZE=3D2>class ArchiveClient_Impl</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; : public =
SKEL_MODULE(MyModule)::SKEL_CLASS(ArchiveClient)</FONT>
<BR><FONT SIZE=3D2>{</FONT>
<BR><FONT SIZE=3D2>&nbsp; void processMessage(const char *msg) {</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; =
message_queue.put(c=3Dstralloc(msg));</FONT>
<BR><FONT SIZE=3D2>&nbsp; }</FONT>
<BR><FONT SIZE=3D2>&nbsp; void thatsAll() {}</FONT>
<BR><FONT SIZE=3D2>};</FONT>
</P>

<P><FONT SIZE=3D2>[...]</FONT>
</P>

<P><FONT SIZE=3D2>static void *writeTapeThread(void*)</FONT>
<BR><FONT SIZE=3D2>{</FONT>
<BR><FONT SIZE=3D2>&nbsp; int i;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; HERE&quot;S WHERE THE ERROR OCCURS</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;=3D&gt; ArchiveClient_Impl *clnt =3D new =
ArchiveClient_Impl; </FONT>
<BR><FONT SIZE=3D2>&nbsp; MyModule::ArchiveClient_ptr corba_obj =3D =
ACTIVATE_OBJECT(clnt);</FONT>
<BR><FONT SIZE=3D2>&nbsp; PUBLISH(corba_obj, MyModule, ArchiveClient, =
SF_USER_ID);</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; MyModule::NameSeq_var missions =3D new =
MyModule::NameSeq;</FONT>
<BR><FONT SIZE=3D2>&nbsp; getSelection(listMissions);</FONT>
<BR><FONT SIZE=3D2>&nbsp; =
missions-&gt;length(listMissions-&gt;nSelected);</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>&nbsp; for (i=3D0; i&lt;listMissions-&gt;nSelected; =
i++) {</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; missions[i] =3D =
CORBA::string_dup(</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; NAME_STRING(listMissions, =
listMissions-&gt;selectList[i] - 1));</FONT>
<BR><FONT SIZE=3D2>&nbsp; }</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; MyModule::NameSeq_var pulses =3D new =
MyModule::NameSeq;</FONT>
<BR><FONT SIZE=3D2>&nbsp; getSelection(listPulses);</FONT>
<BR><FONT SIZE=3D2>&nbsp; =
pulses-&gt;length(listPulses-&gt;nSelected);</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; for (i=3D0; i&lt;listPulses-&gt;nSelected; =
i++) {</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pulses[i] =3D =
CORBA::string_dup(</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; NAME_STRING(listPulses, =
listPulses-&gt;selectList[i] - 1));</FONT>
<BR><FONT SIZE=3D2>&nbsp; }</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; if (!sf-&gt;writeArchive(</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
MyModule::ArchiveClient::_duplicate(clnt), missions, pulses)) {</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; =
message_queue.put(c=3Dstralloc(&quot;tape write failed&quot;));</FONT>
<BR><FONT SIZE=3D2>&nbsp; }</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; delete clnt;</FONT>
<BR><FONT SIZE=3D2>&nbsp; =
message_queue.put(c=3Dstralloc(&quot;Operation complete&quot;));</FONT>
<BR><FONT SIZE=3D2>&nbsp; return 0;</FONT>
<BR><FONT SIZE=3D2>}</FONT>
</P>

<P><FONT SIZE=3D2>I can't seem to solve this one. </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C28C18.D5673610--