Hi,

Just want to add that if you use JacORB at the client side then you
don't need to generate IIOP stubs in advance. The client library will
automatically (and transparently) download IIOP stubs from the JBoss
server.

Try to start your client as shown below. (All this stuff should be
into the shell script or batch file that activates the client.)

java -Xbootclasspath/p:$JBOSS_HOME/client/jacorb.jar -classpath \
.:$JBOSS_HOME/client/jboss-client.jar:$JBOSS_HOME/client/jboss-common-client.jar:$JBOSS_HOME/client/jboss-iiop-client.jar:$JBOSS_HOME/client/jboss-j2ee.jar:$JBOSS_HOME/client/log4j.jar
 \
-Djava.security.policy=/home/reverbel/java.policy \
-Djava.security.manager MyClient

The jacorb.jar file is the one in the JBoss distributions. The properties 
java.security.policy and java.security.manager enable stub downloading 
from the JBoss server. The java.policy file should grant permission for 
connecting to the port 8083 of the JBoss server. The client library will 
then use HTTP to automatically download client stubs from the server. 

With this arrangement you do not need to run rmic at all.

Best,

Francisco

On Fri, 14 Jun 2002, Lee wrote:

> Thanks BUNEL for responses.
> 
> I have successfully resolve this problem,the step is:
> 
> 1.Use the following command to generate Stub classes:
> 
>         rmic -iiop tstejb.WellDayDataHome tstejb.WellDayDataRemote
> 
>   it generates following classes:
> 
>         org\omg\stub\java\lang\_Cloneable_Stub.class
>         org\omg\stub\javax\ejb\_EJBHome_Stub.class
>         org\omg\stub\javax\ejb\_EJBObject_Stub.class
>         org\omg\stub\javax\ejb\_Handle_Stub.class
>         org\omg\stub\javax\ejb\_HomeHandle_Stub.class
>         tstejb\_WellDayDataHome_Stub.class
>         tstejb\_WellDayDataRemote_Stub.class
> 
> 2.I don't know why it requires org.omg.stub.tstejb._WellDayDataHome_Stub ,so I copy 
>tstejb directory into orb\omg\stub directory,then it work.
> 
> Who can tell me why?
> 
> 
> 
> 
> 
> 
> Gerard BUNEL <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> 2002-06-13 18:55
> Please respond to jboss-user
> 
>  
>         To:     [EMAIL PROTECTED]
>         cc: 
>         Subject:        Re: [JBoss-user] Unable load stub in rmi/iiop application
> 
> 
> You probably have an EJB interface named org.omg.stub.tstejb.WellDayData 
> for which is also
> defined the EJBHome interface
> which name must be org.omg.stub.tstejb.WellDayDataHome. Then you need to 
> use the command:
> 
> rmic -iiop <class name>
> 
> on your classes to generate the corresponding Stub class
> 
> Lee a �crit :
> 
> > Hi,
> >
> > I just try to make a RMI/IIOP program use JBoss,the server side is an 
> EJB
> > and its class is tstejb.WellDayData,the client is a java application.
> >
> > When I test this program,it generate following exception:
> >
> > [ Property "jacorb.hashtable_class" not present. Will use default
> > hashtable implementation ]
> >
> > [ ConnectionManager: created new conn to target 10.68.168.68:8683 ]
> >
> > [ Trying to connect to 10.68.168.68:8683 ]
> >
> > [ Succeeded to connect to 10.68.168.68:8683 ]
> >
> > [ ConnectionManager: found conn to target 10.68.168.68:8683 ]
> >
> > java.lang.ClassCastException: Unable to load class:
> > org.omg.stub.tstejb._WellDayDataHome_Stub
> >
> >         at
> > 
> com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:269)
> >
> >         at
> > javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:136)
> >
> >         at
> > javaclt.WellDayDataTestClient1.<init>(WellDayDataTestClient1.java:31)
> >
> > I'm sorry but I don't know what is _WellDayDataHome_Stub,how can I get 
> it
> > and where should I put it.
> >
> > Please help me.
> >
> > Lee
> >
> > _______________________________________________________________
> >
> > Don't miss the 2002 Sprint PCS Application Developer's Conference
> > August 25-28 in Las Vegas - 
>http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> --
> [EMAIL PROTECTED] - Atlantide - http://www.ago.fr/atlantide/
> Technopole Brest Iroise BP 80802 - Site du Vernis - 29608 Brest cedex - 
> France
> Tel. : +33 2 98 05 43 21 - Fax. : +33 2 98 05 20 34
> e-mail: [EMAIL PROTECTED]
> Centre Affaires Oberthur - 74D, rue de Paris -  35700 Rennes - France
> Tel. : +33 2 99 84 15 84 - Fax : +33 2 99 84 15 85
> e-mail: [EMAIL PROTECTED]
> 
> 
> 
> _______________________________________________________________
> 
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas - 
>http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> 
> 
>��+,���M�������e�ƭ���z������*'}�ޝǀ���nv�)�j�^��!��~��^��'����\��&��i�)�{��.�Ǣ�g��m�)�$,���f��)��+-$,���X���(��~��zw���i����+-��.�ǟ�����+-��b�ا~��n�,�ǫ


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to