Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / November 2003

Tip: Looking for answers? Try searching our database.

Connecting with CORBA to JBoss EJB - problem with Strings

Thread view: 
Stanislav Malyshev - 12 Nov 2003 18:21 GMT
I am trying to connect to EJB on Jboss server via CORBA interface client.
First of all, the bean itself is pretty simple: the functional part that I
am testing now is just:

public String hello()
{
    System.out.println("In hello");
    return "Howdy!";
}

(I am skipping all EJB wrapping, of course) and it works perfectly via
RMI interface client. However, when I try to run it via CORBA interface
client, it either throws me this exception:

org.omg.CORBA.MARSHAL: No class description available (value_tag indicates
no type information present)  vmcid: 0x0 minor code: 0 completed: No

or just says: Exception in thread "main" java.lang.OutOfMemoryError

I tried another bean, which accepts and returns numbers - it works fine  
both with CORBA and RMI. So I guess it has something to do with strings.
But I don't know what exactly I am doing wrong. What I noticed is that
org.omg.CORBA.MARSHAL message appears when I define the hello operation in
IDL as ::CORBA::WStringValue hello( ); (that's roughly what rmic tool
generates), while OutOfMemory appears when I define it in IDL as just
"string hello( );". I couldn't find which of methods is the right one -
different manuals suggest different things.
And I couldn't find an explanation why neither of the methods work.

Any ideas?
Martin - 13 Nov 2003 13:14 GMT
> public String hello()
>
> org.omg.CORBA.MARSHAL: No class description available (value_tag indicates
> no type information present)  vmcid: 0x0 minor code: 0 completed: No

> IDL as ::CORBA::WStringValue hello( );

this is right.

> string hello( );

this is wrong.

> Any ideas?

Reading your error message "value_tag indicates no type information present"
I would assume that the old JacORB in JBoss don't transfer the type information.
This is bad because even if you register the ValueTypeFactory for
WStringValue in your client side ORB, the client stubs cannot simple call the
readValue() method to read the WStringValue.
You need either a client side ORB which use something like readWStringValue()
in the generated source code to read the WStringValue
or you must replace the ORB of JBoss with a better ORB.

Martin


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.