How can I run EJB Client in other computer ?

Hello,
I'm trying to run converter examples.
if ejb client pgm resides on a same machine with j2ee server , it works fine.
But when I put client pgm on a different maching
below message show.
No application client descriptors defined for: ConverterClinet
I put ConverterApp.ear, ConverterAppClient.jar and ConverterClient.class on the machine and
set APPCPATH=ConverterAppClient.jar
set VMARGS=-Dorg.omg.CORBA.ORBInitialHost=xxx.xxx.xx.xx
What should I do to run ejb client on different machine?

Hi SangHPark,
I had the same problem but have solved it and it works.
I ran the client remotely from a win98 box.
Keep two things in mind
1> Deploy the applications to an ip address and not to the local host using the deploy too. Use the deploy tool Gui to add a new server and then deploy the application to this ip address.
2> I am running j2ee version 1.3 and jsdk 1.3
Use the following code but instead of using "java:comp/env/ejb/SimpleConverter" use the jndi name of the object: "MyConverter" as specified in the tutorial.
Properties prop = new Properties();
prop.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
prop.setProperty(Context.PROVIDER_URL,"IIOP://xxx.xx.x.xxx:1050");
System.out.println("Attempting to create context...");
Context initial = new InitialContext(prop);
// Instead of this use the below line of code
//Object objref = initial.lookup("java:comp/env/ejb/SimpleConverter");
Object objref = initial.lookup("MyConverter");
// MyConverter is the Jndi name of the ConverterBean as per the tutorial
You need to do the following things.
1> After making changes to the code recompile using Ant and redeploy it.
2> Copy the j2ee.jar, ConverterAppClient.jar and ConverterClient.class file to the machine that u want to run the client from.
3> create a directory called "config" on the remote machine where you copied the files in step two.
4> Copy to this directory the files ejb.properties and security.properties from your j2ee_home\config\ directory.
For example you copied the files in step 2 on the remote machine in the c:\test directory. Create c:\test\config directory and copy the files from step 4 into this directory.
5> Run the following command from the directory where u copied the client files
java -Dorg.omg.CORBA.ORBInitialHost="host name" -classpath .\j2ee.jar;.;.\ConverterAppClient.jar ConverterClient
Monal

