Discussion:
idl compiler options
i***@randspringer.de
2010-07-08 13:36:51 UTC
Permalink
Hi,
 
I want to do my first steps with mico. The goal is to request a EJB-bean in a glassfish server.
I created the IDL-files from my Bean-Class an my remote interface with:
rmic -idl ...
As a result I got a bunch of IDL files in subdirectories:
***@porschberg:~/idl> find . -name "*.idl"

./de/otto/cobra/business/TraceEJBRemote.idl
./de/otto/cobra/business/TraceEJB.idl
./de/otto/cobra/model/Trace.idl
./java/lang/Byte.idl
./java/lang/Iterable.idl
./java/lang/Cloneable.idl
./java/lang/Number.idl
./java/lang/Object.idl
./java/lang/Comparable.idl
./java/lang/Long.idl
./java/util/ListIterator.idl
./java/util/List.idl
./java/util/Collection.idl
./java/util/Iterator.idl
./java/util/Date.idl
./org/omg/boxedRMI/java/lang/seq1_Object.idl
./org/omg/boxedRMI/seq1_wchar.idl
 
How do I compile these files with $MICO_HOME/idl/idl ?
 
A simple:
 
***@porschberg:/opt/workarea/mico/glassfish> idl ./de/otto/cobra/business/TraceEJBRemote.idl
./de/otto/cobra/business/TraceEJBRemote.idl:50: orb.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:79: java/lang/Long.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:80: java/util/List.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:81: de/otto/cobra/model/Trace.idl: No such file or directory
 
I see that idl-program has a lot of options but I found no documentation. Can someone help?
 
Best regards
Thomas
Zoltan Bordas
2010-07-08 14:42:55 UTC
Permalink
In most cases you do not need to use the more convoluted arguments. Start with something simple like:

idl -I. –I<some path>/include -DMICO --any --typecode --no-poa --c++-suffix cpp CosCollection.idl

Which will:


- Generate the stubs for the CosCollection.idl file.

- Will use . and <some path>/include as include paths for finding included IDL files.

- Will define the “MICO” define while compiling the IDLs. For:

#ifdef MICO

#include <mico/ir.idl>

#endif


 expressions.

- Will include the conversion operators to and from “anys” in the generated files:

void operator<<=( CORBA::Any &a, const CosCollection::PriorityQueueFactory_ptr obj );

- Will include the typecode constants in the generated files.

- Will *NOT* include the stubs needed for server implementation, client call only (--no-poa).

- Will use “cpp” as the extension of the C++ file (I think the default is “cc”).

I hope it helps to make the initial steps.

Zoltan Bordas
Senior Software Engineer
OpenSpirit Corporation
www.openspirit.com
+1 281.295.1426 direct
+1 281.295.1401 fax


From: ***@randspringer.de [mailto:***@randspringer.de]
Sent: Thursday, July 08, 2010 8:37 AM
To: mico-***@lists.sourceforge.net
Subject: [mico-devel] idl compiler options


Hi,



I want to do my first steps with mico. The goal is to request a EJB-bean in a glassfish server.

I created the IDL-files from my Bean-Class an my remote interface with:

rmic -idl ...

As a result I got a bunch of IDL files in subdirectories:

***@porschberg:~/idl> find . -name "*.idl"

./de/otto/cobra/business/TraceEJBRemote.idl
./de/otto/cobra/business/TraceEJB.idl
./de/otto/cobra/model/Trace.idl
./java/lang/Byte.idl
./java/lang/Iterable.idl
./java/lang/Cloneable.idl
./java/lang/Number.idl
./java/lang/Object.idl
./java/lang/Comparable.idl
./java/lang/Long.idl
./java/util/ListIterator.idl
./java/util/List.idl
./java/util/Collection.idl
./java/util/Iterator.idl
./java/util/Date.idl
./org/omg/boxedRMI/java/lang/seq1_Object.idl
./org/omg/boxedRMI/seq1_wchar.idl



How do I compile these files with $MICO_HOME/idl/idl ?



A simple:



***@porschberg:/opt/workarea/mico/glassfish> idl ./de/otto/cobra/business/TraceEJBRemote.idl
./de/otto/cobra/business/TraceEJBRemote.idl:50: orb.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:79: java/lang/Long.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:80: java/util/List.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:81: de/otto/cobra/model/Trace.idl: No such file or directory



I see that idl-program has a lot of options but I found no documentation. Can someone help?



Best regards

Thomas
i***@randspringer.de
2010-07-09 06:51:32 UTC
Permalink
Hi Zoltan,
 
