cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any documentation about RMI Improved Generator

Former Member
0 Kudos

Hello all,

I am searching for a detailed paper about how to use the tool RMI Improved Generator (developed by SAP Labs Bulgaria), especially for using it with generating RMI-IIOP stubs and ties.

After some cross-fingering I was able to build stub and tie for the P4 protocol.

Sometimes there are some errors during the process of generation but the EJB is running...

[rmic output]:  Status : Generating files ... Please wait!
[rmic output]:
[rmic output]: [rmic output]: generating stub and skeleton ...
[rmic output]: compiling stubs and skeletons for P4 ...

G:\studioSP16-EJB-workspace\sap20080526-BA-EJB\ejbModule\eu\dr_rauch\j2ee\demo\login\ejb\Login_Stub.java:81: cannot access com.sap
.tc.logging.Category
file com\sap\tc\logging\Category.class not found
                                        if(com.sap.engine.services.rmi_p4.log.P4Logger.getCategory().beDebug()){
                                                                                ^
1 error
[rmic output error]: There are problems with compiling stubs and skeletons for P4 or may be has a problem with delete .java-files
:Error in compiling.

[rmic output]: java.io.IOException: Error in compiling.
        at com.sap.engine.deploy.rmic.JavaCompiler.compile(JavaCompiler.java:104)
        at com.sap.engine.deploy.rmic.RMIC.generate(RMIC.java:450)
        at com.sap.engine.deploy.rmic.RMIC.main(RMIC.java:250)

[rmic output]:  Status : Files generated succesfully!

...although (perhaps that's why) I added following .jar-files to the additional classpath:

C:\usr\sap\J2E\JC02\j2ee\j2eeclient\ejb20.jar
C:\usr\sap\J2E\JC02\j2ee\j2eeclient\logging.jar
C:\usr\sap\J2E\JC02\j2ee\cluster\server0\bin\services\p4\p4.jar

Perhaps somebody of the forum is experienced in using this tool in the wished direction.

Hopefully

Karl-Christian

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Christian Rauch,

You have to have correctly set JAVA_HOME OS property;

RMIC remote support generator is the shell script. If you want to generate Stub/Skeleton, you can use rmic generation tool, which is in engineu2019s installation:

\usr\sap\<SID>\J<XX>\j2ee\rmic\rmic.bat

It requires the lib folder archives in classpath in order to work correctly:

\usr\sap\<SID>\J<XX>\j2ee\rmic\lib\*.jar

Usage:

rmic -[options], ..., <Remote-Class-Name/Jar-File/Directory>

For instance if you have project D:\test\EventGenerator, for which you want to generate stubs and skeletons, for your remote interface called: "PerformanceInterface", and store generated stub and skeleton files in folder "D:\test\EventGenerator\ejbModule" you can do the following:

\usr\sap\LKG\J02\j2ee\rmic> rmic.bat -s D:\test\EventGenerator\ejbModule -classpath D:\test\EventGenerator\build\classes -d D:\test\EventGenerator\build\classes\ com.sap.engine.application.PerformanceInterface

RMIC generation and compilation finished. See log files from ./traces dir for more info.

Afterwards you can check what happened in \usr\sap\LKG\J02\j2ee\rmic\traces

The available options in the console are as follows:

-d - after this parameter, specify the destination directory where generated stubs and skeletons are saved. The path is absolute,according to the corresponding operating system. The default value is the current directory.

-s - add a directory for java-generated files of stubs and skeletons if you want to keep.

-classpath - adds the specified directories and JAR files to the classpath

-nrmi_p4 - if you specify this parameter, the generated stubs and skeletons do not support the RMI/P4 protocol.

-nsecurity - related to -nrmi_p4 option; if you choose this parameter, the generated skeleton does not include additional security features. By default, security features are included in the generated files.

-iiop - with this option specified the files are generated with IIOP support.

-additional - related to -iiop option; if you use this option, RMIC Tool generates separate stubs for all remote interfaces that are implemented by the remote class. By default, a single stub for all interfaces is created.

-nkeep - if you use this option, the generated .java files are deleted, after the .class files are produced. By default, the .java files are stored as well.

-jar - after this parameter specify the jar file which will be used for search remote objects and will be generated remote support classes. Generated classes wil be included in the jar file.

-dir - after this parameter specify the directory which will be used for search remote objects and will be generated remote support classes.

Note: Specify the fully qualified Java name of the remote class after the options that you have chosen to.

You can check in documentation for example of remote interface and remote class:

http://help.sap.com/saphelp_nw70ehp3/helpdata/en/81/449e33158e654c9d0f17887d1ccb3a/frameset.htm

However you can consider using dynamic stub and skeletons as they are more flexible when add new method or remove deprecated old one.

Former Member
0 Kudos

Refer to forum link