[kaffe] rt.jar replace to run OpenORB on kaffe1.1.4
takahiro tokui
t_tokui at kyototechnica.co.jp
Sun Mar 13 18:53:16 PST 2005
> Konnichiwa Takahiro!
How are you ,dalibor.
I'm very glad to get your reply!
> > But JacORB1_3_30 hava a serious memory leak bug , so I want to
> > use OpenORB-1.3.1 on kaffe1.1.4.
>
> Ouch. Could you try JacORB 2.2? It's the latest JacORB version around.
As a matter of fact , JacORB 2.2 I tried once. However I can't running it.
Though it doesn't remember well,result is same error as running JacORB1_4_1.
I retry JacORB2.2 on kaffe-1.1.4 SH4 , result below.
Command:
#export CLASSPATH=/JacORB/avalon-framework-4.1.5.jar:/JacORB/logkit-1.2.jar:
/JacORB/wrapper-3.0.3.jar:/JacORB/jacorb.jar:/JacORB/concurrent-1.3.2.jar:.
#java -Xmx12M \
-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB \
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton \
Server IOR
Message:
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
java/lang/UnsatisfiedLinkError: Failed to locate native function: gnu/java/nio/channels/FileChannelImpl.init()V
at gnu.java.nio.channels.FileChannelImpl.<clinit>(FileChannelImpl.java:84)
at java.io.FileDescriptor.<clinit>(FileDescriptor.java:64)
at java.lang.System.<clinit>(System.java:59)
at java.lang.ClassLoader.<init>(ClassLoader.java:115)
at java.lang.ClassLoader.<init>(ClassLoader.java:111)
at java.security.SecureClassLoader.<init>(SecureClassLoader.java:59)
at java.net.URLClassLoader.<init>(URLClassLoader.java:544)
at kaffe.lang.AppClassLoader.<init>(AppClassLoader.java:237)
at kaffe.lang.AppClassLoader.<clinit>(AppClassLoader.java:36)
> > Sadly OpenORB was not running on kaffe1.1.4 as sun's j2sdk1.4 was.
> > CLASSPATH is same as j2sdk1.4 so not seem to be problem.
> >
> > Command:
> > # java -Dorg.omg.CORBA.ORBClass=org.openorb.CORBA.ORB \
> > -Dorg.omg.CORBA.ORBSingletonClass=org.openorb.CORBA.ORBSingleton Server
> >
> > Message:
> > java.lang.ClassNotFoundException: org/openorb/CORBA/ORB
> > at java.lang.Class.forName (Class.java)
> > at java.lang.Class.forName (Class.java:44)
> > at org.omg.CORBA.ORB.create (ORB.java:94)
> > at org.omg.CORBA.ORB.init (ORB.java:63)
> > at Server.main (Server.java:22)
> > org.omg.CORBA.INITIALIZE: Could not instantiate ORB implementation: org.openorb.CORBA.ORB
> > at org.omg.CORBA.ORB.create (ORB.java:99)
> > at org.omg.CORBA.ORB.init (ORB.java:63)
> > at Server.main (Server.java:22)
> >
> > So I tried OpenORB on kaffe1.1.x-cvs, server program seems to run
> > without ClassNotFoundException. (same environment)
> > But when client program run ,kaffe-bin process sleeped & no reaction.
>
> Thanks for the bug report. Which version of OpenORB is that? How do I
> run the client?
OpenORB version is 1.3.1 I wrote.
And it was not writing in the mail before, and might be very important.
It means that client program was made by ORBit-0.5.17-10.4.sh4.rpm
, C source code.
test code below:
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <orb/orbit.h>
#include <sys/time.h>
#include "server.h"
/* Read the IOR from a file called IOR */
static char * get_ior (void)
{
FILE *fp;
char buf[1024];
fp = fopen ("IOR", "r");
if (fp == NULL)
g_error ("Cannot open IOR for reading");
if (fgets (buf, sizeof (buf), fp) == NULL)
g_error ("IOR is empty");
fclose (fp);
/* removes the trailing newline */
g_strstrip (buf);
return g_strdup (buf);
}
int main (int argc, char *argv[])
{
CORBA_Environment ev;
CORBA_ORB orb;
char* ior;
testcorba client;
char* test;
CORBA_exception_init(&ev);
/* initialize */
orb = CORBA_ORB_init(&argc, argv, "orbit-local-orb", &ev);
ior = get_ior ();
/* get Foo server object */
client = CORBA_ORB_string_to_object(orb, ior, &ev);
/* catch errors */
if (client == CORBA_OBJECT_NIL) {
g_print ("Cannot bind to %s\n", ior);
return 1;
}
if (ev._major != CORBA_NO_EXCEPTION) {
g_print ("Corba Exception!\n");
g_print ("When call OPDriverManager \n");
return 1;
}
g_free (ior);
/* Main */
test = testcorba_testmethod(client,"hello-client",&ev);
g_print(%s\n,test);
/* Release objects */
CORBA_Object_release (client, &ev);
CORBA_free (client);
CORBA_Object_release ((CORBA_Object)orb, &ev);
CORBA_exception_free(&ev);
return 0;
}
> > Or Is there a good method to run OpenORB on kaffe-1.1.4 ?
>
> It's probably some bizarre bug. I'd prefer to fix it on CVS head,
> though, as 1.1.5 is coming soon.
I'm looking forward to 1.1.5 appearance!
Could you teach me when to be released?
regards
takahiro tokui
More information about the kaffe
mailing list