J2EE Application Client Container

Hi everyone,
I've three questions about J2EE Application Client Container.
1) What do I have to install into the client computer so that my J2EE client application can run?
2) Can I install my client application and also the client container through Java Web Start?
3) Can I develop a (remote) client application that needs only J2SE but uses the Enterprise Java Beans?
Thanks for the help

Hi everyone,
I've three questions about J2EE Application Client
Container.
1) What do I have to install into the client computer
so that my J2EE client application can run?This is vendor specific. So you have to read your application server docmentation.
If you are using Sun Java System Application Server (which is now open sourced at glassfish.dev.java.net), then here is a useful document for you:
http://docs.sun.com/app/docs/doc/819-2642/6n4tspp7b?a=view
>
2) Can I install my client application and also the
client container through Java Web Start?
This is not yet required by Java EE platform, not in J2EE 1.4 and is not going to be rquired in Java EE 5 as well. So you have to ask your appserver vendor to see if they support Java Web Start for appclient container. Sun Java System Application Server 9.0 which is being developed in open source project glassfish (http://glassfish.dev.java.net) supports Java Web Start. You can check out.
3) Can I develop a (remote) client application that
needs only J2SE but uses the Enterprise Java Beans?No, you typically need additional libraries. Typically vendors provides a tool that makes a nice package that you can take to a remote host and run the appclient container there. e.g. if you are using Sun Java System Application Server, here is what you need to do:
http://docs.sun.com/app/docs/doc/819-2642/6n4tspp7j?a=view#beale
-- Sahoo
>
Thanks for the help

