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 / March 2007

Tip: Looking for answers? Try searching our database.

java corba client to ejb

Thread view: 
ollka.vallka@gmail.com - 21 Mar 2007 14:53 GMT
Hi all,

I'm trying to write simple example - java client, which do smth useful
with ejb through corba.
I already have some beans (entity and session) and simple jnp client.
I want to make Cobra client to my ejbs.
Ejb deployed to jboss.

I found some tutorial, and trying to do step by step.
Firstly I generated idls with tool rmic
Then I trying to generate java code from idl with tool idlj.
This tool generated some java classes (Stubs, Holders, Helpers, etc),
but firsly i don't understand, why i need to do it with all import
classes - the stubs, helpers, etc. generated to those classes to (if
don't it wouldnot work)
And one question else: Why it use some <ClassName>Impl but don't
created them. Must I implement those abstract classes and interfaces
with special logic?

I tryed to implement such classes and i have not write any logic -
just as stubs.
When I'm able to compile, I try to start my client, but i have error
and i don't understant what does it mean and can't find any answers.

Please, help me with this deal and forgive me my poor english
ollka
ollka.vallka@gmail.com - 21 Mar 2007 14:55 GMT
sorry,
my error is
21.03.2007 16:20:30
com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase
readGIOPHeader
WARNING: "IOP00710220: (INTERNAL) Error in GIOP magic"
org.omg.CORBA.INTERNAL:   vmcid: SUN  minor code: 220 completed: Maybe
    at
com.sun.corba.se.impl.logging.ORBUtilSystemException.giopMagicError(ORBUtilSystemException.java:
4095)
    at
com.sun.corba.se.impl.logging.ORBUtilSystemException.giopMagicError(ORBUtilSystemException.java:
4109)
    at
com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.readGIOPHeader(MessageBase.java:
156)
    at
com.sun.corba.se.impl.transport.CorbaContactInfoBase.createMessageMediator(CorbaContactInfoBase.java:
150)
    at
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.readBits(SocketOrChannelConnectionImpl.java:
314)
    at
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.handleEvent(SocketOrChannelConnectionImpl.java:
1098)
    at com.sun.corba.se.impl.transport.SelectorImpl.run(SelectorImpl.java:
282)
javax.naming.CommunicationException: Cannot connect to ORB [Root
exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code:
203  completed: No]
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:362)
    at com.sun.jndi.cosnaming.CNCtx.initUsingCorbanameUrl(CNCtx.java:321)
    at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:247)
    at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
    at
com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:
56)
    at
com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:
44)
    at
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:
182)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at CorbaClient.getMySession(CorbaClient.java:71)
    at CorbaClient.main(CorbaClient.java:27)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:
90)
Caused by: org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 203
completed: No
    at
com.sun.corba.se.impl.logging.ORBUtilSystemException.writeErrorSend(ORBUtilSystemException.java:
2231)
    at
com.sun.corba.se.impl.logging.ORBUtilSystemException.writeErrorSend(ORBUtilSystemException.java:
2253)
    at
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.writeLock(SocketOrChannelConnectionImpl.java:
933)
    at
com.sun.corba.se.impl.encoding.BufferManagerWriteStream.sendFragment(BufferManagerWriteStream.java:
78)
    at
com.sun.corba.se.impl.encoding.BufferManagerWriteStream.sendMessage(BufferManagerWriteStream.java:
96)
    at
com.sun.corba.se.impl.encoding.CDROutputObject.finishSendingMessage(CDROutputObject.java:
144)
    at
com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.finishSendingRequest(CorbaMessageMediatorImpl.java:
247)
    at
com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete1(CorbaClientRequestDispatcherImpl.java:
342)
    at
com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:
323)
    at
com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:
129)
    at
com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:
213)
    at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
    at
org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:
69)
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:345)
    ... 14 more


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.