Contact EJB from Applet

Hi all!
Need urgent help. We try to contact an session ejb ( deployed to the OC4J - Server ). but it hangs , while creating the InitialContext !!! No exception, the programm stops only, while creating the new initialContext...
It works great, when connecting the ejb from an application, but NOT from an applet. Is there somebody out there, having a solution for that problem ?? Or Somebody know an example, where an applet connects an EJB ??
Please help.
For further information : the source code :
System.out.println("BEGIN getInitialContext() ...");
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationClientInitialContextFactory");
env.put(Context.PROVIDER_URL, "ormi://***.***.***.***/Server");
env.put(Context.SECURITY_PRINCIPAL, "******");
env.put(Context.SECURITY_CREDENTIALS, "*****");
try {
System.out.println(" BEGIN Create InitialContext");
javax.naming.InitialContext ic = new javax.naming.InitialContext(env);
System.out.println(" END Create InitialContext");
System.out.println("END getInitialContext() ...");
return ic;
} catch (Exception e) {
throw e;
null

could this be the reason, you don'y say what browser you are using.
From IBM alphaworks site: http://www.alphaworks.ibm.com
RMI for IE4 installs the missing Remote Method Invocation (RMI) support for the Microsoft Java virtual machine, thus enabling RMI for all Java applications that use the Microsoft Java virtual machine.
Microsoft Internet Explorer 4.0 (IE 4.0) is one of the applications that uses Microsoft Java. Once installed, this package enables IE 4.0 to run applets that use RMI; such applets include the Java Management Applications for the IBM Nways Manager products.
null

Similar Messages

  • Calling EJB from applet

    Hi friends,
    I have a problem of caling EJB from applet.that too from browser.
    Through dos prompt,I am able to set the classpath and then open the applet and then call the EJB.but thru browser i am encontering two problems,
    First,The codebase of applet is not being set and i am unable to view the applet.
    Second,my Initial Context Factory is not being found it is giving error as
    Cannot instantiate class: com.evermind.server.rmi.RMIInitialContextFactory.I am using oracle app server Oc4j2.
    can any one help me out.
    i am able to get output thru dos prompt where i can set classpath

    kyren,
    he has used something called HTML ConvertersDepends on the version of the plug-in you are using.
    (I'm sorry, but I couldn't find that detail in any of your posts!)
    You have to use the (HTML) converter with java version 1.3 (for example), but you don't have to with java version 1.4.
    thru my jbuilder version i am able to solve my
    problem.
    but thru browser,i am first of all not able to
    display applet.That's because "JBuilder" uses the appletviewer to display the applet (and not a browser).
    I Think for normal displaying applet we don't need of
    signed or unsigned applet.when calling ejb we may
    require.As Anupama has stated, the "codebase" attribute of the applet tag must be relative to the directory where the HTML file (containing the "applet" tag) is located. Where I work, we also use the "archive" attribute that tells the applet where to download the JAR files from. In order to lookup your ejb from your applet, you need (at least) the "oc4jclient.jar" file.
    By the way, if you want your name to appear next to your posts (instead of your ID number), you need to update your profile. Click on the "Forum Settings" link at the top of the (Web) page.
    Good Luck,
    Avi.

  • Applet + EJB (jBoss) - Error to get an EJB from Applet

    Hello? All
    Could anybody explain why i get an error here. There are an Applet, which should get an access to EJB which was deployed on JBOSS Server (version 4.2.2.GA). If I run this code as a Desktop Application (Make a window and put my panel here) - all OK. But if I run my Code as an Applet from HTML page I get an Exception like this:
    java.lang.IllegalStateException: unread block data
    I refer to my EJB this way:
    public void init()
    try
    Properties jndiProps = new Properties();
    String myServer = "michhome";
    jndiProps.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory") ;
    jndiProps.setProperty("java.naming.provider.url", myServer) ;
    jndiProps.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces") ;
    InitialContext ctx = new InitialContext(jndiProps);
    // Error got here:
    Object homeSource = ctx.lookup("Data1EJB");
    Data1Home home = (Data1Home)PortableRemoteObject.narrow(homeSource, Data1Home.class) ;
    RemoteBean1 = home.create() ;
    catch (Exception e)
    PrintException(e);
    Fragment of my HTML page where I put an Applet:
    <applet code=J2EEApplClientPKG.MainApplet codebase=classes ARCHIVE = "jbossall-client.jar" width=600 height=300>
    </applet>
    Thank you for time you spend on this question.

    Hello, my first applet is in the jar, and I want to
    get it out.get it out you mean launch from an applet which would be
    applet code=AppletClassName.class
    archive="JarFileName.jar"
    width=width height=height>
    </applet>
    or unjar it out which would be
    jar -xvf JarFileName.jar
    There is no plug-in installed here either, so I want
    THE LATEST VERSION to be uploaded from sun
    automatically.
    My book suggested something like the code below, but
    the plug-in version must be an oldie.
    Please help!
    <code>
    <!--archive="napaku.jar"-->
    <object
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="307"
    height="231"
    codebase="http://java.sun.com/products/plugin/1.2/jinst
    ll-12-win32.cab#Version=1,2,0,0">
    <param name="code" value="Lottery.class" />
    <param name="type" archive="napaku.jar" />
    <comment>
    <embed type="application/x-java-applet;version=1.2"
    code="Lottery.class"
    width="307"
    height="231"
    pluginspace="http://java.sun.com/products/plugin/1.2/pl
    gin-install.html">
    <noembed>
    </comment>
    "Napaku applet fails to load!
    </noembed>
    </embed>
    </object>
    </code>codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    The version may not be latest but you could change that as per your req.

  • Accesing an EJB from an Applet

    Hello,
    I've published my first EJB to Oracle 8i, and when I use a
    standalone java application as a client I have no problems.
    But when I try to access with an Applet, the Java console shows:
    javax.naming.NotContextException:
    retvalentin09.cedetel.tel.uva.es:2481:ORCL/test/MyEJBRemote
    The code I use to connect to the EJB is the same as in the
    standalone application:
    Hashtable env = new Hashtable();
    System.out.println("Inicializando entorno...");
    env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    env.put(Context.SECURITY_PRINCIPAL, "valentin");
    env.put(Context.SECURITY_CREDENTIALS, "valentin");
    env.put(Context.SECURITY_AUTHENTICATION,
    ServiceCtx.NON_SSL_LOGIN);
    System.out.println("Inicializado");
    try{
    Context ic = new InitialContext(env);
    System.out.println("Contexto inicial creado");
    MyEJBHome home = (MyEJBHome)
    ic.lookup("sess_iiop://retvalentin09.cedetel.tel.uva.es:2481:ORCL
    /test/MyEJBRemote");
    System.out.println("Obtenido home Interface");
    try{
    try{
    MyEJBRemote holaBean = home.create(); // create a
    bean instance
    System.out.println("Obtenida referencia a EJB");
    System.out.println("Resultado: "+holaBean.DimeHola());
    } catch (java.rmi.RemoteException
    RE){System.out.println("Excepcion remota: "+RE);}
    }catch (javax.ejb.CreateException
    CE){System.out.println("Excepcion de creacion: "+CE);}
    }catch (javax.naming.NamingException
    nE){System.out.println("Excepcion de nombrado: "+nE);}
    System.out.println("Finalizado");
    What is going wrong? I use Java Plugin 1.2.2 in the
    navigator, perhaps that is the problem.
    I've tried to compile the applet in JDeveloper 2.0 with JDK
    1.1.7, but the Netscape Communicator throws Security Exceptions
    (I think the JVM of the navigator is 1.1.5), and it happens the
    same with Internet Explorer.
    I've tried to compile the applet in JDevelper 2.0 whit JDK 1.2,
    and in both Communicator and Explorer the Java Console shows this
    messages:
    Java(TM) Plug-in: Version 1.2.2.pu
    Using JRE version 1.2.2
    User home directory = C:\WINNT\Profiles\Administrador
    Proxy Configuration: Manual Configuration
    Proxy: http=proxy.uva.es:80
    Proxy Overrides:
    JAR cache disabled.
    Inicializando entorno...
    Inicializado
    Contexto inicial creado
    Excepcion de nombrado: javax.naming.NotContextException:
    retvalentin09.cedetel.tel.uva.es:2481:ORCL/test/MyEJBRemote
    Finalizado
    I would appreciate if somebody could help me, as it is very
    urgent.
    Thanks in advance
    Valentin
    null

    Hi
    Oracle8i comes with set of samples. One of sample is accessing an
    EJB from applet. check out demo.tar/demo.zip file
    $ORACLE_HOME/javavm/demo directory.
    You will find it useful.
    regards
    raghu
    Valentin Alonso (guest) wrote:
    : Hello,
    : I've published my first EJB to Oracle 8i, and when I use a
    : standalone java application as a client I have no problems.
    : But when I try to access with an Applet, the Java console
    shows:
    : javax.naming.NotContextException:
    : retvalentin09.cedetel.tel.uva.es:2481:ORCL/test/MyEJBRemote
    : The code I use to connect to the EJB is the same as in the
    : standalone application:
    : Hashtable env = new Hashtable();
    : System.out.println("Inicializando entorno...");
    : env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    : env.put(Context.SECURITY_PRINCIPAL, "valentin");
    : env.put(Context.SECURITY_CREDENTIALS, "valentin");
    : env.put(Context.SECURITY_AUTHENTICATION,
    : ServiceCtx.NON_SSL_LOGIN);
    : System.out.println("Inicializado");
    : try{
    : Context ic = new InitialContext(env);
    : System.out.println("Contexto inicial creado");
    : MyEJBHome home = (MyEJBHome)
    ic.lookup("sess_iiop://retvalentin09.cedetel.tel.uva.es:2481:ORCL
    : /test/MyEJBRemote");
    : System.out.println("Obtenido home Interface");
    : try{
    : try{
    : MyEJBRemote holaBean = home.create(); // create a
    : bean instance
    : System.out.println("Obtenida referencia a EJB");
    : System.out.println("Resultado:
    "+holaBean.DimeHola());
    : } catch (java.rmi.RemoteException
    : RE){System.out.println("Excepcion remota: "+RE);}
    : }catch (javax.ejb.CreateException
    : CE){System.out.println("Excepcion de creacion: "+CE);}
    : }catch (javax.naming.NamingException
    : nE){System.out.println("Excepcion de nombrado: "+nE);}
    : System.out.println("Finalizado");
    : What is going wrong? I use Java Plugin 1.2.2 in the
    : navigator, perhaps that is the problem.
    : I've tried to compile the applet in JDeveloper 2.0 with JDK
    : 1.1.7, but the Netscape Communicator throws Security Exceptions
    : (I think the JVM of the navigator is 1.1.5), and it happens the
    : same with Internet Explorer.
    : I've tried to compile the applet in JDevelper 2.0 whit JDK 1.2,
    : and in both Communicator and Explorer the Java Console shows
    this
    : messages:
    : Java(TM) Plug-in: Version 1.2.2.pu
    : Using JRE version 1.2.2
    : User home directory = C:\WINNT\Profiles\Administrador
    : Proxy Configuration: Manual Configuration
    : Proxy: http=proxy.uva.es:80
    : Proxy Overrides:
    : JAR cache disabled.
    : Inicializando entorno...
    : Inicializado
    : Contexto inicial creado
    : Excepcion de nombrado: javax.naming.NotContextException:
    : retvalentin09.cedetel.tel.uva.es:2481:ORCL/test/MyEJBRemote
    : Finalizado
    : I would appreciate if somebody could help me, as it is very
    : urgent.
    : Thanks in advance
    : Valentin
    null

  • Calling EJB from an applet in 9iAS Release 2?

    Hello!
    In 9iAS Release 1 it is not so easy to call an EJB from an applet. First the applet needs special privileges and then the applet starts only once. The cause of problem is the implementation of ormi.
    Will 9iAS Rel. 2 support Applets calling EJBs?

    Jeff,
    I am also trying to make an applet client for an EJB deployed to OC4J.
    I modified the java2.policy file as you suggested, but when I tried to run my applet, I
    got the following error:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission tunneling.shortcut read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at java.lang.Boolean.getBoolean(Unknown Source)
         at com.evermind.server.rmi.RMIInitialContextFactory.<clinit>(RMIInitialContextFactory.java:34)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at its.fnd.ejb.EJBHomeFinder.getHomeObject(Unknown Source)
         at its.fnd.flight.ejb.EJBFlightFactory.<init>(Unknown Source)
         at its.fnd.flight.FlightFactory.<init>(FlightFactory.java:97)
         at EJBApplet.jbInit(EJBApplet.java:47)
         at EJBApplet.init(EJBApplet.java:36)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I am using OC4J (stand-alone) version 9.0.2.0.0 on Solaris 7 and Microsoft Internet Explorer
    5.0 with the java 1.3.1 plug-in.
    Here is the applet code that I use to lookup the EJB home interface:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
    props.put(Context.PROVIDER_URL,"ormi://host:6666/app");
    props.put(Context.SECURITY_PRINCIPAL,"admin");
    props.put(Context.SECURITY_CREDENTIALS,"password");
    Context ctxt = new InitialContext(props);
    Object homeObj = ctxt.lookup("my_bean");
    MyBeanHome home = PortableRemoteObject.narrow(homeObj, MyBeanHome.class);
    The HTML page with the <applet> tag is a static HTML page that is part of OC4J's default
    web application. The applet class file is located in a subdirectory of the default-web-app
    directory. Here is the HTML page...
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    HTML Test Page
    </TITLE>
    </HEAD>
    <BODY>
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="580" height="450" name="EJBApplet" align="middle" alt="Loading EJBApplet ...">
    <param name="java_code" value="EJBApplet">
    <param name="java_codebase" value="/tests">
    <param name="java_archive" value="xerces.jar,ejb.jar,oc4j.jar,jaas.jar"/>
    <param name="java_type" value="application/x-java-applet;version=1.3">
    <param name="java_scriptable" value="true">
    <table cellpadding="1" bgcolor="#FFFFFF" width="580" height="450">
    <tr><td>
    This is a place for an APPLET.<br>Your browser doesn't support the correct applet java plug-in.<br><br>You can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="/classes/3rdparty/j2re-win-plug-in.exe">Click here to install plug-in.</a><br><br>Or if you have an Internet connection you can install the correct plug-in from here.<br><a target='_blank' onClick='javascript:self.window.close()' href="http://java.sun.com/products/plugin/1.3/plugin-install.html">Click here to install plug-in from Internet.</a><br><br>You can call your System Administrator for assistance.</td></tr>
    </table>
    </object>
    </BODY>
    </HTML>
    I have searched the Internet, and the documentation, and tried several, different things,
    but I can't get it to work.
    Any and all help will be greatly appreciated.
    Thanks,
    Sofia.

  • Best way for an applet to contact EJB ?

    Which is the best way for an applet to connect EJB?
    1) Applet --> servlet --> EJB
    2) Applet --> EJB
    What is the pros and cons of both approach?
    Thanks

    Hi there,
    This is a tricky question and it would be interesting to hear what others think.
    Probably the key factor is what is available to you in terms of communications between the EJB and the applet. If you are on an intranet then having the applet talk directly to the EJB looks favourable as you will almost certainly be able to use RMI/IIOP for communications between the applet and the EJB. If you are forced to use HTTP as the communications protocol then you can't talk directly from the applet to the EJB but there again talking to a Servlet from an applet throws up complications of it's own. In this case you should consider not using an applet at all and instead use a JSP page or pages to handle the presentation.
    There is another issue that you need to consider when the applet talks directly to the EJB. If the App server that contains the EJB is on a different system to the one that runs the Web Server you'll have to address some security issues and will have to either have local policy files for the systems running the applet or you'll have to sign the applet and have the clients trust it.
    Hope this helps
    Amanda
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers

  • Accessing EJB's from Applet

    Hai friends,
    I want to access the ejb form the applet is it possible ?
    if passible please let me know how we access?
    Please send souce code to this id
    [email protected]
    Ok Friends i am wating for replys

    Is it possible to access EJB's from applet?Yes, but not recommended.
    if Yes,Please let me know how will happen and also if
    possible send me the peace of source code for this.
    mail id is : [email protected]
    Are you inviting spam by passing your mail id?
    Google and find out how EJB lookups are performed.

  • Keeping contact with controlling applet while u/l XML file via servlet

    Hello everybody,
    if I am thinking too complicated, please send me other suggestions. Here's the situation:
    I already have a working applet for a metadata application, that is sending the contents of the client's textfields to a remote database via servlet communication. Now I want to implement the following:
    -The users have some attribute data in form of an XML file
    -I want them to upload this file to the server (I already have that functionality using the fileUpload libraries of Apache Commons) by calling the servlet from a pop-up html page (is there any other possibility to do the communication, i.e. getting files from the file system?)
    -the XML file should be parsed on the server and the content should be sent back to the calling applet for previewing reasons.
    -when the user gives his/her O.K. the data should be transferred to the database.
    Now there are some obstacles to overcome: When I upload the XML file to the server, I loose "contact" with the applet, i.e. the file is not connected with the applet code in any way. This is not a problem, when there is only one user at the time, but with many users loading up their data at the same time, things could get tricky.
    What I thought was to copy the XML file to a temp directory with a unique name, the name of which would be transferred back to the applet by another servlet that is called when the (upload)pop-up window closes. The name of the temp directory could be the ID of the applet thread (is there such an ID, if yes, how can it be retrieved?)
    Any suggestions (or just shaking heads concerning my complicated construction ;-) )
    Cheers and many thanks in advance
    Jan

    You may be able to read a file from the file system with the applet, but it may require you to sign the applet. If you can, then use an HttpURLConnection to the servlet and send the file that way.
    On the server side, you could create a session object (wether you actually need a session or not), and use the session's id as the key id for the directory name for the uploaded file. Session IDs are unique per client, and if the client handles cookies, then the same session will be used from one request to the next.
      session = request.getSession();
      String sessionID = session.getId();The response from the servlet would be a link to the server-side file. If you are using the Applet to send the request, you could get the response and automatically view the new file. Otherwise, you could send a page to the popup window saying: "Click This Link To See Your File" type of thing.

  • Call ejb from browsers

    Hello Developers!
    I deployed my ejb to OAS4081. I call that
    from JDeveloper so it good. But when I try
    to call from applet in IExpl5 I can't
    instantiate the ORB. I've got a com.ms.security.SecurityException : oracle.oas.orb.CORBA.ORB.init
    I coded the CLASSPATH(oasoorb(yoj),client,
    ejbapi...) perfectly, I think.
    If anybody could help, please...
    Thanx!

    Hi there,
              I saw someone on this group had a problem to locate proper classpath
              to call EJB from JSP. I thought if you call EJB from classpath, you are
              calling the bean. But you loss all the EJB functions. To be able to utilize
              EJB features like object pooling. You need to call it from Weblogic server
              using url/jndi, not from the jar directly.
              Any comment? Am I right?
              BTW, my question about calling EJB from JSP means calling through URL,
              not a local path.
              Thank you
              >-------------------------------------------------------------------->
              Jim wrote in message <[email protected]>...
              >Hi there,
              > Can I call EJB from JSP? Is there a particular security setting or
              >concern for Weblogic? Is there an coding example?
              >
              >Thank you
              >
              >
              

  • Porting EJBS from orion to JBoss

    Hi
    I want to port EJBs written in Orion application server to JBoss,
    Which of the arreas chages are needed ? ,
    Currently I am accessing EJBs from an Applet.
    So can i use directly ear files in the Orion application server for JBoss.
    I want my what all need be changed in following areas.
    1. Server configuration
    2. EJB deployment
    3. Client code access ( i need to change JNDI initial contexts )
    4. JMS configurations
    thanks in advance
    Renjith

    Renjithkv,
    You would require different deployment descriptors for JBoss.
    jboss.xml for Ejbs.
    Modify standardjaws.xml or create jaws.xml for entity beans.
    Modify standardjbosscmp-jdbc.xml or create jbosscmp-jdbc.xml for Ejb jdbc.
    Deepak

  • Accessing EJBs from a servlet

    Hi everyone,
    I deployed my EJB component in an Oracle 8.1.7 database and I try to access it from a servlet.
    If I run my servlet from JDeveloper 3.2 (Web-to-Go), it all works fine. If I run my servlet from JRun 3.01 or from Tomcat 3.2.1, I get the following exception:
    javax.naming.NoInitialContextException: Need to specify class name in environmen
    t or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at javax.naming.NamingException.<init>(NamingException.java:104)
    at javax.naming.NoInitialContextException.<init>(NoInitialContextException.java:58)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:279)
    at javax.naming.InitialContext.lookup(InitialContext.java:349)
    at com.cognicase.framework.base.U0003.AbstractORB.getBean(AbstractORB.java:285)
    at com.cognicase.framework.base.U0003.AbstractORB.getBean(Compiled Code)
    at com.cognicase.demo.U2007BL.U2007WP_Users.lookupBean(U2007WP_Users.java:60)
    at com.cognicase.framework.is.U0103.AbstractBeanWrapper.beforeBeanCall(AbstractBeanWrapper.java:121)
    at com.cognicase.demo.U2007BL.U2007WP_Users.valideUser(U2007WP_Users.java:77)
    at com.cognicase.demo.U2000WB.U2000MW_WorkSpace.CallEjb(Compiled Code)
    at com.cognicase.demo.U2000WB.U2000MW_WorkSpace.doValidateLogin(Compiled Code)
    at com.cognicase.demo.U2000WB.U2000MW_WorkSpace.processService(U2000MW_WorkSpace.java:98)
    at Demo_0100_01.service(Demo_0100_01.java:128)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
    at org.apache.tomcat.core.Handler.service(Compiled Code)
    at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
    at org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
    at org.apache.tomcat.core.ContextManager.service(Compiled Code)
    at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Compiled Code)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
    at java.lang.Thread.run(Compiled Code)
    If I add my servlet classes, aurora_client.jar, mts.jar, vbjapp.jar and vbjorb.jar files to the CLASSPATH, it works fine.
    The behavior is the same in JRun and Tomcat.
    I don't like this solution since I have to make the CLASSPATH point to my application classes at the web server level instead of at the application context level.
    Has anyone been able to solve this problem?
    Thanks for your help.
    null

    Yes, I did. Actually, if I run my servlet in JDeveloper (Web-to-Go), it all works fine. I also extracted the code that calls the EJB from the servlet and I tested it in a small Java application, and it also works fine.
    Things stop to work when I deploy my servlet in JRun or in Tomcat.
    It appears that my code is correct, but the environment I try to run it is not, and I can't figure out what's wrong.
    Can anyone help me?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Sandeep Desai ([email protected]):
    Have you provided the environmental settings in the servlet.
    It should be :
    import oracle.aurora.jndi.sess_iiop.ServiceCtx;
    env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    env.put(Context.SECURITY_PRINCIPAL, username);
    env.put(Context.SECURITY_CREDENTIALS, password);
    env.put(Context.SECURITY_AUTHENTICATION, ServiceCtx.NON_SSL_LOGIN);
    InitialContext ctx = new InitialContext(env);
    Object obj = ctx.lookup("test/EJBHome");
    HomeObject home = PortableRemoteObject.narrow(
    obj,"HomeObject.class");
    RemoteObject remote = home.create();
    This should make it work!!
    <HR></BLOCKQUOTE>
    null

  • Calling OC4J deployed EJB from Oracle 8.1.7 DB

    Hi
    I have deployed a Stateless Session Bean to OC4J (9.0.2). The client works fine. The Servlet and JSP works fine.
    What I need to do now is call this EJB from PL/SQL , ie call from Database PL/SQL package to wrapper to OC4j EJB.
    Trying to get this loaded into Oracle DB we get a class compilation error with the
    com.evermind....rmi... class. I do believe this is the OC4J implementation of RMI lookup. Is there a comparable class to load in the DB?
    Any ideas how to ??
    Tks
    Andre
    Here is a client sample of calls to the EJB
    package SampleWizUpdates;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import WizUpdates.WizAllocTotals;
    import WizUpdates.WizAllocTotalsHome;
    import resTotals;
    import resSuccess;
    import javax.rmi.*;
    public class WizAllocTotalsClient2
    public static void main(String [] args)
    WizAllocTotalsClient2 wizAllocTotalsClient2 = new WizAllocTotalsClient2();
    try
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "manager");
    env.put(Context.PROVIDER_URL, "ormi://sdt10645:23791/WizAllocTotals");
    Context ctx = new InitialContext(env);
    WizAllocTotals totalsBean;
    Object homeObject = ctx.lookup("WizAllocTotals");
    WizAllocTotalsHome home =
    (WizAllocTotalsHome)PortableRemoteObject.narrow(homeObject,
    WizAllocTotalsHome.class);
    totalsBean = (WizAllocTotals)PortableRemoteObject.narrow(home.create(),
    WizAllocTotals.class);
    // create new EJB instance
    totalsBean = home.create( );
    // Call any of the Remote methods below to access the EJB
    int operatorId = 1238;
    resTotals newRes = new resTotals();
    resSuccess newResSucc = new resSuccess();
    String newDataBase = "dwz3";
    int eventRefNo = 17445291;
    int actionNumber = 3;
    int allocValue = 125;
    totalsBean.setDataBase( newDataBase );
    newRes = totalsBean.getOperatorTotals( operatorId, eventRefNo );
    System.out.println("Result total 1 is "+newRes.totTransactLimitValue);
    System.out.println("Result total 2 is "+newRes.totDailyLimitValue);
    System.out.println("Result total 3 is "+newRes.totWeeklyLimitValue);
    System.out.println("Result total 4 is "+newRes.totMonthlyLimitValue);
    System.out.println("Result total 5 is "+newRes.remDailyLimitValue);
    System.out.println("Result total 6 is "+newRes.remWeeklyLimitValue);
    System.out.println("Result total 7 is "+newRes.remMonthlyLimitValue);
    System.out.println("Result success code is "+newRes.resCode);
    System.out.println("Result success message is "+newRes.resMessage);
    newRes = totalsBean.setOperatorTotals(operatorId,
    eventRefNo,
    actionNumber,
    allocValue,
    "C",
    "Testing Reason");
    System.out.println("Insert result success code is "+newRes.resCode);
    System.out.println("Insert result success message is "+newRes.resMessage);
    catch(Throwable ex)
    ex.printStackTrace();
    }

    Hi Andre,
    I am using stand-alone OC4J version 9.0.2.0.0 under (SUN) Solaris 7
    with JDK 1.3.1 and Oracle DBMS version 8.1.7.4.
    I have not yet been able to create a java stored procedure in the
    database that directly looks up an EJB deployed to OC4J.
    The only two ways I have found to "talk to" an EJB from a java stored
    procedure is
    1) go through a servlet
    2) go through a "remote" object (using RMI)
    For the first option, deploy an application to OC4J that contains
    your EJBs and a servlet (which acts as the client for the EJBs).
    Then, from your java stored procedure, contact the servlet using
    the classes in the "java.net" package -- including "URL" and "URLConnection".
    For the second option, use the "rmiregistry" to register a remote
    object. This remote object acts as the EJB client. The remote object
    does not need to be part of an application deployed to OC4J. Then
    contact the remote object from your java stored procedure.
    Hope this helps.
    Good Luck,
    Avi.

  • How do I keep my contacts separate from other users under the same Apple ID?

    First, we have a single Apple ID that we use to log into iTunes and App Store.  We also have separate iPads.  Recently, my wife purchased an iPhone 4S.  During setup, she entered the Apple ID we use.  What happened next was that all of my contacts were added to her phone.  Then she followed the instructions to import her contacts from her old cell phone.  When that was done, all of my contacts were deleted from her phone.  Worse, they were deleted from my Address Book on the iMac (my account) and my iPad.  How do I keep my contacts safe from being deleted?  Do we need to have seperate Apple IDs?

    Go to settings>iclod>then mark "no" in  "contacts" .

  • Program error when Making Contact Sheet from Bridge

    I had been making contact sheet from the bridge using CS3 with no problem till a week ago when after completing the contact sheet, I get an error message saying that there was a program error, and photoshop locks up. I have to force quit. I am using a G5 dual 2.5 and 2 Gigs of RAM. I tried reinstalling without any luck.
    Any ideas?

    Does it work in a new User Account?
    Have you tried cleaning-out your Caches (use Cocktail); or trashing Prefs.?

  • How do I delete a contact group from my iphone

    How do I delete a contact group from my iphone?

    Download Easy Group. It is totally free. Lauch it. Click on Edit. Click on red-cross next to your unwanted group. That's all. http://itunes.apple.com/fr/app/easy-group/id461469079?mt=8
    Rémi
    Note: As I am Easy Group developper, I may receive some form of compensation, financial or otherwise,from my recommendation or link.

Maybe you are looking for