Similar Messages

  • How to create and run J2EE application client for Hello World EJB

    Hi
    I am new to NWDS EJB deployment.I have created a "Hello World" bean. But how to deploy it and run using a J2EE application client step by step.
    Also please help in the steps of the deploy tool.
    Thanks in Advance

    Hi Ananda
    Check this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/55/600e64a6793d419b82a3b7d59512a5/content.htm
    cheers
    Sameer

  • J2EE Application Client Components

    Anybody knows a good tutorial (online available) for writing J2EE Application Client Components?

    Oh, you want an entire tutorial about client
    components...
    There is a little info in this chapter of the above
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WCC.html
    Isn't a client component just a browser, or a java
    application/applet, or an executable?Yes, a client may be a browser. But I want to write an own executable java application as a client for my j233 application. I found a short chapter in "Enterprise Java Beans" by Richard Monson-Haefel and there, he writes about client components as standalone Java-applications. I read something about explicit declaring them in the application.xml and I wonder why this should be...? So I wondered if there is a special tutorial about writing standalone applications as clients for j2ee web applications...
    I think the chapter you posted is only about web components...

  • J2EE Application Client

    I used Sun Java Studio Enterprise to create a stateful session bean (Cart as in the J2ee Tutorial) and deployed it to Sun Application Server (v7). Then in the same application, I creaed a New EJB Test Application (web based test application) called Cart_TestApp by highlighting the Cart (EJB) node and clicking "Create New EJB Test Application" . Everything is perfect and I could use this Cart_TestApp (once again it is web based test app) to test each function defined in the CartHome, Cart. After that, I created another application client to test this Cart bean. The way I did is that I created another J2EE Application Client called CartTestClient by using Templates-->J2EE--->Application Client. Then in the property sheet of this Application Client, I specified two properties:
    1. Application Server----- Server1 (localhost:8080)
    2. EJB Reference----
    2.1 Reference Name---- ejb/Cart
    2.2 Reference EJB Name----Cart
    2.3 Type---Session
    2.4 Home Interface ----CartHome
    2.5 Remote Interface ---Cart
    After that, I built this Application Client and executed the Application Client, but Studio prompts the following error message:
    You must either set a target application, or provide a client stub jar path in the Sun Java System AS tab on the client property sheet!
    In this case, I clicked ellipse for the "Target Application" on the property sheet, which finally only allows me to specify "Cart_TestApp" , note not Cart(EJB), as the Target Application. And I did it. Finally it works just fine for the Application Test.
    Now my questions are:
    1. How to get the EJB client stub jar in the studio for this Cart (EJB)?
    2. Why does the Application Client work just fine after I specified the "Target Application" item in the property sheet as "Cart_TestApp" since "Cart_TestApp" is only a web based test application for the Cart (EJB)? It seems to me that the EJB Application Client has nothing to do with "Cart_TestApp" since both of them are just test clients (one is web based, another standalone java client). Any insights??
    Thanks.
    Yang

    I have figured it out now and actually Cart_TestApp is just an enterprise application generated by Studio with Cart(EJB) inside. Got confused it with SJSAS v8.

  • Using JAAS on an Application Client Container

    I am trying to authenticate users who are going to be accessing
    EJBs from an Application Client Container developed using AWT/Swing.
    I am able to authenticate users accessing these EJBs via the Web Client.
    But some how I get the following error when I run the ACC client:
    Nov 11, 2004 3:47:30 PM com.sun.enterprise.security.auth.login.PasswordLoginModule login
    SEVERE: SEC1105: A PasswordCredential was required but not provided.
    I have tried lc.login with/without the subject and/or principal with the same result.
    Here is the login code
    // Obtain a LoginContext, needed for authentication. Tell
    // it to use the LoginModule implementation specified by
    // the entry named "jdbcRealm" in the JAAS login
    // configuration file and to also use the specified
    // CallbackHandler.
    LoginContext lc = null;
    NameCallback namecb = new NameCallback( "Enter User name: " );
    PasswordCallback passwdcb = new PasswordCallback( "Enter password: ", true );
    Callback[] callbackparm = new Callback[2];
    callbackparm[0] = namecb;
    callbackparm[1] = passwdcb;
    try {
    System.out.println( "entering atUser: login()" );
    //TextCallbackHandler callback = new TextCallbackHandler();
    DialogCallbackHandler callback = new DialogCallbackHandler();
    callback.handle( callbackparm );
    //lc = new LoginContext( "jdbcRealm", callback );
    System.out.println( "entering atUser: login() namecb.getName() = " + namecb.getName() );
    System.out.println( "entering atUser: login() passwdcb.getPassword() = " +
    passwdcb.getPassword() );
    PasswordCredential pwd = new PasswordCredential (namecb.getName(), passwdcb.getPassword() );
    System.out.println( "entering atUser: login() PasswordCredential pwd = " + pwd );
    Subject subject = new Subject();
    //subject.getPrincipals().addAll(tempPrincipals);
    if (!subject.getPrincipals().contains(pwd)) {
    Principal principal = new X500Principal( "CN=JdbcRealm,OU=AkanTech,O=Akan Technology, C=US" );
    subject.getPrincipals().add( principal );
    System.out.println( "entering atUser: login() subject.getPrincipals().add(pwd) = " +
    subject.getPrincipals() );
    if (!subject.getPrivateCredentials().contains(pwd)) {
    subject.getPrivateCredentials().add( pwd );
    subject.getPublicCredentials().add( pwd );
    System.out.println( "entering atUser: login() subject.getPrivateCredentials().add(pwd) = " +
    subject.getPrivateCredentials() );
    System.out.println( "entering atUser: login() subject.getPrivateCredentials().add(pwd) = " +
    subject.getPrivateCredentials() );
    lc = new LoginContext( "jdbcRealm", subject, callback );
    System.out.println( "entering atUser: login() loginContext = " + lc );
    System.out.println( "entering atUser: login() lc.getSubject() = " + lc.getSubject() );
    } catch (LoginException le) {
    System.err.println("atUser login() LoginException: Cannot create LoginContext: " +
    le.getMessage());
    System.exit( -1 );
    } catch (SecurityException se) {
    System.err.println("atUser login() SecurityException: Cannot create LoginContext: " +
    se.getMessage());
    System.exit( -1 );
    //} catch (UnsupportedCallbackException se) {
    //System.err.println("atUser login() UnsupportedCallbackException: Cannot create LoginContext: " +
    se.getMessage());
    //System.exit( -1 );
    } catch (Exception se) {
    System.err.println("atUser login() Exception: Cannot create LoginContext: " + se.getMessage());
    System.exit( -1 );
    try {
    // attempt authentication
    lc.login();
    } catch (LoginException le) {
    System.err.println( "atUser login() LoginException Authentication failed: " + le.getMessage() );
    System.exit( -1 );
    System.out.println( "atUser login() Authentication succeeded!" );
    Here is the content of: appclientlogin.conf
    /* Copyright 2004 Sun Microsystems, Inc. All rights reserved. */
    /* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */
    default {
         com.sun.enterprise.security.auth.login.ClientPasswordLoginModule required debug=false;
    certificate {
         com.sun.enterprise.security.auth.login.ClientCertificateLoginModule required debug=false;
    jdbcRealm {
         com.akantech.security.jdbcrealm.JDBCLoginModule required debug=false;
    Here is the content of sun-acc.xml.
    I have tried with/without the client-credential entry with the same result.
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    Copyright 2004 Sun Microsystems, Inc. All rights reserved.
    SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    -->
    <!DOCTYPE client-container PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 8.0 Application Client Container//EN" "http://www.sun.com/software/appserver/dtds/sun-application-client-container_1_0.dtd">
    <client-container>
    <target-server name="winxppro" address="winxppro" port="3700"/>
    <log-service file="C:/Sun/AppServer/lib/appclient/logs/client.log" level="WARNING"/>
    <auth-realm classname="com.akantech.security.jdbcrealm.JDBCRealm" name="jdbc">
    <property name="dbdrivername" value="com.ibm.db2.jcc.DB2Driver"/>
    <property name="auth-type" value="jdbccustomrealm"/>
    <property name="dburl" value="jdbc:db2://localhost:50000/authuser"/>
    <property name="jaas-context" value="jdbcRealm"/>
    </auth-realm>
    <client-credential user-name="admin" password="akantech" realm="jdbc"/>
    </client-container>
    What am I missing?
    I have read the following documentation but cant seem to figure out what I am missing.
    http://docs.sun.com/source/819-0079/dgdesc.html#wp130029
    http://docs.sun.com/source/819-0079/dgsecure.html
    http://docs.sun.com/source/819-0079/dgsecure.html#wp32713
    http://java.sun.com/security/jaas/doc/api.html
    http://java.sun.com/security/jaas/doc/module.html
    http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/index.html
    I added a lot of log info in the JDBCLoginModule : authenticate() method.
    It seems to me like the authenticate() method is never called. Because nothing is
    logged from this method.
    Thanks a million
    Stephen

    I have not been able to figure this one out yet so put it on the
    back burner.
    I am still waiting for an answer.
    Did you find the answer?

  • How to run J2EE application client remotely

    I have the Duke's Bank demo running on a Linux PC "crackpad" (http://thomasfly.com:8000/bank/logon CustomerID=200, Password=j2ee) which I can access LAN-wise as http://crackpad:8000/etc. Accessing the bank as an administrator using the J2EE app. client also works fine (locally) on the Linux PC.
    I've also installed & run the Bank demo on a Windows PC, so I have all the req'd ears & jars there as well. However, when I try to run the app client on the Windows PC (accessing the J2EE Reference Implementation server on running crackpad), I getC:\j2eetutorial\bank\jar> runclient -client DukesBankApp.ear -name BankAdmin
    Application threw an exception:javax.naming.NamingException: Serial Context failureI set the environment variables per http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Tools10.html#65815 http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Tools10.html :C:\j2eetutorial\bank\jar> echo %VMARGS%
    -Dorg.omg.CORBA.ORBInitialHost=crackpad
    C:\j2eetutorial\bank\jar> echo %APPCPATH%
    DukesBankAppClient.jar
    C:\j2eetutorial\bank\jar> dir DukesBankApp*.*
    07/10/2002  09:58 PM           420,480 DukesBankApp.ear
    07/10/2002  10:25 PM           712,814 DukesBankAppClient.jarHas anybody encountered this problem & solved it, or see anything that I've overlooked?

    I have the Duke's Bank demo running on a Linux PC "crackpad" (http://thomasfly.com:8000/bank/logon CustomerID=200, Password=j2ee) which I can access LAN-wise as http://crackpad:8000/etc. Accessing the bank as an administrator using the J2EE app. client also works fine (locally) on the Linux PC.
    I've also installed & run the Bank demo on a Windows PC, so I have all the req'd ears & jars there as well. However, when I try to run the app client on the Windows PC (accessing the J2EE Reference Implementation server running on crackpad), I getC:\j2eetutorial\bank\jar> runclient -client DukesBankApp.ear -name BankAdmin
    Application threw an exception:javax.naming.NamingException: Serial Context failureI set the environment variables per http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Tools10.html#65815 :C:\j2eetutorial\bank\jar> echo %VMARGS%
    -Dorg.omg.CORBA.ORBInitialHost=crackpad
    C:\j2eetutorial\bank\jar> echo %APPCPATH%
    DukesBankAppClient.jar
    C:\j2eetutorial\bank\jar> dir DukesBankApp*.*
    07/10/2002  09:58 PM           420,480 DukesBankApp.ear
    07/10/2002  10:25 PM           712,814 DukesBankAppClient.jarHas anybody encountered this problem & solved it, or see anything that I've overlooked?

  • J2ee-application-client-permissions details

    I haven't been able to find any documentation on what this security setting provides. I'd like to know what can and can't be done with this level. Does anybody have a list of the Java security permissions that it grants?

    Boy do I feel silly. Somehow I missed that. I'm guessing it's because the body of the table was on the next page separate from the table so I lost the context.
    I'm bummed to see java.io.FilePermission listed there.
    Comparing that list with the permissions documented in http://java.sun.com/j2se/1.4.2/docs/guide/security/permissions.html, there does appear to be a handful of permissions that are not granted, but the permissions given don't seem too constrained.
    We'd like our application to only have enough permission to talk to a remote database or J2EE server. I see additional security levels might be under consideration in the JSR-056 update. Why not just allow the low-level Java permissions in the JNLP file directly rather than have these permission groups?
    Anyway, thanks very much for the pointer.

  • J2EE Tutorial - Application Client

    Hi,
    I've been trying to work through the J2EE Tutorial and I've come to a complete standstill at the EJB section. I have a few problems.
    First of all my deployment tool does not have a JNDI Names Tag as shown in the Mapping The Enterprize Beans Section (Chapter 19). How do I do this?
    I am getting the following error when I try to run my J2EE Application Client.
    Caught an unexpected exception!
    java.lang.ClassCastException
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableR
    emoteObject.java:229)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
    at ConverterClient.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:23
    7)
    at com.sun.enterprise.appclient.Main.<init>(Main.java:425)
    at com.sun.enterprise.appclient.Main.main(Main.java:97)
    Caused by: java.lang.ClassCastException
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableR
    emoteObject.java:212)
    Finally, can anybody recommend a good tutorial or book as I think the J2EE tutorial is unusually bad.

    http://docs.sun.com/source/819-0079/dgacc.html
    Finally, can anybody recommend a good tutorial or
    book as I think the J2EE tutorial is unusually bad.Search for Mastering EJB by Ed Roman. It should give a better understanding.

  • Application Client

    The J2EE specification requires support for a client container that runs standalone Java applications (known as J2EE application clients) and provides J2EE services to the applications. J2EE services include naming, security, and resource connections.
    The only information i could find about this topic was, how to deploy a J2EE Client module in JDeveloper.
    But how are J2EE application clients of OC4J/ORACLE IAS are launched.
    And how do they use the J2EE services(security...JAAS) mentioned above.

    The subject here is the CLIENT Container and NOT the J2EE Container.
    The tutorials you mentioned only contain Web clients.
    The testing client is a simple RMI/IIOP Client.
    The JDeveloper doc says:
    "Oracle9iAS provides full support for J2EE Client applications. For more information, refer to "Chapter 9, Application Clients in the J2EE Platform Specification".
    So have a look here, to know, what we are talking about:
    http://java.sun.com/j2ee/j2ee-1_3-fr-spec.pdf Chapter 9
    The others do it this way:
    http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/06060007.html
    How is this done for our product?
    How can i launch my client in an (Oracle) application-client-container against my EJB's hosted by an OC4J ?

  • Application Client 2nd trial

    We have some EJB's running in an OC4J, which are acessed by a Swing client.
    Everything works fine so far.
    Now we want to deploy this client as an APPLICATION-CLIENT to the OC4J and launch it on the client-machine in a CLIENT-CONTAINER.
    The JDeveloper doc says:
    "Oracle9iAS provides full support for J2EE Client applications....
    To know, what the subject is have a look here:
    http://java.sun.com/j2ee/j2ee-1_3-fr-spec.pdf Chapter 9
    http://www.orionserver.com/docs/client-deployment.html
    http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/06060007.html
    How is this done for our product?
    How is it supported by JDeveloper ?
    How can i launch my client in an (Oracle) application-client-container against my EJB's hosted by an OC4J ?

    I understand that this thread is quite old, but I'd like to ask if this has ever been answered adequately and, if so, what the answer was?
    As I understand this, Mr. Miller is correct with everything he's said, however I see nothing more than passive mention of the Application Client Container in the Oracle documentation (and it is now May 2006).
    So, is this finally an available feature of the Oracle OC4J container, or is it in the documentation but not actually in the server product?
    If it does exist, I would really be interested in an example.
    Tom Fuller

  • HELP!!! Cannot deploy J2EE application with Oracle JDBC driver...

    Hi,
    I am writing a J2EE application which (in theory, at least)
    connects to an Oracle 9i database.
    I have written a simple Java test app utilising only the
    java.sql package classes (e.g. Connection, ResultSet) to directly
    connect to the database. As long as the classes12.zip is in the
    CLASSPATH it works fine.
    Now I have written an Enterprise application (SessionBean,
    Remote and Home interface and Client) which I am attempting to
    deploy via deploytool.
    If I include just the client jar and EJB jar in the application
    it deploys okay but when I run the application (using runclient)
    it produces the following error:
    java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
    (It is nested within other error output but that is the core
    issue).
    However if I try to include the JAR libraries into the app
    (classes12.jar and nls_charset.jar from $ORACLE_HOME/jdbc/lib),
    then I get the following output from deploytool when I hit the
    "deploy" (or "redeploy") button:
    Deployment error: invalid entry compressed size
    (expected 14411 but got 14580 bytes)
    Can someone please tell me what is going on???
    How can I deploy the J2EE application including the Oracle
    JDBC Driver???
    My only other option at the moment is to place all the function-
    -ality in the client and not use the J2EE framework.
    Any help is greatly appreciated.
    Regards,
    Ben New
    Leftclick Software Development
    [email protected]

    OK Ben,
    I admit I'm a bit confused. Let me see if I understand where you're
    coming from.
    You have written a J2EE application that includes a session bean,
    correct? If so, your session bean needs to be deployed to an EJB
    container. What container are you using? The Oracle 9i database
    has an embedded EJB container which (theoretically) you can use.
    However, as far as I know, Oracle recommends you use OC4J as the
    EJB container. So again I ask, what EJB container are you using?
    If, as you say, you are new to EJB, then I think you should
    immediately start working wiht OC4J as your EJB container.
    Did you look at the tutorial link I gave in my previous post? It
    explains -- step by step -- how to create, deploy and run a J2EE
    application using OC4J as the EJB container. It also has links to
    introductory material for people without little knowledge of J2EE
    and EJB.
    I have 9iAS Enterprise Edition and 8.1.7.1.0 database server (and
    OC4J) installed on my SUN machine. I cannot find any of the
    utilities you mention -- "j2eeadmin","runclient" or "deploytool".
    What Oracle software have you installed? What are the versions?
    What platform are you using?
    A J2EE application (according to the specification from SUN)
    consists of modules. A module can either be a client module or an
    EJB module. A client module can either be a java application client
    or a web-based client (servlet or JSP). A J2EE application usually
    contains one client module and one EJB module. A J2EE application
    needs to be deployed to a J2EE container.
    Hopefully the J2EE picture is becoming clearer. I think you need
    to read some introductory material regarding J2EE if you intend
    to become proficient at it.
    I feel that you are under the impression that a J2EE application
    is a glorified JDBC application. It isn't (as far as I'm aware).
    Good Luck,
    Avi.

  • EJB 3.0 Application Client threw Remote nested exception

    Hi All,
    I came across the following EJBException message when trying to retrieve an Employee record (entity bean in EJB 3.0) after having successfully added it into EMPLOYEE table using stateless session bean:
    *10/03/2009 8:53:14 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>*
    WARNING: ACC003: Application threw an exception.
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.lang.NullPointerException
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.lang.NullPointerException
    at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
    at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
    at ejb.__EmployeeRemote_Remote_DynamicStub.findEmployee(ejb/__EmployeeRemote_Remote_DynamicStub.java)
    at ejb._EmployeeRemote_Wrapper.findEmployee(ejb/_EmployeeRemote_Wrapper.java)
    at client.EmployeeApplicationClient.printEmployee(EmployeeApplicationClient.java:608)
    at client.EmployeeApplicationClient.main(EmployeeApplicationClient.java:55)
    Below is the code snippets of EmployeeApplicationClient.java:
    public class EmployeeApplicationClient {
        @EJB
        private static EmployeeRemote employeebean1;
        @EJB
        private static EmployeeRemote employeebean2;
        public EmployeeApplicationClient() {}
        public static void main(String[] args)
            EmployeeApplicationClient employee_application_client = new EmployeeApplicationClient();
            employee_application_client.addEmployee(1, John, Smith);
            employee_application_client.printEmployee(1);
        public void addEmployee(int id, String firstname, String surname)
            try {
                Employee employee1 = new Employee();
                employee1.setID(id);                       
                employee1.setfirstname(firstname);                       
                employee1.setsurname(surname);                       
                employeebean1.createEmployee(employee1);
            catch {.....}
        public void printEmployee(int employee_id)
           Employee employee2 =  employeebean2.findEmployee(employee_id);
           System.out.println("employee Id: " + employeebean2.getId());
           System.out.println("employee firstname: " + employeebean2.getfirstname());
           System.out.println("employee surname: " + employeebean2.getsurname());
    }Using employeebean1/employeebean2 in printEmployee() did not make any difference.
    The error message appears to indicate that I have incorrectly structured these methods.
    The deployment of EmployeeBean was successful and employee1 is in EMPLOYEE table via SQL query.
    I am using JDK1.6.07, Glassfish v2 with MySQL 5.0 and Netbeans 6.1 on Windows XP platform.
    Any assistance would be greatly appreciated.
    Thanks,
    Jack

    Hi Ataraxisme,
    Thank you for responding to this post.
    This is a J2EE Application Client that was created and deployed along as an Netbeans EAR (both Application Client and EJB) project which uses resource injection as opposed to JNDI lookup.
    I am trying to get employeeApplicationClient.java to work the same way as the following travelAgentApplicationClient.java example which has successfully retrieved its record record immediately after adding using resource injection:
    public class TravelAgentClient {
        @EJB
        private static TravelAgentRemote travelagent;
        public TravelAgentClient() {
        public static void main(String[] args) {
            TravelAgentClient client = new TravelAgentClient();
            client.doTravelAgent();
        public void doTravelAgent() {
            try {
                Cabin cabin_1 = new Cabin();
                cabin_1.setId(1);
                cabin_1.setName("Master Suite");
                cabin_1.setDeckLevel(1);
                cabin_1.setShipId(1);
                cabin_1.setBedCount(3);
                travelagent.createCabin(cabin_1);
                Cabin cabin_2 = travelagent.findCabin(1);
                System.out.println(cabin_2.getName());
                System.out.println(cabin_2.getDeckLevel());
                System.out.println(cabin_2.getShipId());
                System.out.println(cabin_2.getBedCount());
             ......Thanks,
    Jack

  • Simple J2EE application fails under activation

    Hi,
    I have a simple J2EE application which contains one Servlet.
    I have two DCs: SSORedirector (Enterprise application project) and SSORedirectWebModuleWebModule (Web Module)
    (there is a third DC which is a child DC to SSORedirector, but I don't think it causes any problems)
    The web module has by default public part called war (an I haven't touched this).
    The Enterprise application project I have addeed the required references to the web module in the application.xml(this automatically set a Used DC reference).
    When right-clicking the enterprise application and selecting build, it builds a correct ear file, and if I deploy it to my local workplace installation, the J2EE application works as expected.
    However, when I try to check in and activate the activity the SDM deployment fails with the message: Info:java.lang.RuntimeException: Incorrect EAR file. EAR /usr/sap/ED2/JC00/SDM/root/origin/bouvet.com/SSORedirector/JDI_ZEPSSO_D/8596/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda does not contain entry META-INF/application.xml as required by the J2EE specification.
    I've retrieved the .sda file on the file system (shouldn't it be an .ear file) and it contains the application.xml under the folder meta-inf. The complete contents of the sda file is
    ./d1c66970ddbec7e6ffcc4d01c4705600.HASH
    ./META-INF/application-j2ee-engine.xml
    ./META-INF/application.xml
    ./META-INF/MANIFEST.MF
    ./META-INF/SAP_MANIFEST.MF
    ./META-INF/sda-dd.xml
    ./src/java/src.zip
    ./bouvet.com~SSORedirectorServlets.war
    What could possibly be wrong?
    Below are some logs.
    <b>Deployment log</b>
    SAP Change Management Service
    System sapJDI.st.bouvet.no
    Build space JDI_ZEPSSO_D
    Request 8554
    Step Deployment
    Log /sapmnt/JDI/global/TCS/LOG/JDI_ZEPSSO_D2006021618420025.log
    Info:deploy every archive associated to the buildspace: JDI_ZEPSSO_D
    Info:getting DC SSORedirector from CBS for buildspace: JDI_ZEPSSO_D
    Info:archive /sapmnt/JDI/global/TCS/DEPLOYARCHIVES/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda for DC SSORedirector was transfered
    Info:Start deployment:
    Info:The following archives will be deployed (on http://sapED2.st.bouvet.no:50018)
    Info:/sapmnt/JDI/global/TCS/DEPLOYARCHIVES/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda
    Info:SDM log:
    Info:
    Info:
    Info:
    Info:
    Info:
    Info:
    Info:
    Info:
    Info:Feb 16, 2006 7:39:58 PM  Info: -
    Starting deployment -
    Info:Feb 16, 2006 7:40:01 PM  Info: Loading selected archives...
    Info:Feb 16, 2006 7:40:01 PM  Info: Loading archive '/usr/sap/ED2/JC00/SDM/program/temp/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda'
    Info:Feb 16, 2006 7:40:11 PM  Info: Selected archives successfully loaded.
    Info:Feb 16, 2006 7:40:11 PM  Info: Actions per selected component:
    Info:Feb 16, 2006 7:40:11 PM  Info: Update: Selected development component 'SSORedirector'/'bouvet.com'/'JDI_ZEPSSO_D'/'8596' updates currently deployed development component 'SSORedirector'/'bouvet.com'/'JDI_ZEPSSO_D'/'8590'.
    Info:Feb 16, 2006 7:40:14 PM  Info: The deployment prerequisites finished withtout any errors.
    Info:Feb 16, 2006 7:40:14 PM  Info: Saved current Engine state.
    Info:Feb 16, 2006 7:40:15 PM  Info: Error handling strategy: OnErrorSkipDepending
    Info:Feb 16, 2006 7:40:15 PM  Info: Update strategy: UpdateAllVersions
    Info:Feb 16, 2006 7:40:15 PM  Info: Starting: Update: Selected development component 'SSORedirector'/'bouvet.com'/'JDI_ZEPSSO_D'/'8596' updates currently deployed development component 'SSORedirector'/'bouvet.com'/'JDI_ZEPSSO_D'/'8590'.
    Info:Feb 16, 2006 7:40:15 PM  Info: SDA to be deployed: /usr/sap/ED2/JC00/SDM/root/origin/bouvet.com/SSORedirector/JDI_ZEPSSO_D/8596/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda
    Info:Feb 16, 2006 7:40:15 PM  Info: Software type of SDA: J2EE
    Info:Feb 16, 2006 7:40:15 PM  Info: ***** Begin of SAP J2EE Engine Deployment (J2EE Application) *****
    Info:Feb 16, 2006 7:40:15 PM  Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
    Info:Feb 16, 2006 7:40:15 PM  Error: Aborted: development component 'SSORedirector'/'bouvet.com'/'JDI_ZEPSSO_D'/'8596':
    Info:Caught exception during access of archive "/usr/sap/ED2/JC00/SDM/root/origin/bouvet.com/SSORedirector/JDI_ZEPSSO_D/8596/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda":
    Info:java.lang.RuntimeException: Incorrect EAR file. EAR /usr/sap/ED2/JC00/SDM/root/origin/bouvet.com/SSORedirector/JDI_ZEPSSO_D/8596/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda does not contain entry META-INF/application.xml as required by the J2EE specification.
    Info: (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).null)
    Info:Feb 16, 2006 7:40:26 PM  Info: J2EE Engine is in same state (online/offline) as it has been before this deployment process.
    Info:Feb 16, 2006 7:40:27 PM  Error: -
    At least one of the Deployments failed -
    Info:end of log received from SDM
    Info:End deployment:
    Info:deploy finished for SSORedirector (8554) with rc=12
    Info:deployment finished for buildspace: JDI_ZEPSSO_D
    <b>CBS log</b>
      CBS Request Log - [  8554/JDI_ZEPSSO_D  ]
      sapjdi.st.bouvet.no SAP Component Build Server   
    Build number assigned: 8596
    Change request state from QUEUED to PROCESSING
    ACTIVATION request in Build Space "JDI_ZEPSSO_D" at Node ID: 37,956,050
         [id: 8,554; parentID: 0; type: 4]
         [options: NO OPTIONS]
    REQUEST PROCESSING started at 2006-02-16 18:41:35.949 GMT
    ===== Pre-Processing =====
    List of activities to be activated:
         1 activity in compartment "bouvet.com_PASSTHROUGH_SSO_1"
              C049689.6 - Passthrough SSO
                   [seq. no 17][created by 433937 at 2006-02-16 19:41:49.0][ID 44ed44bc9f1911daae5b0012799e50b6]
    Analyse activities... started at 2006-02-16 18:41:35.967 GMT
         Synchronizing component "bouvet.com/SSORedirector" from repository... finished at 2006-02-16 18:41:37.129 GMT and took 1 s 10 ms
              Component "bouvet.com/SSORedirector" is to be CHANGED by this activation.
         Synchronizing component "bouvet.com/SSORedirectWebModule" from repository... finished at 2006-02-16 18:41:37.933 GMT and took 802 ms
              Component "bouvet.com/SSORedirectWebModule" is to be CHANGED by this activation.
         Synchronizing component "bouvet.com/SSORedirectorServlets" from repository... finished at 2006-02-16 18:41:39.144 GMT and took 1 s 211 ms
         3 components to be build in compartment "bouvet.com_PASSTHROUGH_SSO_1"
    Analyse activities... finished at 2006-02-16 18:41:39.202 GMT and took 3 s 235 ms
    Calculate all combinations of components and variants to be built...
         "bouvet.com/SSORedirector" variant "default"
         "bouvet.com/SSORedirectorServlets" variant "default"
         "bouvet.com/SSORedirectWebModule" variant "default"
    Prepare build environment in the file system... started at 2006-02-16 18:41:39.410 GMT
         Synchronize development configuration... finished at 2006-02-16 18:41:39.430 GMT and took 20 ms
         Synchronize component definitions... finished at 2006-02-16 18:41:39.469 GMT and took 38 ms
         Synchronize sources...
         Synchronize sources... finished at 2006-02-16 18:41:40.891 GMT and took 1 s 422 ms
         Synchronize used libraries...
              public part "war" of component "bouvet.com/SSORedirectWebModule" ... OK
                   [PP "war" of DC 381 variant "default"][SC 142][last successfull build: 0]
              public part "default" of component "sap.com/ejb20" ... OK
                   [PP "default" of DC 128 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/jdbc20" ... OK
                   [PP "default" of DC 145 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/jms" ... OK
                   [PP "default" of DC 147 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/servlet" ... OK
                   [PP "default" of DC 166 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/ejb20" ... OK
                   [PP "default" of DC 128 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/jdbc20" ... OK
                   [PP "default" of DC 145 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/jms" ... OK
                   [PP "default" of DC 147 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/servlet" ... OK
                   [PP "default" of DC 166 variant "default"][SC 139][last successfull build: 8020]
         Synchronize used libraries... finished at 2006-02-16 18:41:43.712 GMT and took 2 s 820 ms
    Prepare build environment in the file system... finished at 2006-02-16 18:41:43.712 GMT and took 4 s 302 ms
    ===== Pre-Processing =====  finished at 2006-02-16 18:41:43.713 GMT and took 7 s 755 ms
    ===== Processing =====
    BUILD DCs
         "bouvet.com/SSORedirectorServlets" in variant "default"
              Public Part "war" has been changed. Dependent components will be marked as DIRTY and re-built later.
              The build was SUCCESSFUL. Archives have been created.
         "bouvet.com/SSORedirectWebModule" in variant "default"
              Public Part "war" has been changed. Dependent components will be marked as DIRTY and re-built later.
              The build was SUCCESSFUL. Archives have been created.
         "bouvet.com/SSORedirector" in variant "default"
              The build was SUCCESSFUL. Archives have been created.
    ===== Processing =====  finished at 2006-02-16 18:41:56.154 GMT and took 12 s 436 ms
    ===== Post-Processing =====
    Check whether build was successful for all required variants...
         "bouvet.com/SSORedirectorServlets" in variant "default"   OK
         "bouvet.com/SSORedirectWebModule" in variant "default"   OK
         "bouvet.com/SSORedirector" in variant "default"   OK
    Update component metadata...
         "bouvet.com/SSORedirector"  has been CHANGED
         "bouvet.com/SSORedirectWebModule"  has been ACTIVATED
    STORE build results...
         "bouvet.com/SSORedirectorServlets": store meta-data
         "bouvet.com/SSORedirectorServlets" in "default" variant  is PROCESSED
         "bouvet.com/SSORedirectWebModule": store meta-data
         "bouvet.com/SSORedirectWebModule" in "default" variant  is PROCESSED
         "bouvet.com/SSORedirector": store meta-data
         "bouvet.com/SSORedirector" in "default" variant  is PROCESSED
    Change request state from PROCESSING to SUCCEEDED
    Analyse effect of applied changes to buildspace state... started at 2006-02-16 18:41:56.364 GMT
    Handle Cycles...
         No cycles detected.
    Determine components that have become DIRTY due to the results of this request...
         No such components have been found.
    Integrate activities into active workspace(s)...
         Integration of activities in compartment "bouvet.com_PASSTHROUGH_SSO_1" started at 2006-02-16 18:41:56.785 GMT
              "C049689.6 - Passthrough SSO"   OK
         Integration of 1 activities in compartment "bouvet.com_PASSTHROUGH_SSO_1" finished at 2006-02-16 18:42:16.614 GMT and took 19 s 829 ms
    Analyse effect of applied changes to buildspace state... finished at 2006-02-16 18:42:16.615 GMT and took 20 s 251 ms
    Request SUCCEEDED
    ===== Post-Processing =====  finished at 2006-02-16 18:42:16.617 GMT and took 20 s 451 ms
    REQUEST PROCESSING finished at 2006-02-16 18:42:16.618 GMT and took 40 s 669 ms

    Managed to solve it in a obscure way.
    I had earlier deployed the .ear file directly from NWDS to our dev system (hadn't installed dev workplace then). By removing the application from the deploy service in visual admin, the import suddenly worked.
    Dagfinn

  • NullPointerException while Invoking the Application Client class

    I am trying to use Application Client Testing Tool in WSAD 5.0. Getting NullPointerException while the class is getting invoked. Could somebody help me...
    IBM WebSphere Application Server, Release 5.0
    J2EE Application Client Tool
    Copyright IBM Corp., 1997-2002
    WSCL0012I: Processing command line arguments.
    WSCL0001I: Command line, property file, and system property arguments resolved to:
    File to launch = D:/test/TestEAR
    CC Property File = null
    Client Jar File = <default>
    Alternate DD = null
    BootstrapHost = hostxyz
    BootstrapPort = <default>
    Trace enabled = false
    Tracefile = null
    Init only = false
    Classpath Parameter = null
    Security Manager = disable
    Security Manager Class = Not used. -CCsecurityManager=disable
    Security Manager Policy = Not used. -CCsecurityManager=disable
    Exit VM = false
    Soap Connector Port = null
    Application Parameters =
    WSCL0013I: Initializing the J2EE Application Client Environment.
    WSCL0600I: Binding HandleDelegate object.
    WSCL0031I: The object was bound successfully.
    WSCL0900I: Initializing and starting components.
    WSCL0910I: Initializing component: com.ibm.ws.activity.ActivityServiceComponentImpl
    WSCL0911I: Component initialized successfully.
    WSCL0901I: Component initialization completed successfully.
    WSCL0035I: Initialization of the J2EE Application Client Environment has completed.
    WSCL0014I: Invoking the Application Client class TestMDB
    WSCL0100E: Exception received: java.lang.NullPointerException     at java.lang.reflect.Method.invoke(Native Method)
         at com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:616)
         at com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:420)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)

    Some more info:
    This is in ApplicationClientModule of TestEAR. This EAR has an EJBModule. ApplicationClientModule invokes one of the EJBs. Selected TestEAR as Enterprise Application.

  • I unable to run ejb with application client using oc4j j2ee container

    Hi,
    I have installe oracle9i (1.0.2.2) oc4j j2ee container.
    I unable to run the ejbs . please help me how to run ejbs with application client and which files are shall configure.
    See the client application is :
    public static void main (String []args)
    try {
    //Hashtable env = new Hashtable();
    //env.put("java.naming.provider.url", "ormi://localhost/Demo");
    //env.put("java.naming.factory.initial", "com.evermind.server.ApplicationClientInitialContextFactory");
    //env.put(Context.SECURITY_PRINCIPAL, "guest");
    //env.put(Context.SECURITY_CREDENTIALS, "welcome");
    //Context ic = new InitialContext (env);
    System.out.println("\nBegin statelesssession DemoClient.\n");
    Context context = new InitialContext();
    Object homeObject = context.lookup("java:comp/env/DemoApplication");
    DemoHome home= (DemoHome)PortableRemoteObject.narrow(homeObject, DemoHome.class);
    System.out.println("Creating Demo\n");
    Demo demo = home.create();
    System.out.println("The result of demoSelect() is.. " +demo.sayHello());
    }catch ( Exception e )
    System.out.println("::::::Error:::::: ");
    e.printStackTrace();
    System.out.println("End DemoClient....\n");
    When I am running client application I got this type of Exception
    java.lang.SecurityException : No such domain/application: sampledemo
    at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java : 2040)
    at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java : 1884)
    at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java : 1491)
    at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java : 323)
    at com.evermind.server.rmi.RMIContext.lookup(RMIConext.java : 106)
    at com.evermind.server.administration.LazyResourceFinder.lookup(LazyResourceFinder.java : 59)
    at com.evermind.server.administration.LazyResourceFinder.getEJBHome(LazyResourceFinder.java : 26)
    at com.evermind.server.Application.createContext(Application.java: 653)
    at com.evermind.server.ApplicationClientInitialContext.getInitialContext(ApplicationClientInitialContextFactory.java :179 )
    at javax.naming.spi.NamingManager.getInitialContext(NamingManger.java : 246)
    at javax.naming.InitialContext.getDefaultInitialCtx(InitialContext.java : 246)
    at javax.naming.InitialContext.init(InitialContext.java : 222)
    at javax.naming.InitialContext.<init>(InitialContext.java : 178)
    at DemoClient.main(DemoClient.java : 23)
    .ear file is copied into applications directory.
    I have configured server.xml file like this
    <application name="sampledemo" path="../applications/demos.ear" />
    demos.ear file Contains following files
    application.xml
    demobean.jar
    Manifest.mf
    demobean.jar file contains following files
    application-client.xml
    Demo.class
    DemoBean.class
    DemoHome.class
    ejb-jar.xml
    jndi.properties
    Mainifest.mf
    Please give me your valuable suggestions. Which are shall i configure .
    Thanks & Regards,
    Badri

    Hi Badri,
    ApplicationClientInitialContextFactory is for clients which got deployed inside OC4J container..
    For looking up EJB from a stand alone java client please use RMIInitialContextFactory..So please change ur code....
    Also please check ur server.xml
    Since you have specified your ejb domain as "sampledemo"
    you have to use that domian only for look up..But it seems that you are looking up for "Demo" domain instead of "sampledemo" domain...So change your code to reflect that..
    Code snippet for the same is :
    Hashtable env = new Hashtable();
    env.put("java.naming.provider.url", "ormi://localhost/sampledemo");
    env.put("java.naming.factory.initial", "om.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "guest");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    Context ic = new InitialContext (env);
    Hope this helps
    --Venky                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Cursor variable in a Java program

    Hi all, I would like to know is how to explicitly pass a cursor variable to a stored procedure after defining it in the java source and to get the result back to the same variable. An example would be appreciated. Thanks in advance Giridhar

  • Wifi unstable and extremely slow on my Aspire V Nitro VN7-591G-7.

    Hi again ! My previous problem is now solved. But now I have issues with my wifi. The wifi works perfectly on other devices but on my Aspire V Nitro VN7-591G-7, it's just impossible to do anything on the internet... I've read it's a common problem an

  • Use of procedure in function

    Hi, Can we use Procedure in Function? Please elaborate with answers. Thanks, Sid

  • Error 0xE8000004 when trying to sync iphone 4S with Itunes

    Hi, I need help. When I connect my Iphone 4S on my macbook pro with I tunes I get a message saying that an unkown error 0eXE8000004 has occured and that I should try again later. I restarded my iphone, my computer, changed the 23 pin cable, changed t

  • No Welcome package and discounts not appearing online

    Hello, started a membership in store on 3/27/15, but wasn't asked for my email during checkout and now I'm trying to make a purchase online but the discounts aren't showing up even with the item in cart. The points from the when i started the members