thank you for you answer but now I get a segmentation fault when I call:
 
***@porschberg:/opt/workarea/mico/glassfish> idl -I. -I$MICO_HOME/include/mico -I$MICO_HOME/include -DMICO --any --typecode --no-poa --c++-suffix cpp ./de/otto/cobra/business/TraceEJBRemote.idl
 
***@porschberg:/opt/workarea/mico/glassfish> idl --version
MICO Version 2.3.13

***@porschberg:/opt/workarea/mico/glassfish> echo $PATH
/opt/workarea/mico/cpp:/opt/workarea/mico/idl:<other PATHs>
 
***@porschberg:/opt/workarea/mico/glassfish> echo $LD_LIBRARY_PATH
/opt/workarea/mico/libs
 
 
de/otto/cobra/business/TraceEJBRemote.idl -->
 
Post by Zoltan Bordas
snip
/**
 * de/otto/cobra/business/TraceEJBRemote.idl
 * Generated by rmic -idl. Do not edit
 * Donnerstag, 8. Juli 2010 13:46 Uhr MESZ
 */


#ifndef __java_lang_Long__

module java {
module lang {

    valuetype _Long;

};
};

#endif


#ifndef __java_util_List__

module java {
module util {

    abstract valuetype List;

};
};

#endif


#ifndef __de_otto_cobra_model_Trace__

module de {
module otto {
module cobra {
module model {

    valuetype Trace;

};
};
};
};

#endif

#include "orb.idl"

#ifndef __de_otto_cobra_business_TraceEJBRemote__
#define __de_otto_cobra_business_TraceEJBRemote__
module de {
module otto {
module cobra {
module business {

    abstract valuetype TraceEJBRemote {
   
        ::java::util::List findTracesOfDay(
            in octet arg0 );
        ::de::otto::cobra::model::Trace findTraceById(
            in ::java::lang::_Long arg0 );
        ::de::otto::cobra::model::Trace createTrace(
            in ::de::otto::cobra::model::Trace arg0 );
        ::de::otto::cobra::model::Trace updateTrace(
            in ::de::otto::cobra::model::Trace arg0 );
   
    };

};
};
};
};

#include "java/lang/Long.idl"
#include "java/util/List.idl"
#include "de/otto/cobra/model/Trace.idl"
#endif
 
Post by Zoltan Bordas
snip
 
I compiled mico by myself on my Linux box. What should be the "best" configure-parameters?
 
Best regards,
Thomas
 
Post by Zoltan Bordas
idl -I. –I<some path>/include -DMICO --any --typecode --no-poa --c++-suffix cpp CosCollection.idl
-          Generate the stubs for the CosCollection.idl file.
-          Will use . and <some path>/include as include paths for finding included IDL files.
#ifdef MICO
#include <mico/ir.idl>
#endif

 expressions.
void operator<<=( CORBA::Any &a, const CosCollection::PriorityQueueFactory_ptr obj );
-          Will include the typecode constants in the generated files.
-          Will *NOT* include the stubs needed for server implementation, client call only (--no-poa).
-          Will use “cpp” as the extension of the C++ file (I think the default is “cc”).
I hope it helps to make the initial steps.
Zoltan Bordas
Senior Software Engineer
OpenSpirit Corporation
www.openspirit.com
+1 281.295.1426 direct
+1 281.295.1401 fax
Sent: Thursday, July 08, 2010 8:37 AM
Subject: [mico-devel] idl compiler options
Hi,
I want to do my first steps with mico. The goal is to request a EJB-bean in a glassfish server.
rmic -idl ...
./de/otto/cobra/business/TraceEJBRemote.idl
./de/otto/cobra/business/TraceEJB.idl
./de/otto/cobra/model/Trace.idl
./java/lang/Byte.idl
./java/lang/Iterable.idl
./java/lang/Cloneable.idl
./java/lang/Number.idl
./java/lang/Object.idl
./java/lang/Comparable.idl
./java/lang/Long.idl
./java/util/ListIterator.idl
./java/util/List.idl
./java/util/Collection.idl
./java/util/Iterator.idl
./java/util/Date.idl
./org/omg/boxedRMI/java/lang/seq1_Object.idl
./org/omg/boxedRMI/seq1_wchar.idl
How do I compile these files with $MICO_HOME/idl/idl ?
./de/otto/cobra/business/TraceEJBRemote.idl:50: orb.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:79: java/lang/Long.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:80: java/util/List.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:81: de/otto/cobra/model/Trace.idl: No such file or directory
I see that idl-program has a lot of options but I found no documentation. Can someone help?
Best regards
Thomas
i***@randspringer.de
2010-07-12 07:20:59 UTC
Permalink
 