Similar Messages

  • I own two i macs. I bought and installed Lion on one computer. How can I install Lion on the other computer without additional charge?

    I own two I macs. I bought and installed Lion on one computer. How can I install Lion on the other compute without additional charge?

    If it's the same email address Apple registration on both, use the 2nd computer and go to the App Store and find Lion. If different, use the second computer but log in to the App store with the address you used on the first go round. The buy button should instead say install. Then go through the same process again.

  • My computer with iTunes is failing how can I get iTunes on my other computer?

    Help? My computer with my iTunes account is on it's way out and I need to know how to put my iTunes account on my other computer? Right now I'm doing home sharing and the other computer is authorized but I want this to be the computer with iTunes now?

    First of all, open System Preferences > Users & Groups > Login Options, and set your old user account in "Automatic login". By doing this, your computer will always log in with your old account.
    Then, log in your old account, where you will be able to delete the new user that OS X Mavericks forced you to create. Other users have reported the same problem

  • How can i run application client from the command prompt ?

    Hi,
    I'm new to java & EJB. so can any body tell me the command to run the application client from the command prompt. Here is the code to print hello world:
    /* Remote interface */
    public interface Hello extends javax.ejb.EJBObject
         public String hello() throws      java.rmi.RemoteException;
    /* Home interface */
    public interface HelloHome extends javax.ejb.EJBHome
         Hello create() throws java.rmi.RemoteException, javax.ejb.CreateException;
    /* Stateless session bean class */
    public class HelloBean implements javax.ejb.SessionBean
         private javax.ejb.SessionContext ctx;
         public void ejbCreate(){
              System.out.println("ejbcreate()");
         public void ejbRemove(){
              System.out.println("ejbRemove()");
         public void ejbActivate(){
              System.out.println("ejbActivate()");
         public void ejbPassivate(){
              System.out.println("ejbejbPassivate()");
         public void setSessionContext(javax.ejb.SessionContext ctx){
              this.ctx=ctx;
         public String hello(){
              System.out.println("hello()");
              return "Hello, world!";
    /*Client class */
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Properties;
    public class HelloClient
         public static void main(String[] args) throws Exception{
              Properties props=System.getProperties();
              Context ctx=new InitialContext(props);
              Object obj=ctx.lookup("HelloHome");
              HelloHome home=(HelloHome)javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
              Hello hello=home.create();
              System.out.println(hello.hello());
              hello.remove();
    I have stored .java files in c:\ejb
    I have successfully created the .class files using javac command in the following directory :
    c:\ejb
    I have also created Helloworld.ear file in c:\ejb using sun application server which contains the following files:
    ejb-jar-ic.jar
    app-client-ic.jar
    sun-j2ee-ri.project
    application.xml
    sun-application.xml
    Manifest.mf
    But the problem is that i'm not able to run the HelloWorld.class file successfully from the command prompt. So please suggest me the comand.
    Thanx in advance.
    Best regards,
    Pankaj

    Hi
    You can run this code from the command prompt in the same way as you run any other simple java program. The only thing is you need to set the Home and Local interfaces in the classpath.And obviously if u had deployed the bean in ur app server container, then its all over.
    And one more thing is that u need to set the provider URL in the InitialContext created in the client program.
    Thanks
    Arun B

  • How do you run EJB client?

     

    If you are using a java application to test the bean you can run it from the command prompt as you run the other java programmes. If you are accessing it through a jsp page or servlet you need a webserver. If possible tell me what client you are using.([email protected])
    Mahe

  • How can i run Java class form  other java application.

    Hi ,
    I have problem to run java class from my java application,
    I am using the class ClassLoader in order to launched the Java class , it�s work fine whenever, the class exist in the same folder , however , when i am trying to run class that is not in the current folder ,
    i got error (see below),
    Do you have any idea what is wrong?
    java.lang.ClassNotFoundException
         at SimpleClassLoader.loadClass(SimpleClassLoader.java:110)
         at SimpleClassLoader.loadClass(SimpleClassLoader.java:53)
         at Run.main(Run.java:31)

    What does "run an class" mean? You don't run classes. They're not executables.
    I bet your problem is the classpath. You are aware that the classloader looks only there? Unless it's an UrlClassLoader.

  • How can I install iWork on my other computer

    Hi there,
    I recently started using my wife's computer and I'm wondering how I can get iWork on her computer. I bought iWork through the demo in 2009 before the Mac App store existed so I don't have an install disc and can't log into the app store with my Apple ID and download iWork onto her computer.
    Any help would be appreciated.

    It's asking for a serial number because the trial is installed. You need to delete the trial & then reinstall from the boxed DVD or the Mac App Store. The files to delete are the iWork ’09 folder from the main HD > Applications; the iWork ’09 folder in HD > Library > Application Support & the individual iWork application plist files found in HD > Users > (your account) > Library > Preferences for each user. Yvan Koenig has written an AppleScript that removes the files. You can find it on his box.com account in for_iWork'09 > other_iWork'09 items > uninstall iWork '09.zip.
    Since your situation is "similar but not identical" you should start your own topic. In my opinion, your situation isn't even similar.

  • Help:How can I run the J2EE Client Application? Thanks

    Help:How can I run the J2EE Client Application that will access the remote J2EE1.4 application server which runs on another host computer?
    I have developped a stateles senterprise java bean name converter and deloyed it in the j2ee1.4 application server on the host machine A. The converterbean provides the remote home interface and remote interface. At the same time I have developped the j2ee application client named convertappclient. When I access the conveter bean at host computer A through the script 'appclient.bat' as 'appclient -client convertappclient.jar', the client can access the bean sucessfully. Now I want to access the bean through the script 'appclient.bat' at host computer B,what files should I copy from host computer A to host computer B;and what the command line should be like? Thanks!
    The following are the code of the enterprise java bean and it's home interface .
    The client code is also provided.
    The enterprise java bean:
    package converter;
    import java.rmi.RemoteException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import java.math.*;
    public class ConverterBean implements SessionBean {
    BigDecimal yenRate = new BigDecimal("121.6000");
    BigDecimal euroRate = new BigDecimal("0.0077");
    public ConverterBean() {
    public BigDecimal dollarToYen(BigDecimal dollars) {
    BigDecimal result = dollars.multiply(yenRate);
    return result.setScale(2, BigDecimal.ROUND_UP);
    public BigDecimal yenToEuro(BigDecimal yen) {
    BigDecimal result = yen.multiply(euroRate);
    return result.setScale(2, BigDecimal.ROUND_UP);
    public void ejbCreate() {
    public void ejbRemove() {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void setSessionContext(SessionContext sc) {
    The bean's remote home interface :
    package converter;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.EJBHome;
    public interface ConverterHome extends EJBHome {
    Converter create() throws RemoteException, CreateException;
    The bean's remote interface:
    package converter;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    import java.math.*;
    public interface Converter extends EJBObject {
    public BigDecimal dollarToYen(BigDecimal dollars) throws RemoteException;
    public BigDecimal yenToEuro(BigDecimal yen) throws RemoteException;
    The j2ee application client:
    import converter.Converter;
    import converter.ConverterHome;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import java.math.BigDecimal;
    public class ConverterClient {
    public static void main(String[] args) {
    try {
    Context initial = new InitialContext();
    System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
                   System.setProperty("java.naming.provider.url","jnp://10.144.97.250:3700");
    Context myEnv = (Context) initial.lookup("java:comp/env");
    Object objref = myEnv.lookup("ejb/SimpleConverter");
    ConverterHome home =
    (ConverterHome) PortableRemoteObject.narrow(objref,
    ConverterHome.class);
    Converter currencyConverter = home.create();
    BigDecimal param = new BigDecimal("100.00");
    BigDecimal amount = currencyConverter.dollarToYen(param);
    System.out.println(amount);
    amount = currencyConverter.yenToEuro(param);
    System.out.println(amount);
    System.exit(0);
    } catch (Exception ex) {
    System.err.println("Caught an unexpected exception!");
    ex.printStackTrace();
    }

    Surprisingly I find an upsurge in the number of posts with this same problem. I recently found a post which gave a nice link for this. Follow the steps and it should help:
    http://docs.sun.com/source/819-0079/dgacc.html#wp1022105

  • The server deploy EJB but I run EJB Client program,The error msg is can't find JNDI

    Hi all:
    I am using Weblogic 6.1/SP2. I use the console to start
    server and deploy EJB jar,from the msg I see my EJB jar
    been deployed. When I run EJB Client program, the error
    msg is can't find JNDI name t3://URL:11003.....
    I check my ejb-jar.xml amd weblogic-ejb-jar.xml are fine.
    Last week I did deploy EJB and ran the client both
    suceessful. Any ideas, Thank you.

    Sabha:
    Thank you for your help info, I soloved the problem.
    The problem is the ejb jar was deleted(I don't why)
    then System Admin to deploy EJB jar from Admin console.
    After that everything is fine.
    "Sabha" <[email protected]> wrote:
    Run weblogic.Admin -url ... LIST to see whether the JNDI name is there
    . or
    you can view the jndi tree of the server from the console (right click
    on
    server name) and check whether the ejb home is bound to the correct jndi
    name.
    -Sabha
    "Matthew Shinn" <[email protected]> wrote in message
    news:[email protected]..
    Hi Albert,
    I would double check to make sure the EJB was indeed deployed (check
    server log). What message did you see that leads you to believe itwas
    successfully deployed? Also, verify the JNDI name you are lookingup in
    your client matches the JNDI name for the EJB. If this doesn't solve
    the problem, please post the error message and stack trace you are
    seeing on the client.
    - Matt
    Albert Pi wrote:
    Hi all:
    I am using Weblogic 6.1/SP2. I use the console to start
    server and deploy EJB jar,from the msg I see my EJB jar
    been deployed. When I run EJB Client program, the error
    msg is can't find JNDI name t3://URL:11003.....
    I check my ejb-jar.xml amd weblogic-ejb-jar.xml are fine.
    Last week I did deploy EJB and ran the client both
    suceessful. Any ideas, Thank you.

  • How can i run my form application on the other site?

    how can i run my form application(already compiled) on the other computer without developer/2000 environment?
    What should i do ?
    Thanks in advance!

    Well you have to install ORACLE developer runtime on your client side. then just copy your complied forms (fmx) files to your client machine and set it up to run.
    Hope this helps
    Faisal

  • How can I run Runtime.exec command in Java To invoke several other javas?

    Dear Friends:
    I met a problem when I want to use a Java program to run other java processes by Runtime.exec command,
    How can I run Runtime.exec command in Java To invoke several other java processes??
    see code below,
    I want to use HelloHappyCall to call both HappyHoliday.java and HellowWorld.java,
    [1]. main program,
    package abc;
    import java.util.*;
    import java.io.*;
    class HelloHappyCall
         public static void main(String[] args){
              try
                   Runtime.getRuntime().exec("java  -version");
                   Runtime.getRuntime().exec("cmd /c java  HelloWorld "); // here start will create a new process..
                   System.out.println("Never mind abt the bach file execution...");
              catch(Exception ex)
                   System.out.println("Exception occured: " + ex);
    } [2]. sub 1 program
    package abc;
    import java.util.*;
    import java.io.*;
    class HelloWorld
         public static void main(String[] args){
         System.out.println("Hellow World");
    } [3]. Sub 2 program:
    package abc;
    import java.util.*;
    import java.io.*;
    class HappyHoliday
         public static void main(String[] args){
         System.out.println("Happy Holiday!!");
    } When I run, I got following:
    Never mind abt the bach file execution...
    I cannot see both Java version and Hellow World print, what is wrong??
    I use eclipse3.2
    Thanks a lot..

    sunnymanman wrote:
    Thanks,
    But How can I see both programs printout
    "Happy Holiday"
    and
    "Hello World"
    ??First of all, you're not even calling the Happy Holiday one. If you want it to do something, you have to invoke it.
    And by the way, in your comments, you mention that in one case, a new process is created. Actually, new processes are created each time you call Runtime.exec.
    Anyway, if you want the output from the processes, you read it using getInputStream from the Process class. In fact, you really should read that stream anyway (read that URL I sent you to find out why).
    If you want to print that output to the screen, then do so as you'd print anything to the screen.
    in notepad HelloWorld.java, I can see it is opened,
    but in Java, not.I have no idea what you're saying here. It's not relevant whether a source code file is opened in Notepad, when running a program.

  • Help my hard drive is being taken up by about 200gb of "other" memory, i am running time machine on an imac does does cause the problem how can i get rid of all "other" memory

    my problem is that most of my imac hard drive is being taken up by 200gb of "other' memory
    i am running time machine does this contribute
    how can i get rid of all "other" memory
    thanks

    JKOL96 wrote:
    i am running time machine does this contributex
    Some, possibly, but shouldn't be a problem.
    how can i get rid of all "other" memory
    Much of it is OSX and other things needed to run your Mac.
    See The Storage Display for an explanation, and don't miss the link to Where did my Disk Space go?

  • How can I run other application?

    Hello everyone!
    I have few questions, for example I use this to run other application:
    Runtime.getRuntime().exec("C\\Program Files\\Opera\\Opera.exe");1. It works, but how can I run Opera.exe, when I don't know where was install Opera?
    2. I want open URL, but I don't care what browser will be use. How do this?
    p.s.
    I hope, you will understand my English =)

    In Windows, to open a URL in the default browser you simply use the START command, like this:START http://www.canadiantire.ca/Try that at the command line. You can use Runtime.exec() to do this, as has been discussed in several hundred earlier posts in this forum.

  • How can I use EJB component on Weblogic 8.1 server ?

    hi,dear sir:
    How can I use EJB component on Weblogic 8.1 server ?
    It need client jar to invoke ejb,but what will I to do for this jar file? what does it contain? format ?
    If my EJB module contain 100 session bean and 50 Entity bean,but I want invoke 20 session beans in my module, how can I to do?
    thank you...

    Hi,
    This forum is exclusively for Creator. please post this on appropriate forum
    regards
    CreatorTeam

  • How can I run another application from my Form

    Dear Gurus,
    Can anybody tell how can I run a non oracle application from my Forms..
    Can it be done thru DDE package..
    If yes then how..??
    Can it be done like Excel calling thru DDE package???
    Thanks in Advance..
    Regards
    Swati..

    Keep in mind that HOST will execute where the runtime is located. This means for Forms 6.x and older, if the application is running as client/server, HOST will correctly execute on the client. If your application (Forms 6.x and newer) is run via a web browser, HOST will execute on the server and not the client machine.
    Without knowing exactly which Forms version you are using and where you want the call to be executed it will be difficult to offer suggestions.

Maybe you are looking for

  • MacBook and Mac mini togheter?

    Hi everyone... I'm the proud owner of a MacBook but I'm studying Computer Engeneering and my MacBook is becoming slower and slower.. So my question is if I'm able to use Mac mini conected to my MacBook using it as a screen. Thanks for your answer!!

  • Can't get installer to work - times out at 41%

    How do I get an update to install for adobe reader? The update installer keeps timing out at 41% after a few seconds. I have disabled my accdelerator and my antivirus but it keeps happening, both with Firefox and Internet Explorer.

  • Finding images NOT in subfolder

    I upload images into one folder. Then I move them into subfolders. I want to check to see what images I may have missed and are still in the main folder. How can I do this? Right now I sift through all the images one by one looking for them. Is there

  • [SOLVED] Konqueror/KDEmod: Bad icon alignment/disable full filenames?

    Hi guys, Hope this is the right place. I have no idea what I might search for to find the answer to this question, as the several queries I made gave results not even close to what I'm looking for on google.. I'm also unsure whether it's an issue wit

  • Urgent: executeQueryForCollection does not execute query for collection

    Some ViewLink detail views do not refresh when the master RSI navigates. Instead, it seems that a cached query collection is used. How can we control this behaviour? Under what circumstances does the rowset re-use an old QueryCollection instead of re