Urgent: How to execute a Client application

Hi All,
I have deployed a very simple ear file ( consisting of 1 session bean ) called
HelloEjbsApp.ear in Weblogic 6.1. I want to access the method in this ejb from
a client application. Please can anybody tell me the steps to do the same? I have
referred to the documentation, but it isn't too clear.
I have a HelloClient.java class inside a jar file called HelloClientJAR.jar,
which is inside the client application called HelloClientApp.ear. As I understand,
I should have the following 3 files for the same.
application.xml
application-client.xml
HelloClientJAR.runtime.xml ( This exists in the same directory as the HelloClientApp.ear
I then ran the following command
java appclient.ClientDeployer HelloClientApp.ear HelloClientJAR
It deployed properly, without any errors.
After this, how do I exceute the HelloClient class? Please if anybody knows the
solution to my problem, help me.
Thanks,
Vani

Unless it's a J2EE "application client" which is packaged in the ear.
Unfortunately 6.1 still doesn't support that standard.
"Vani" <[email protected]> wrote in message
news:[email protected]...
>
Thank you very much. It works now. As you said, I should use only the JNDIname
to do lookup outside an ejb.
Thanks,
Vani
"Cameron Purdy" <[email protected]> wrote:
That means that you can only look up java:comp/env/* from inside (for
example) an EJB. You cannot do that from a Java client. From a Java
client,
you look up the EJB using its "global" JNDI name. Use the WL console
to
peruse your JNDI tree.
Peace,
Cameron Purdy
Tangosol Inc.
Tangosol Coherence: Clustered Coherent Cache for J2EE
Information at http://www.tangosol.com/
"Vani" <[email protected]> wrote in message
news:[email protected]...
Hi All,
I am able to execute the client application. But when I do that,I get
the following
exception.
javax.naming.NamingException: java:comp/env namespace is only availablefrom within
a J2EE component
at
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLCon
text.java:392)
at
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at HelloClient.main(Unknown Source)
Please if anybody knows the reason for this, help me.
Thanks,
Vani
"Vani" <[email protected]> wrote:
Hi All,
I have deployed a very simple ear file ( consisting of 1 session
bean
) called
HelloEjbsApp.ear in Weblogic 6.1. I want to access the method in this
ejb from
a client application. Please can anybody tell me the steps to do the
same? I have
referred to the documentation, but it isn't too clear.
I have a HelloClient.java class inside a jar file calledHelloClientJAR.jar,
which is inside the client application called HelloClientApp.ear.As
I understand,
I should have the following 3 files for the same.
application.xml
application-client.xml
HelloClientJAR.runtime.xml ( This exists in the same directory asthe
HelloClientApp.ear
I then ran the following command
java appclient.ClientDeployer HelloClientApp.ear HelloClientJAR
It deployed properly, without any errors.
After this, how do I exceute the HelloClient class? Please if anybody
knows the
solution to my problem, help me.
Thanks,
Vani

Similar Messages

  • How to execute 2 different application from same Application Server

    Hi,
    I would like to know that how to execute two different applications from the same Application Server with different databases?
    We are using
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Oracle Application Server 10g 10.1.2.0.2
    Regards,
    Hassan

    what type of applications you want to run from the same application server, Hassan?
    What other DB are you using to launch it beside the one you quoted? Is it the MRep DB of infra?

  • How can I catch Client Application crash?

    Hi all.
    I'm developing a client application, which makes several long-time operations on its server.
    These server-operations are started, monitored and stopped by my cllient, during a "normal" lifecycle.
    The problem is: if my client unexpectedly shut down (i.e. system crash or interruption by task manager), how can I catch this event, in order to send the "interrupt" to the server and stop the current thread?
    I tried to add a WindowListener on the Main Window of my client app, but it doesn't work... any other idea?
    Thanks in advance for any help.

    But if you "pull the plug" how can the "finalize" method in the client be called?
    It's like asking your wife if she is sleeping.
    If she answers "yes" she is lying because she must be awaken to answer your question.
    The server must manage disconnections (for instance, you can devise a "ping" transaction that all clients must execute periodically.
    If the client stops to send the "ping" you can assume that the client was disconnected.)

  • How to setup the client application for the RMI?

    Question:
    I write a short program of RMI It contain server and client
    if server and client are run on localhost they are running ok
    but run client application on remote machine it occure issuses.
    How to setup the client on remote machine?

    hello Dhanraj K, for gmail accounts there shouldn't be much manual configuration required. please try to set it up like described in [[Add an email account to the Mail app in Firefox OS]]

  • How can execute a jar application

    Hello there, I am facing problem with executing jar application. How can I execute a jar application using java program.
    Thanks & Regards

    VINAY_Kr_SHARMA wrote:
    ...How can I execute a jar application using java program.Do you mean:
    a) You have a Java application on-screen, and you want it to be able to launch other Jars that are not part of the current Java application?
    b) You want to know how to run a Jar in the Java plug-in?

  • How to execute a java application once the server starts

    I have created a java application which executes correctly. I want this application to execute everytime I start my server. I have modified my web.xml as shown below
    <servlet>
    <servlet-name>SendEmail</servlet-name>
    <servlet-class>
    com.allcorp.alliance.tdocs.servlets.SendEmail</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    <load-on-startup>1</load-on-startup>
    </init-param>
    </servlet>
    I have extended the class with HttpServlet. When I start the server, I get the message saying the class is being initializing but it does not execute. I want the application to execute. Any idea what I need to do.

    BalusC wrote:
    Implement ServletContextListener and run the appplication on creation of the ServletContext.Well i understand implementation of ServletContextListener and by overiding contextInitialized(ServletContextEvent se) accordingly can solve the problem.
    but you need to consider two cases here first
    1).ServletContextListener is not supported by all container especially the minor onces which does not support Servlet 2.3 specification.
    2).OP does not have any idea of how to use a Servlet first if you can see he had written his intialization code in the main method.Now how can you expect him to create a listener..... :)
    I hope there are no hard issues on what i said this time.
    *@OP*
    My friend the bad news is that you need to spend bit of time learning about servlets.U'd not be writing intialization code inside a main rather you'd be doing it inside public void init(ServletConfig config) method.
    by making <load-on-startup><!--value</load-on-startup> in web.xml enables Servlet container to call init method at the time of deployment of the web application else where it'd call the init method whenever servlet encounters first request from a client.
    package com.allcorp.alliance.tdocs.servlets;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.servlet.http.*;
    import javax.servlet.*;
    import javax.activation.*;
    * @author ssa3z
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class SendEmail extends HttpServlet{
    public void init(ServletConfig config) {
        // SUBSTITUTE YOUR EMAIL ADDRESSES HERE!!!
        String to = "[email protected]";
        String from = "[email protected]";
        // SUBSTITUTE YOUR ISP'S MAIL SERVER HERE!!!
        String host = "smtp.allstate.com";
        // Create properties, get Session
        Properties props = new Properties();
       // If using static Transport.send(),
      // need to specify which host to send it to
      props.put("mail.smtp.host", host);
      // To see what is going on behind the scene
      props.put("mail.debug", "true");
      Session session = Session.getInstance(props);
      try {
         // Instantiatee a message
         Message msg = new MimeMessage(session);
         //Set message attributes
         msg.setFrom(new InternetAddress(from));
         InternetAddress[] address = {new InternetAddress(to)};
         msg.setRecipients(Message.RecipientType.TO, address);
         msg.setSubject("Test E-Mail through Java");
         msg.setSentDate(new Date());
         // Set message content
         msg.setText("This is a test of sending a " +"plain text e-mail through Java.\n" +"Here is line 2.");
         //Send the message
         Transport.send(msg);
      }catch (MessagingException mex) {
        mex.printStackTrace();
    } Hope this might help :)
    REGARDS,
    RaHuL

  • How to Execut Mobile WebDynpro Application in Blackberry simulator.

    Hi experts,
    I've developed an application in webdynpro using NWDS, now i want to execute it in Balackberry simulator. I have followed this link for downloading the blackberry simulators.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/b2b0c072-0901-0010-ec93-ad7df7f2a8f6?rid=/library/uuid/32c0278c-0901-0010-e0ae-9806236443f3 [original link is broken]
    I've installed following softwares[Simulators]:-
    1. Install BlackBerry JDE v4.0.x
    2. Install BlackBerry Handheld Simulator v4.0.x (use the JDE number)
    3. You have installed the Mobile Data Service (MDS) and the handheld or device simulator. To use the BlackBerry Simulator, first open the MDS, then the device simulator.
    I'm unable to understand this 3rd point....
    Now i don't know how to go further about this. So please help me out....
    Thanks in advance.

    Hi Ali,
    If you have installed the blackberry simulator, you need to simply launch it using the shortcut.
    3rd point simply ask you to check that you hae installed the simulator.
    When you will launch the device simulator, go to the browser of the simulator and type in the url for the application there.
    Simulator is just like the device. You open the browser then use it to run any url. In this case you have the url to launch the Mobile Web Dynpro application.
    Regards,
    Ashwani Kr Sharma

  • Urgent: How to : Multi-threaded Client??

    Hi,
    I have socket connection and was using single client thread untill now. But now requirements need to have multi-threaded client. Can any one pl. help me how to send messages thru' one thread and receive messages thru' another thread using same connection?? I urgently need help on this.
    thanx

    Create aclasses derived from thread for use by receiving
    Pass the socket to that class's constructor
    In the receivers thread's run method just in a while loop call read, or readObject, or whatever
    Just send in the regular thread.

  • How to implement a client application to import certificate?

    Hi,
    We write a small application(in VC) to import the user's PKCS#12 certificate to their browsers(no matter what browsers, IE,firefox,chrome,opera...) automatically to minimize user's manual operation.
    Now it can import PKCS#12 to CertStore of Microsoft, which means support IE/Chrome/Opera.
    But how can I import a pfx to FireFox in programm?
    I only found certutil.exe, but we prefered API and libraries which can link into our application.
    Is this viable? Where can I find such APIs? I read NSS reference, it seems not what I want.
    Or you have other suggestions?
    Thank you in advance.

    Hello,
    Based on your response, you are looking for a C++ application that can import the certificate into Mozilla's certificate store. Is that correct? If so, you can use the NSS APIs[1] to do this. There is a certificate import API in NSS[2] that can be used to implement this. You will need to initialize the certificate store and then import the required certificate. I was also able to locate a StackOverflow link[3] that can help you in this. Please let us know if this helps you in importing the certificates. Also have provided reference for a Javascript API for doing the same thing [4].
    # [https://developer.mozilla.org/en-US/docs/NSS/Certificate_functions NSS Certificate functions]
    # [http://mxr.mozilla.org/security/ident?i=CERT_ImportCerts MXR reference for CERT_ImportCerts]
    # [http://stackoverflow.com/questions/1435000/programmatically-install-certificate-into-mozilla StackOverflow's link for NSS cert import]
    #[https://developer.mozilla.org/en-US/docs/JavaScript_crypto/importUserCertificates Javascript API to import certificates]
    Hope this helps in your application. Please do respond if you need further assistance and I will see if I can locate any test code.

  • How to execute a java application from java itself

    Hi,
    I�m working in Client Server environment. After starting the server, i want to automatically call the client. ( java Server (in Server.java
    the call (java Client) has to be done. Can anyone help me for this problem.
    thanks.

    In normal client server design the client initiates communication with the server, not the other way around.
    So you initiate a conversation just like a normal client server communication.
    -The client is running.
    -The client listens for a connection (SocketServer)
    -The server starts up.
    -It connects to the client using a socket. (The server must know the host/ip of the client.)

  • How to execute an application on the client?

    hello
    we have a client/server architecture, with the Oracle Discoverer running on the clients, and the rest of the applications on the server.
    How can we run an application that is on the client from an application that is running on the server??

    Hi,
    What specific requirement are you looking for? Try WEBUTIL tool which can execute on the client directly.
    cheers
    Blesson

  • How can I start a client Application from a procedure?

    Hello, can someone help me to solve this problem?
    I've written a client Application.(just one file Client.java) Then I created a .jar file for my applicaiton component and loaded it to the server using loadjava. (MyExample.jar)
    It should be invoked by a procedure, which I've created.
    create or replace procedure TEST as language java name 'MyExample.main(java.lang.String[])';
    But when I want to start it in the SQl*Plus using "call TEST();", I received the message:
    Executing PL/SQL: CALL COSMOS."JDEV_TMP_PROC_1"()
    ORA-29541: Klasse COSMOS.CompUpdateClient konnte nicht aufgelöst werden
    ORA-06512: in "COSMOS.TEST", Zeile 0
    ORA-06512: in "COSMOS.JDEV_TMP_PROC_1", Zeile 3
    ORA-06512: in Zeile 1
    Process exited.
    Can someone tell me why and how I can solve it?
    Thanks
    Lucia

    As Andrew suggested, it might be an issue with broken java installation on your system.
    You could try performing following steps to see if you get similar results. This will verify if there is something with your java installation or something to with the way you coded your java class(es).
    (since you did not post the code, I'm not sure which one might be a problem.
    SQL> create or replace and compile java source named "Hello" as
      2  import java.lang.* ;
      3  import java.util.* ;
      4
      5  public class Hello
      6  {
      7    public static void Say()
      8    {
      9     System.out.println("Hello World in Java!") ;
    10    }
    11  }
    12  /
    Java created.
    SQL>
    SQL> create or replace procedure Hello_Java is
      2  language java
      3  name 'Hello.Say()' ;
      4  /
    Procedure created.
    SQL> show errors
    No errors.
    SQL>
    SQL> set serveroutput on size 100000
    SQL> exec dbms_java.set_output(100000) ;
    PL/SQL procedure successfully completed.
    SQL> exec Hello_Java ;
    Hello World in Java!
    PL/SQL procedure successfully completed.
    SQL>

  • How to make a Java application that will change the client box's IP address

    HI how to make a Java application( that application would be run on the client ) that will change the client box's IP address ( IP address of itself )

    If you can do that through the command line, then use Runtime.getRuntime().exec(...) to execute your command.

  • LabVIEW DSC Client\Ser​ver applicatio​n. How to install executable on client.

    Hello all,
    I'm currently programming a Client\Server application.  The server application should host shared variables and the client application should read them.  The client application reads the shared variable in the indicator by binding them with the indicator properties.  I started the programming, and the client and server application are in the same project.  In the client application I'm binding the indicator to the library in my project which has the "My Computer" as the address.  My question is how I will tell the executable installed on any computer I desired to used the shared variables on the server?  I have LabVIEW DSC 2009.
    Thanks,
    Solved!
    Go to Solution.

    Hi, since we are talking about executables...all targets require both LabVIEW (which includes the shared variable engine)and DSC (a bit more complicated, here is an insight) Run-Time engines, otherwise the stand alone application won't run. Now, assuming that everything is on the same network and all executables are suppose to clients, or at least access the already created variables hosted on your PC, I believe it would be easier to find programmatically the available resources than create/deploy new libraries. If you find your self in troubles here is a guide to troubleshoot applications that uses shared variables.
    Alejandro | Academic Program Engineer | National Instruments

  • Problem in executing client application as windows service

    Hi
    I have a client program that sends client ip address to server.
    My Requirement is to run this client program as windows service.
    For this, i have created a jar and after that i have created a .exe file.
    now using sc command in DOS i was created a service named as ClientService
    But when i am trying to start this service like other services, it is giving error saying that "The Service did not respond to the start in a timely fashion"
    Please help me in this issue

    1.Can i lock my mobile phone from J2Me Application.In J2ME you can not.
    2.How can i register J2ME application as service,means
    it started when mobile start and continously Run on my
    mobile. can these problem have a solution ,if yes then
    how..I haven't seen any device that lets you run a J2ME app at start up as a service like windowsNT. May be you can do the above two things if you dig more in to Symbian OS programming.
    Good luck
    Manas

Maybe you are looking for

  • Unable to install windows 7 home premium updates error code 643 (KB 954430, KB973688 & KB2538243)

    Unable to install windows 7 home premium updates error code 643 (KB 954430, KB973688 & KB2538243) - Please help me!! I'm running Windows 7 Home Premium 64-bit on a Lenovo ThinkPad E530. This laptop is only brands new. KB954430, KB973688 & KB2538243 -

  • Writing an ALSA Renderer for Linux

    Hi, I want to write an ALSA Renderer for Linux because I have problems with the JavaSoundRenderer in Linux and I really need a fast Audio Renderer for my app. What I need is a short tutorial for ALSA that shows how I can play sound with it. If you kn

  • Get transactional currency total based on currency type

    hi, i have created a custom report related to fi which is working fine. but now the issue is in that report we r having a transaction currency field WRBTR.the users want to calculate totals based on currency. for example my output is tran curr  curr

  • How to access and restore the files in recovery D on my HP Pavilion Windows 7??????

    Im not very good with the technological side of computers, but it asked me to restore to factory settings after turning my computer on in the morning. I asked it to back up my computer so I can restore it which I believe it did to the Recovery D driv

  • WHAT WOULD YOU BUY??

    Hi guys. I have been the happy owner of an original PowerBook Ti 450MHZ (with a fading LCD screen and a sluggish processor running OSX Tiger) for the past 6/7 years... and I'm now looking to upgrade... I only really use it as a presentation tool... b