I uploaded the idl-files to
http://www.randspringer.de/myidl.tar.gz
 
Maybe someone is interested in looking inside this segmentation fault.
 
Thomas
 
Post by i***@randspringer.de
Hi Zoltan,
 
 
 
MICO Version 2.3.13
/opt/workarea/mico/cpp:/opt/workarea/mico/idl:<other PATHs>
 
/opt/workarea/mico/libs
 
 
de/otto/cobra/business/TraceEJBRemote.idl -->
 
Post by Zoltan Bordas
snip
/**
 * de/otto/cobra/business/TraceEJBRemote.idl
 * Generated by rmic -idl. Do not edit
 * Donnerstag, 8. Juli 2010 13:46 Uhr MESZ
 */
#ifndef __java_lang_Long__
module java {
module lang {
    valuetype _Long;
};
};
#endif
#ifndef __java_util_List__
module java {
module util {
    abstract valuetype List;
};
};
#endif
#ifndef __de_otto_cobra_model_Trace__
module de {
module otto {
module cobra {
module model {
    valuetype Trace;
};
};
};
};
#endif
#include "orb.idl"
#ifndef __de_otto_cobra_business_TraceEJBRemote__
#define __de_otto_cobra_business_TraceEJBRemote__
module de {
module otto {
module cobra {
module business {
    abstract valuetype TraceEJBRemote {
   
        ::java::util::List findTracesOfDay(
            in octet arg0 );
        ::de::otto::cobra::model::Trace findTraceById(
            in ::java::lang::_Long arg0 );
        ::de::otto::cobra::model::Trace createTrace(
            in ::de::otto::cobra::model::Trace arg0 );
        ::de::otto::cobra::model::Trace updateTrace(
            in ::de::otto::cobra::model::Trace arg0 );
   
    };
};
};
};
};
#include "java/lang/Long.idl"
#include "java/util/List.idl"
#include "de/otto/cobra/model/Trace.idl"
#endif
 
Post by Zoltan Bordas
snip
 
I compiled mico by myself on my Linux box. What should be the "best" configure-parameters?
 
Best regards,
Thomas
 
Post by Zoltan Bordas
idl -I. –I<some path>/include -DMICO --any --typecode --no-poa --c++-suffix cpp CosCollection.idl
-          Generate the stubs for the CosCollection.idl file.
-          Will use . and <some path>/include as include paths for finding included IDL files.
#ifdef MICO
#include <mico/ir.idl>
#endif

 expressions.
void operator<<=( CORBA::Any &a, const CosCollection::PriorityQueueFactory_ptr obj );
-          Will include the typecode constants in the generated files.
-          Will *NOT* include the stubs needed for server implementation, client call only (--no-poa).
-          Will use “cpp” as the extension of the C++ file (I think the default is “cc”).
I hope it helps to make the initial steps.
Zoltan Bordas
Senior Software Engineer
OpenSpirit Corporation
www.openspirit.com
+1 281.295.1426 direct
+1 281.295.1401 fax
Sent: Thursday, July 08, 2010 8:37 AM
Subject: [mico-devel] idl compiler options
Hi,
I want to do my first steps with mico. The goal is to request a EJB-bean in a glassfish server.
rmic -idl ...
./de/otto/cobra/business/TraceEJBRemote.idl
./de/otto/cobra/business/TraceEJB.idl
./de/otto/cobra/model/Trace.idl
./java/lang/Byte.idl
./java/lang/Iterable.idl
./java/lang/Cloneable.idl
./java/lang/Number.idl
./java/lang/Object.idl
./java/lang/Comparable.idl
./java/lang/Long.idl
./java/util/ListIterator.idl
./java/util/List.idl
./java/util/Collection.idl
./java/util/Iterator.idl
./java/util/Date.idl
./org/omg/boxedRMI/java/lang/seq1_Object.idl
./org/omg/boxedRMI/seq1_wchar.idl
How do I compile these files with $MICO_HOME/idl/idl ?
./de/otto/cobra/business/TraceEJBRemote.idl:50: orb.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:79: java/lang/Long.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:80: java/util/List.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:81: de/otto/cobra/model/Trace.idl: No such file or directory
I see that idl-program has a lot of options but I found no documentation. Can someone help?
Best regards
Thomas
Karel Gardas
2010-07-31 21:52:04 UTC
Permalink
Hello Thomas,

