RMI client running from different machine giving error

HI all
I am trying to run the sample application getStart hello world.
I am able to run the java applet from the same machine ....
but i am get error when i am trying run client applet from the different machine .
(HelloApplet exception: access denied (java.net.SocketPermission)
client applet on machine1 and server and registory on machine2 in same lan .
i copied the Helloapplet.class and Helloclient.html to machine1.
appletviewer Helloclient.html
but the java version is different in both machines.......
can any one give some idea ....
the errror i am geting is :
HelloApplet exception: access denied (java.net.SocketPermission Neind-ws-003 res
olve)
java.security.AccessControlException: access denied (java.net.SocketPermission N
eind-ws-003 resolve)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1042)
at java.net.InetAddress.getAllByName0(InetAddress.java:559)
at java.net.InetAddress.getAllByName0(InetAddress.java:540)
at java.net.InetAddress.getByName(InetAddress.java:449)
at java.net.Socket.<init>(Socket.java:100)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:25)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:120)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:499)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:190
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at examples.hello.HelloApplet.init(HelloApplet.java:23)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:484)
The helloapplet.java code is :
package examples.hello;
import java.applet.Applet;
import java.awt.Graphics;
import java.rmi.Naming;
import java.rmi.RemoteException;
public class HelloApplet extends Applet {
String message = "blank";
// "obj" is the identifier that we'll use to refer
// to the remote object that implements the "Hello"
// interface
Hello obj = null;
public void init() {
     try {
          System.out.println("Path looking: " +getCodeBase().getHost());
     //obj = (Hello)Naming.lookup("//" +
          //     getCodeBase().getHost() + "/HelloServer");
               obj = (Hello)Naming.lookup("//Neind-ws-003/HelloServer");
     message = obj.sayHello();
     } catch (Exception e) {
     System.out.println("HelloApplet exception: " +
                    e.getMessage());
     e.printStackTrace();
public void paint(Graphics g) {
     g.drawString(message, 25, 50);
The helloclient.html code:
<HTML>
<title>Hello World</title>
<center> <h1>Hello World</h1> </center>
The message from the HelloServer is:
<p>
<applet
          code="examples.hello.HelloApplet"
width=500 height=120>
</applet>
</HTML>

Your problem is at the following line.
obj = (Hello)Naming.lookup("//Neind-ws-003/HelloServer");
The line you had commented beforehand is
//obj = (Hello)Naming.lookup("//" +
// getCodeBase().getHost() + "/HelloServer");
This worked because the applet was being retreived from the same server where the RMI server exists.
Remember, applets can only connect themselfs to the same host they are stored in and retreived from. This is because of VM, the sandbox does not allow you to connect to other machines other than the server where it resides on. If you use a applet viewer it might work if you loosen the security features. On a browser i do not belive it can be done. Maybe if you modify your security options for the VM you are able to achieve something, but personally i'm going for the "It cannot be done " answer because of what I said before.
Hope this helps
If any trouble then reply and I'll answer later.
Rui P.

Similar Messages

  • 401 Error on Consuming SharePoint Versions Web Service by java client running on Unix Machine

    In my organiszation I have sharepoint site of our project. I have a java client to consume Versions Web Service offered by SharePoint. The response received from web service without any issue when triggered from a client running on windows machine on
    intranet.
    When same java client ran from UNIX server on same intranet, it gives 401 error. Is there some different approach required for authentication while connecting from unix machine?
    Thanks in advance.

    Hello,
    Are you passing credential in code? If not then try to add using networkcredential.
    If you are passing then make sure that current user is having access on SP site and your javaserver is setup for NTLM security. Here is few links for same issue which could help you troubleshoot the issue
    http://stackoverflow.com/questions/8884152/ntlm-fails-when-consuming-sharepoint-web-service-from-java
    http://www.pentalogic.net/sharepoint-products/reminder/reminder-manual?p=troubleshooting%2F401errors%2F401errors.htm
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Client in a different machine..

    Hi,
    I ve a problem with JMS. I am developing a JMS Application with WebSphere and MQ Series.
    The application runs fine if i have the both the publisher and subscriber in the same machine.
    Now i want to move the client to a different machine say X. To do that should the machine 'x' need to have WebSphere environment because i'm using WebSphere for JNDI.
    If the machine doesnot have the WebSphere environment is it possible to achieve.
    If yes how to do that..
    Thanks
    MeenaO

    I think the jndi service can be accessed froma remote m/c, you can initialize the context with the appropriate paramters, so the lookups on the topic and connection factories and continue with your work.

  • RMIRegistry and rmiserver running  on different machines

    hi,
    Is it possible that RMIRegistry and rmiserver run on different machines?

    Its possible, but you cannot bind objects into the registry from a remote machine, due to security restrictions in force in Sun's RMI implementation.

  • How do I make a RMI client running in Bea find a remote, non Bea, RMI server?

    On my stand alone test system I run a RMI server in one JVM,
    registry.exe and a RMI client in its own JVM. The client uses
    java.rmi.Naming.lookup() to find the RMI server, and this works fine.
    If I run the same RMI client class within Bea the naming lookup fails! I
    guess this is due to Bea using it own RMI registry rather than the
    registry.exe I started separately(?)
    QUESTION: How do I make a RMI client running in Bea find a remote,
    non-Bea, RMI server?
    Of course, in the final environment the server will run on a system
    remote from Bea.
    The RMI client calls are done from a servlet, not from a EJB.
    The doumentation about using RMI with Bea is focused on running the RMI
    server within Bea. This might be the "normal" thing to do, but in our
    case Bea is the client, not the server. Do I still need to use
    weblogic.rmi.*....? If so, where?
    Grateful for any tip.
    Göran Hagnell

    On my stand alone test system I run a RMI server in one JVM,
    registry.exe and a RMI client in its own JVM. The client uses
    java.rmi.Naming.lookup() to find the RMI server, and this works fine.
    If I run the same RMI client class within Bea the naming lookup fails! I
    guess this is due to Bea using it own RMI registry rather than the
    registry.exe I started separately(?)
    QUESTION: How do I make a RMI client running in Bea find a remote,
    non-Bea, RMI server?
    Of course, in the final environment the server will run on a system
    remote from Bea.
    The RMI client calls are done from a servlet, not from a EJB.
    The doumentation about using RMI with Bea is focused on running the RMI
    server within Bea. This might be the "normal" thing to do, but in our
    case Bea is the client, not the server. Do I still need to use
    weblogic.rmi.*....? If so, where?
    Grateful for any tip.
    Göran Hagnell

  • Static field for apps running on different machines

    Hi:
    Let us say I have a class
    public class Client(){
    private int static someField;I know if you are running Client.java on a single machine, obviously you will only get ONE incarnation of someField because it is static.
    Now, let us say I run the Client.java on different machines, then there will be one someField genearted per each JVM , is that right??
    can someone confirm??
    I did a serach on Static field on the Forum, but nobody really touched on running it on different machines, so I thought I ask...

    There will be one instance of the static variable per JVM regardless of whether the JVMs are running on the same machine or different machines.

  • How to check if the RMI is running from Applet?

    I want to check if the RMI at a particular machine is running. I am planning to set-up four RMI servers in four different locations. If one fails, I would like the client to look-up for an other RMI at a different location. To do this effectively, I would like to check if the RMI is running. I would run a thread and check if the RMI is running. Second, at every call of the function at the RMI, I will check if the connection is live.
    Can someone suggest me a good method?
    Thanks
    subbu

    Sounds to me like a bit of overkill, but here's how you might do it:
    1. Set up a round-robin lookup chain. In other words. have the client do its RMI look up calls on a list of possible servers.
    2. To always be ready to failover to another server, you should check for RemoteExceptions. This should trigger your code to go into recovery. (You have to trap these exceptions on every remote method invocation anyhow.)

  • Connect Db From Different Machine

    Hi,
    OS : Windows xp
    DB : 10.1.0.4.2
    I have one database in my machine and i install form developer in my lab Top (Other machine) i try to connect to my database from
    my laptop but i can't i got this error ORA-12154. but i can access to my database from database machine.
    Regards,

    kingadmin wrote:
    CLIENT SQLNET FILE
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, EZCONNECT, ONAMES, HOSTNAME)
    CLIENT TNAMES
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.3)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = NVS)
    )content of tnsnames.ora appears to be malformed
    below show valid tnsnames.ora & how it is supposed to work
    bcm@bcm-laptop:~$ cat /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    V112=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=V112)))
    bcm@bcm-laptop:~$ sqlplus user1/user1@v112
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Apr 26 11:06:01 2012
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    11:06:02 SQL>

  • Time Machine giving error OSStatus 13

    I have an Apple Mac Mini server running Mac OS X Lion Server and I got a new Time Capsule to do the backup.
    I have set it up and everything's working fine except when i chose the Time Capsule as the back disk from Time Machine on the server, it gives me an error saying "Time Machine can't access the backup disk "Time Capsule". The operation couldn't be completed. (OSStatus error 13.)"
    Then i tried it from my Macbook Pro and it works like a charm. So what am i doing wrong on the server? Can anyone please help me resolve this issue.
    Thanks in advance.

    kdplatts wrote:
    My machine has been doing weird things for the past few days. (Locking up for no visible reason, losing the bookmarks created, and freezing just to mention a few) I tried to restore using my Time Machine but get Error Code -8004.
    Hi, and welcome to the forums.
    How did you do the restore? Did you do a full system restore, starting from your Install disc? If so see #E8 in [Time Machine - Troubleshooting|http://web.me.com/pondini/Time_Machine/Troubleshooting.html] (or use the link in *User Tips* at the top of this forum).
    If you didn't do a full system restore, what, exactly, did you do?
    Do I have a virus? If so, where in the heck did it come from. I don't go to any bad websites. Machine has been working weird since I started playing Spider Solataire, on the AARP website.
    There are no viruses that run on OSX. None. Zip. Zero.
    There is some "malware," such as Trojans, for Macs, though. But (unlike viruses that can get onto your system without your knowledge), you must approve their installation (via your Admin password) and/or operation (via the "This application was downloaded from the internet ..." prompt).
    Appropriately enough, some of these Trojans are included in pirated versions of Apple software, such as iWork!
    (If you're running Windoze on your Mac, that's the same as running it on a PC, so it needs all the same anti-everything stuff you'd use on a PC.)
    For the gory details, see Thomas Reed's [Mac Virus Guide|http://www.reedcorner.net/guides/macvirus].

  • Can't restore from Time Machine backup error message

    My hard drive on my Macbook failed a few days ago. Just makes a clanking noise and won't boot up etc... I installed a new drive, formatted it, and selected restore from Time Machine backup from the installer screen. It started restoring from my backup I had on an external drive and everything was fine untill it got about 6% done then get a message that says "An error occured when restoring from the backup" It is pretty non descriptive. It also says please restart your system and try again or something to that effect. I tried again, same problem.  When I try to copy files over manually I eventually gets some error that says there is a problem with a file and it will quit. Any ideas on how to get my data? I can see all my files on there, but can't get them. My backup disc is just used for backup on this one machine nothing else, so it shouldn't have a problem. Help!

    Good to hear MA is doing something!
    >I have never had much luck with Time Machine...
    Same here, not one good backup or restore, can't tell which.
    You can set any of these to Clone/Update as often as you wish...
    Carbon copy cloner...
    http://www.bombich.com/software/ccc.html
    Or SuperDuper...
    http://www.shirt-pocket.com/SuperDuper/
    Or the most expensive one & my favorite, Tri-Backup...
    http://www.tri-edre.com/english/products/tribackup.html

  • Imp from different machine

    Hi,
    I have dump(exp) which was took on oracle 10g solaris.
    I want to import in oracle 9i (windows) which is not psble as downward compatiblity not psble.
    So, I m trying to import through 10g oracle home which is on different machine. but cudnt it throws out error
    D:\oracle\product\10.2.0\BIN>imp abc/xyz@test
    Import: Release 10.2.0.1.0 - Production on Mon Aug 9 13:15:11 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    IMP-00058: ORACLE error 6550 encountered
    ORA-06550: line 1, column 33:
    PLS-00302: component 'SET_NO_OUTLINES' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    IMP-00000: Import terminated unsuccessfully
    regards,

    try this out
    set ORACLE_SID=test
    sqlplus
    /as sysdba
    startup
    get back to host
    imp username/password@test file=filename.dmp fromuser=abc touser=xyz
    if u have the complete database dump file use this
    imp username/password@test file =filename.dmp full=y
    Edited by: Suhail Faraaz on Aug 9, 2010 3:26 AM

  • Can more than one LV app running on different machines have open references to the same device at the same time?

    I want to control a bunch of FP devices from one PC and serve this info to some satelites PC who will be on the same network. Most of the time,only the one PC will be interacting with all of the FP devices.
    In the event this main PC fails, I want to be able to quickly tell all of my FP devices to go into a safe state. I have a mechanism that will tell me the main is down. When this happens, I want to write the correct state to all of the output relays.
    To pull this off, I wanted all of the satelites to open FP connections to the relays that have to be driven to the safe state at starrt-up. When the failure of the main is detected, I want to be able t
    o drive the relays to the correct state with a minimal amout of delay. My experiments with using FP explorer with a single PC controlling a FP device in a LV app has showed that I can write from ether place any time I wantedwith no apparent interfearence. I this same functionality available from multiple machines?
    The alternative to this approach would target a watch-dog app at each of the FP controllers and have them fail-safe their outputs but this means I need to include support of RT in this app, and I was hoping to keep this simple. Each of the FP controllers would also have to be smart enough to know which if outputs should be acted on. i would alsolike some mechanism of knowing this has happened (for trouble-shooting purposes)
    I thought I read this was built into FP, but that may have applied to specific devices. I am not sure.
    Question:
    What is the simplest approach to setting my outputs quickly to a safe state when then main PC goes down?
    Thank you for reading,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

    Ben,
    The FP-100X, FP-160X and FP-20XX series of network modules all have communication watchdogs. The communication watchdogs are used to monitor the communications between host computers and the network module. If there are no communications within the timeout period, pre-programmed settings can be applied to each channel as desired. For proper operation, a communications watchdog has to be enabled in three locations; in the network module (enable/disable and set timeout period), in the I/O module (Enable/Enable on Use (FP-100X series only)/Disable) and on each individual channel. For relays/discrete outputs, you can program what state the channel goes to (on/off), for analog outputs, you can set the exact output value the channel goes to.
    For more in
    formation, please see the following tutorial. It explains in detail how the watchdogs work.
    http://zone.ni.com/devzone/conceptd.nsf/webmain/FB7AABACC2BAB99686256C7E0080E60A?opendocument&node=11590_US
    Regards,
    Aaron

  • How to include a html from different machine?

    I've tired the inculde tag, but it seem unable to inculde files from other machines...
    could anyone teach me how to do so?!
    thanks!!!

    Hi,
    I think you are using <%@include file="filename"%>. This mechanism is a bit more efficient (the inclusion is done at the time the JSP is being compiled), but is limited to including text files (the file is read, rather than being processed as an HTTP URL; so if you include, say, a CGI script, the contents of your CGI script are revealed in the JSP output: not useful!). The <jsp:include> can include a URL of any type (HTML, servlet, JSP, CGI, even PHP or ASP).
    Try with <jsp:include> to include files on the other machines.
    Hope this helps.
    With Regards
    Gayam_Slash

  • Help required to put message to a queue running on different machine.

    Hi,
    I need to put a message to a queue which is on Queue manager running at different server. What I have are name of queue manager, name of queue and message to be put on the queue.
    Can you please help me as I m new to this area.
    Thanks alot.
    Omesh

    Your question is not about scripting. It is about how to use a third party system utility.  Post your questions here:
    http://forum.sysinternals.com/miscellaneous-utilities_forum11.html
    ¯\_(ツ)_/¯

  • Not able to call BPEL web service using RMI call from different machine

    Hi,
    1. I have created a smiple Helloworld asynchoronous BPEL process
    2. I am able to call that BPEL process using java program (RMI call) which I have written in JDeveloper 10.1.3.3 and the java program is running in the embeded OCJ4 instance of JDeveloper sucessfully.
    3. Now I am trying to run the same Java program in my unix machine where oracle application is installed.
    4. I have set all the CLASSPATH for required jars which I have used in JDeveloper and also kept the jar file in Unix machine.
    5. The java codes are complied successfully.
    6. But when I am trying to run it , getting the following exception:
    bash-3.00$ java HelloworldAsyn
    name is Debkanta
    property file data are: {java.naming.provider.url=opmn:ormi://172.18.19.169:6003:home/orabpel, java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory, orabpel.platform=ias_10g, java.naming.security.principal=oc4jadmin, java.naming.security.credentials=welcome1}
    hello3
    java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found
    at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)
    at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
    at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
    at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)
    at HelloworldAsyn.main(HelloworldAsyn.java:64)
    at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:293)
    at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
    at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
    at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)
    at HelloworldAsyn.main(HelloworldAsyn.java:64)
    bash-3.00$
    I need to solve it urgently. Can anyone please help me.
    Is it relaed to some user access issue in unix?
    Thanks & Regards
    Deb
    Message was edited by:
    user587916

    actually , I have laready given print stataement for the data in the context property file that you can see in the output. Today I am also able to call the bpel process using the same java program from my DOS command promt(cmd). Don't understand why the problem is occuring in unix.
    please help.

Maybe you are looking for