Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble with writting a Factory with CORBA (jacorb)  RSS feed

zorg zorgy
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Im trying to learn CORBA, so I started doing an assignment online but now im really stuck.
I have 4 classes, 1 server class ( , 1 client class (, 1 factory (Quote_FactoryImpl)
and one object class (Quoter).

After I run the server and client I get the messages as shown below. I think the problem is in the Quote_FactoryImpl

From my understanding, I create a POA in the server class to hold all the servants, therefore I have to pass the
POA to the Quoter_Factory class in order to put the newly created servants into the POA, once the servant
is in the POA and activated, then anyone can use it since the IOR of the POA is written to a file.

Is my understanding correct? I cant figure out whats going wrong.

Output from Server
2010-12-17 22:17:50.671 FINE rid: 2 opname: get_quote invokeOperation on servant (stream based)
2010-12-17 22:17:50.672 SEVERE rid: 2 opname: get_quote invocation: throwable was thrown.
2010-12-17 22:17:50.673 FINE ServerRequest: reply to get_quote
2010-12-17 22:17:50.673 FINE wrote 20 bytes to
2010-12-17 22:17:50.674 FINE wrote 84 bytes to
2010-12-17 22:17:50.674 FINE wrote 44 bytes to
2010-12-17 22:17:50.675 FINE wrote GIOP message of size 68 to ServerGIOPConnection to (a4e2e3)
2010-12-17 22:17:50.675 FINE rid: 2 opname: get_quote ends with request processing
2010-12-17 22:17:51.021 FINE Transport to stream closed on read < 0
2010-12-17 22:17:51.022 FINE ServerGIOPConnection to (a4e2e3): getMessage() -- COMM_FAILURE
2010-12-17 22:17:51.022 FINE ServerGIOPConnection to (a4e2e3): streamClosed()
2010-12-17 22:17:51.022 FINE ServerGIOPConnection to (a4e2e3): close()
2010-12-17 22:17:51.025 INFO Closed server-side transport to
2010-12-17 22:17:51.025 FINE [1/1] job queue empty

Output from Client:
2010-12-17 22:17:50.675 FINE read 12 bytes from
2010-12-17 22:17:50.675 FINE read 136 bytes from
2010-12-17 22:17:50.676 FINE read GIOP message of size 148 from ClientGIOPConnection to (c832d2)
org.omg.CORBA.UNKNOWN: Server-side Exception: java.lang.NullPointerException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at org.jacorb.orb.ReplyReceiver.getReply(
at org.jacorb.orb.Delegate.invoke_internal(
at org.jacorb.orb.Delegate.invoke(
at org.omg.CORBA.portable.ObjectImpl._invoke(
at Stock._QuoterStub.get_quote(
at StockClient.main(

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!