AKAI TSUKI

System development or Technical something

CORBA(JacORB)の残りものメモ

ひとまず、残りもののメモ
あんま意味ないかな。


■idlj -fallTie Hello.idl

によってidlからコードを生成すると以下のファイルが生成される。

HelloApp\_HelloStub.java
HelloApp\Hello.java
HelloApp\HelloHelper.java
HelloApp\HelloHolder.java
HelloApp\HelloOperations.java
HelloApp\HelloPOA.java
HelloApp\HelloPOATie.java

■idlj -fall Hello.idl

の場合は、以下のファイルが生成される。

HelloApp\_HelloStub.java
HelloApp\Hello.java
HelloApp\HelloHelper.java
HelloApp\HelloHolder.java
HelloApp\HelloOperations.java
HelloApp\HelloPOA.java


差分は、

HelloApp\HelloPOATie.java

が生成されるか、されないかの違いであった。

                                                                                                  • -

■エラーその1

> ns
でName Serverを起動。


> java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost
でHelloServerを起動する。

HelloServerは、Sunのページを参照。

ERROR: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: Noorg.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No

at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(Unknown Source)
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(Unknown Source)
at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(Unknown Source)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(Unknown Source)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(Unknown Source)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(Unknown Source)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(Unknown Source)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(Unknown Source)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(Unknown Source)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(Unknown Source)
at HelloServer.main(HelloServer.java:54)
HelloServer Exiting ...

                                                                                                  • -

■エラーその2

> ns -DOAPort=1050
でName Serverを起動。

> java HelloServer -ORBInitialPort 1050 -ORBInitialHost localhost
でHelloServerを起動する。

ERROR: org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: 0x0 minor code: 0 completed: Noorg.omg.CORBA.OBJECT_NOT_EXIST: vmcid: 0x0 minor code: 0 completed: No

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.corba.se.internal.iiop.messages.ReplyMessage_1_0.getSystemException(Unknown Source)
at com.sun.corba.se.internal.iiop.ClientResponseImpl.getSystemException(Unknown Source)
at com.sun.corba.se.internal.corba.ClientDelegate.invoke(Unknown Source)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(Unknown Source)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(Unknown Source)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(Unknown Source)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(Unknown Source)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(Unknown Source)
at HelloServer.main(HelloServer.java:54)
HelloServer Exiting ...


■エラーその3

jacorb.propertiesに以下の記述をしたら、

┌────────────────────────────────

│ # The file where the name server drops its IOR
│ jacorb.naming.ior_filename=file:/c:/Java/JacORB/data/NS_Ref

└────────────────────────────────

>ns -DOAPort=1050
でエラーが出た

[jacorb.orb.print_ver] INFO :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
JacORB V 2.3.0, www.jacorb.org
(C) The JacORB project 17-Feb-2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[jacorb.orb] INFO : Property "jacorb.hashtable_class" is set to: java.util.Hashtable
[org.jacorb.orb.codes] WARN : Warning - unknown codeset (windows-31j) - defaulting to ISO-8859-1
[jacorb.orb.intercept] INFO : InterceptorManager started with 0 Server Interceptors, 0 Client Interc
eptors and 1 IOR Interceptors
[jacorb.orb.singleton] INFO : created ORBSingleton
[jacorb.naming] ERROR : unexpected exception
java.io.FileNotFoundException: file:\c:\Java\JacORB\data\NS_Ref (ファイル名、ディレクトリ名、または
ボリューム ラベルの構文が間違っています。)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:179)
at java.io.FileOutputStream.(FileOutputStream.java:70)
at org.jacorb.naming.NameServer.main(NameServer.java:323)
java.lang.RuntimeException: file:\c:\Java\JacORB\data\NS_Ref (ファイル名、ディレクトリ名、またはボリ
ューム ラベルの構文が間違っています。)
at org.jacorb.naming.NameServer.main(NameServer.java:338)

つまり、jacorb.propertiesを見ていることになる。
orb.propertiesにも同じパラメータがあるけど
そっちはみてないっぽい。


■ロギング

jacorbの以下のプロパティを設定した。
結果、ログが出力されるようになった。
ログといっても、今までコンソールに出力されていたものが
ログファイルに出力されるようになっただけの様子。

jacorb.logfile=c:/Java/JacORB/log/jacorb.log