when dealing with segfaults it would be great if you post also your
crash stack trace. You can obtain it from your core file (if it's not
generated then enable core file generation by using ulimit) and using
gdb `which idl` <core file name>
bt<enter>

The trace will not be accurate if you have not recompiled with debugging
enabled (i.e. --disable-optimize --enable-debug) but still may suggest
something.

Thanks,
Karel
Post by i***@randspringer.de
I uploaded the idl-files to
http://www.randspringer.de/myidl.tar.gz
Maybe someone is interested in looking inside this segmentation fault.
Thomas
Post by i***@randspringer.de
Hi Zoltan,
MICO Version 2.3.13
/opt/workarea/mico/cpp:/opt/workarea/mico/idl:<other PATHs>
/opt/workarea/mico/libs
de/otto/cobra/business/TraceEJBRemote.idl -->
snip
/**
* de/otto/cobra/business/TraceEJBRemote.idl
* Generated by rmic -idl. Do not edit
* Donnerstag, 8. Juli 2010 13:46 Uhr MESZ
*/
#ifndef __java_lang_Long__
module java {
module lang {
valuetype _Long;
};
};
#endif
#ifndef __java_util_List__
module java {
module util {
abstract valuetype List;
};
};
#endif
#ifndef __de_otto_cobra_model_Trace__
module de {
module otto {
module cobra {
module model {
valuetype Trace;
};
};
};
};
#endif
#include "orb.idl"
#ifndef __de_otto_cobra_business_TraceEJBRemote__
#define __de_otto_cobra_business_TraceEJBRemote__
module de {
module otto {
module cobra {
module business {
abstract valuetype TraceEJBRemote {
::java::util::List findTracesOfDay(
in octet arg0 );
::de::otto::cobra::model::Trace findTraceById(
in ::java::lang::_Long arg0 );
::de::otto::cobra::model::Trace createTrace(
in ::de::otto::cobra::model::Trace arg0 );
::de::otto::cobra::model::Trace updateTrace(
in ::de::otto::cobra::model::Trace arg0 );
};
};
};
};
};
#include "java/lang/Long.idl"
#include "java/util/List.idl"
#include "de/otto/cobra/model/Trace.idl"
#endif
snip
I compiled mico by myself on my Linux box. What should be the "best" configure-parameters?
Best regards,
Thomas
idl -I. –I<some path>/include -DMICO --any --typecode --no-poa --c++-suffix cpp CosCollection.idl
- Generate the stubs for the CosCollection.idl file.
- Will use . and <some path>/include as include paths for finding included IDL files.
#ifdef MICO
#include <mico/ir.idl>
#endif
… expressions.
void operator<<=( CORBA::Any &a, const CosCollection::PriorityQueueFactory_ptr obj );
- Will include the typecode constants in the generated files.
- Will *NOT* include the stubs needed for server implementation, client call only (--no-poa).
- Will use “cpp” as the extension of the C++ file (I think the default is “cc”).
I hope it helps to make the initial steps.
Zoltan Bordas
Senior Software Engineer
OpenSpirit Corporation
www.openspirit.com
+1 281.295.1426 direct
+1 281.295.1401 fax
Sent: Thursday, July 08, 2010 8:37 AM
Subject: [mico-devel] idl compiler options
Hi,
I want to do my first steps with mico. The goal is to request a EJB-bean in a glassfish server.
rmic -idl ...
./de/otto/cobra/business/TraceEJBRemote.idl
./de/otto/cobra/business/TraceEJB.idl
./de/otto/cobra/model/Trace.idl
./java/lang/Byte.idl
./java/lang/Iterable.idl
./java/lang/Cloneable.idl
./java/lang/Number.idl
./java/lang/Object.idl
./java/lang/Comparable.idl
./java/lang/Long.idl
./java/util/ListIterator.idl
./java/util/List.idl
./java/util/Collection.idl
./java/util/Iterator.idl
./java/util/Date.idl
./org/omg/boxedRMI/java/lang/seq1_Object.idl
./org/omg/boxedRMI/seq1_wchar.idl
How do I compile these files with $MICO_HOME/idl/idl ?
./de/otto/cobra/business/TraceEJBRemote.idl:50: orb.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:79: java/lang/Long.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:80: java/util/List.idl: No such file or directory
./de/otto/cobra/business/TraceEJBRemote.idl:81: de/otto/cobra/model/Trace.idl: No such file or directory
I see that idl-program has a lot of options but I found no documentation. Can someone help?
Best regards
Thomas
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mico-devel mailing list
https://lists.sourceforge.net/lists/listinfo/mico-devel
--
Karel Gardas ***@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com
Loading...