Can I create a socket in a JApplet

I am writing an applet using JApplet. I am trying to connect to a server using java.net.socket. However, every time i run the applet i get the following security exception.
java.security.AccessControlException: access denied (java.net.SocketPermission 129.64.167.212:19190 connect,resolve)
i tried substituting the ip address with localhost but it still didn't work.
I also used getCodeBase().getHost() but my the serverSocket i am running is not on the same IP address as the applet
is it possible to create a socket in JApplet?
I would appreciate your help

You sure can make a socket. but the code you are using is having one error. The following error comes:
java.security.AccessControlException: access denied (java.net.SocketPermission 129.64.167.212:19190 connect,resolve)
you use a lower port no., say 1025
try out, it might help
Cheers

Similar Messages

  • How can i create a socket connection through an http proxy

    i'm trying to make a socket connection send an email - i have code that works when you don't have to go through a proxy server but i can't make it pass the proxy server.
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class Mail
    public String to_address = "[email protected]";
    public String from_address = "[email protected]";
    public String sendSub = "HeHeHe";
    public String sendBody = "hehehe - it worked";
    // This is created to allow data to be read in by the keyboard.
    BufferedReader in = new BufferedReader(
    new InputStreamReader(System.in));
         private void Mail(String to_address, // recipient's addresses
    String from_address, // sender's address
    String sendSub, // subject
    String sendBody) // Message
                   throws IOException, ProtocolException,      UnknownHostException {
         Socket socket;                // creates a Socket named socket
         PrintStream out;               // stream to write to socket
         String host = "imap.btopenworld.com";          // identification of the mail server host
    // creates a new socket for connection to the mail server
    // as well as two variables for the read and write streams
         socket = new Socket(host, 25); // opens socket to host on port 25 (SMTP port)
         out = new PrintStream(socket.getOutputStream());
    // read the initial message
         in.readLine();
    // Dialog with the mail server
    // send HELO to SMTP server HELO command is given by a connecting SMTP host
         out.println( "HELO " + host );
         out.flush() ;
         in.readLine();
    // Once we are connected to the mail server we start sending the email...
    // send "from"
         out.println( "MAIL FROM: " + from_address );
         out.flush() ;
         in.readLine();
    // send "to"
         out.println( "RCPT TO: " + to_address );
         out.flush() ;
         in.readLine();
    // prepare the mailserver to receive the data
         out.println( "DATA" );
         out.flush() ;
         in.readLine();
    // Send actual email
         out.println("From: " + from_address);
         out.println("To: " + to_address);
         out.println( "Subject: " + sendSub + "\n" );
         out.flush() ;
         out.println("");
         out.println( sendBody ) ;
         out.println(".") ; // standard to determine end-of-body
         out.flush() ;
         in.readLine();
    //Quit and closes socket
         out.println("QUIT");
         out.flush();
         in.close() ;
         socket.close() ;
         return ;
    public static void main (String [] args) throws IOException
    Mail themail = new Mail();
    }

    i've tried that but it doesn't seem to do nething - this is how i implemented it...
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class Mail
    public String to_address = "[email protected]";
    public String from_address = "[email protected]";
    public String sendSub = "HeHeHe";
    public String sendBody = "hehehe - it worked";
    // This is created to allow data to be read in by the keyboard.
    BufferedReader in = new BufferedReader(
    new InputStreamReader(System.in));
         private void Mail(String to_address, // recipient's addresses
    String from_address, // sender's address
    String sendSub, // subject
    String sendBody) // Message
                   throws IOException, ProtocolException,      UnknownHostException {
         Socket socket;                // creates a Socket named socket
         PrintStream out;               // stream to write to socket
         String host = "imap.btopenworld.com";          // identification of the mail server host
    // creates a new socket for connection to the mail server
    // as well as two variables for the read and write streams
         socket = new Socket(host, 25); // opens socket to host on port 25 (SMTP port)
         out = new PrintStream(socket.getOutputStream());
    // read the initial message
         in.readLine();
    System.getProperties().put( "proxySet", "true" );
              System.getProperties().put( "proxyHost", "144.124.16.28" );
              System.getProperties().put( "proxyPort", "8080" );
    // Dialog with the mail server
    // send HELO to SMTP server HELO command is given by a connecting SMTP host
         out.println( "HELO " + host );
         out.flush() ;
         in.readLine();
    // Once we are connected to the mail server we start sending the email...
    // send "from"
         out.println( "MAIL FROM: " + from_address );
         out.flush() ;
         in.readLine();
    // send "to"
         out.println( "RCPT TO: " + to_address );
         out.flush() ;
         in.readLine();
    // prepare the mailserver to receive the data
         out.println( "DATA" );
         out.flush() ;
         in.readLine();
    // Send actual email
         out.println("From: " + from_address);
         out.println("To: " + to_address);
         out.println( "Subject: " + sendSub + "\n" );
         out.flush() ;
         out.println("");
         out.println( sendBody ) ;
         out.println(".") ; // standard to determine end-of-body
         out.flush() ;
         in.readLine();
    //Quit and closes socket
         out.println("QUIT");
         out.flush();
         in.close() ;
         socket.close() ;
         return ;
    public static void main (String [] args) throws IOException
    Mail themail = new Mail();
    }

  • Creating a socket behind a proxy server

    How can I create a socket to a server if the client is behind a proxy server? I know java.net's HTTP-related classes have built-in proxy server support but this is not for a HTTP-based application.

    Hi,
    I also need to do this but not found any way yet. Somewhere I read that we can set the socket proxies (because mine was an application which tries to open socket connection over the network) through command line or by setting the system properties "socksProxyHost=<proxy_host_address>" and "socksPoxyPort=<proxy_port>". I tried to solve my proxy issue this way but all invain. While setting these system properties it is required that your proxy server is using the SOCKS service which I think is mostly the case but it still didn't work for me. You people try and c if it works for you. If anyhow you manage to get this issue resolved then please tell me also by posting a message.
    regards

  • Application hangs while trying to create a socket

    Hello,
    We have a third party application that makes HTTP connections using a old version of HTTPClient. Recently we have run into problems where the application hangs as one thread seems to hang while trying to create a socket (thread dumps show the hang occurs in native code) and other threads end up waiting for this thread as they need to obtain a lock on HTTPClient.HTTPConnection. We found out that HTTPClient was not setting a timeout on the underlying socket (SO_TIMEOUT) and the relevant patch has been implemented in the hope that if the condition arises again the offending thread will be timed out and allow other threads to try and continue.
    We will not be able to see if the patch works until Monday and I would like to understand the problem a little better if it fails. My question at what point will the socket timeout starting ticking? As our offending thread is waiting in native code is there a chance that the timeout will not be "active".
    Also can anyone provide reasons for an application hanging while trying to create a socket and any suggestions for monitoring or mitigating this problem?
    Thanks a lot.
    Sun Solaris 5.8
    JDK 1.4.1 b02

    It looks like our version of the JDK offer a connect method with a timeout value, I think this will do the trick.

  • How can I create a simple chat function in a mobile app for iOS and Android

    I am wondering how can I create a chat function in my mobile app creating in AIR and Flex. The chat should be similar to the one in WhatsApp.
    Do you know some possible solutions?
    Thank you in advance!

    To enable chat messages, you need a server. The kind of server depends on the application. Do you want to create a chat like application like WhatsApp, where the server pushes messages without an active connection? Or do you have some sort of online game, where chat messages can only be transferred when the client is connected already?
    I have an online game where clients are connected to a Java server at all time. From there it is pretty straight forward:
    2 textfields:
    - 1 line textfield for input messages
    - multi-line textfield for chat history. Make sure the textfields autoscrolls to the bottom when the content changes
    on enter or button push, send a socket message to the server.
    the server broadcasts all messages to all clients that are subscribers of the chat group.

  • SOAP unable to create a socket after OS upgrade OS/400 V5R4 to V7R1

    Hello,
    after we upgraded our OS from System i V5R4 to V7R1 we have problems with our SOAP adapters.
    In the runtime workbench and also in the SXMB_MONI the following error occured:
    SOAP: call failed: java.io.IOException: unable to create a socket
    Message-Verarbeitung fehlgeschlagen. Grund: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: unable to create a socket
    Before the OS upgrade the adapter rans without any errors and we tested the connection to the partner
    with an system running V5R4 with success. So it seems to be an error that came with the OS upgrade.
    Any idea? Had any one the same error after migration to V7R1? Thanks for your help.
    Best regards,
    Matthias

    Hello,
    we found out that the error is attached to DNS and Java stack. Our ABAP stack can set the url to the correct IP adress, if we configure a entry in SM59. Also the java stack calls our partner over SOAP with IP adress, but not with url. The urls are stored in the local host table, so we suppose that the java stack doesn't use the local dns table and doesn't ask our dns server for the right ip adress.
    Does anybody know this issue? The only change we did is upgrade OS/400 from V4R4 to V7R1. If a mod see this, I think it make sence to move this thread into the forum SAP on DB2 UDB for i5/OS (DB4). Thank's.
    Matthias

  • DeliveryException: unable to create a socket

    Hi,
       We are using the Proxy-> XI -> SOAP scenario(Synchronus). I am able to see that the request message mapping has transformed the message in to the required format. But, when it is calling the SOAP adapter it is giving com.sap.aii.af.ra.ms.api.DeliveryException: unable to create a socket error. Can any one help us in knowing
    what exactly is the problem. We have used 'Do not use SOAP envelop' option in the SOAP receiver adapter.
    Thanks And Regards
    Sripathi G Yogesh

    hi,
    you can refer to thread for your issue
    Re: SOAP Adapter: java.io.IOException: unable to create a socket
    regards,
    ujjwal kumar

  • How to create a socket to send to URI?

    I have apache-axis2 accepting a WSDL on some uri <ipaddres:8080/my/service/uri>. I'm trying to have a Java program send a soap message to that URI. When I use the uri <ipaddress:8080> I can create a socket using
    new Socket( (InetAddress.getByName(ipaddress), port);But if I do something like
    String uri = "/my/service/uri";
    new Socket( (InetAddress.getByName(ipaddress+uri), port);I'll get an UnkownHostException. So how would I create a socket that can send to a given uri?

    I ended up trying to create an OutputStream from doing an http connection to the uri. I've tried
    OutputStream os = null;
    URL url = null;
    URLConnection conn = null;
    url = new URL("http://"+ipaddress+":"+port+path);
    conn = url.openConnection();
    conn.setDoOutput(true);
    conn.setDoInput(true);
    conn.setAllowUserInteraction(true);
    conn.setUseCaches(false);
    conn.connect();
    os = conn.getOutputStream();to write I use
    void send(byte[] b)
    os.write(b);
    os.flush();
    }The problem is, when I write to the outputstream, according to Wireshark, nothing gets sent across the wire.
    System.out.println("output stream ="+os+"."); gives me
    "output stream = ."
    which is very odd. I'd expect "output stream = null" or "output stream = <some object handle>." What could be preventing me from getting the output stream?

  • SOAP Receiver   java.io.IOException: unable to create a socket

    Hi All,
    I have scenario where i invoke a external webservice  (over internet)  using SOAP adapter. I can reach the external target as they see my traffic on firewall but i always get:
    com.sap.aii.af.ra.ms.api.DeliveryException: java.io.IOException: unable to create a socket
    I cannot find any logs which provide more information on this. I have imported all the clients certificates into my J2EE keystore (webservice is over HTTPS). Any suggestions on where better logs can be found would be appreciated. So far checked RWB and the default trace log.
    Since my certificates arent in ABAP stack I cant use SM59 to test. I have used test tool like soapUI and can invoke the web service (although on different network to my XI server) so not sure why XI is failing
    Any suggestions would be greatly appreciated!
    Sorry forgot to mention - The error its self i suspect is firewall and will need to get network people to look at but any information on how to debug errors like this on J2EE side would be appreciated - is there a J2EE version of SM59?
    Message was edited by:
            Chris Mills

    Hi Chris,
    Check this thread..
    SOAP Adapter: java.io.IOException: unable to create a socket
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • Exception caught by adapter framework: unable to create a socket

    Hi All,
          I am using Idoc to XI To SOAP scinario. I got a alert asying that some messsage id is error. When i am trying to monitor that massage by taking help of the messgae id in the alert the message was successful in the SXMB_MONI,. Then i Went to message monitoring There the message statu was syetem error. Errror log is *Exception caught by adapter framework: unable to create a socket*. The communication channel was inactive wehere as the statsu of the channel was active in the directory... what is the reasonm for this error. and how to resilev this.

    As pointed already, a socket exception occurs when then message cannot pass the Firewall settings....there will be a port configured to send message to the SOAP receiver.....ask network guys to make relevant settings so that the port is free from Firewall restrictions.
    @Supriya --> Active/ Inactive status of the channel in ID and in CC monitoring are different things.
    To change the status of your CC in RWB --> Stop & Start your SOAP CC....the channel will remain inactive till no message is passed through it....once a message is passed the status will change to success/ error.
    You can also change the CC status to Automatic.
    Regards,
    Abhishek.

  • Can I create different Coherence nodes in the same cluster with defferent?

    Can I create different Coherence nodes in the same cluster with defferent cache-config.xml file ?
    Can a cache be distributed in these deffirent nodes?

    Yes. You can create different Coherence nodes in the same cluster with defferent cache-config.xml files as long as you use the same tangosol-coherence.xml file and the same tangosol-coherence-override.xml file. But you cannot store the cache data in the different nodes (started with different cache-config file). In other word, a node only create caches in their own's modes which are started with the same cache-config.xml file.
    See the following demo:
    I start a cache server using the cache config file examples-cache-server.xml. Then I start a storage-disabled cache console (cache client) using the cache config file coherence-cache-config.xml. Both of them using the same tangosol-coherence.xml file and the same tangosol-coherence-override.xml file.
    The cache server uses a cache service PartitionedPofCache. But the client side is using the Distributedcache service. The cluster address is same 224.3.5.2.
    The cluster name is also samme. They know each other.
    D:\coherence\lib>D:\examples\java\bin\run-cache-server.cmd
    D:\coherence\lib>D:\examples\java\bin\run-cache-server.cmd
    The system cannot find the file D:\coherence.
    The system cannot find the file C:\Oracle\Middleware\jdk160_11.
    2009-12-22 12:09:31.400/4.987 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational configurat
    ion from resource "jar:file:/D:/coherence/lib/coherence.jar!/tangosol-coherence.xml"
    2009-12-22 12:09:31.450/5.037 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational overrides
    from resource "jar:file:/D:/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    2009-12-22 12:09:31.470/5.057 Oracle Coherence 3.5.2/463 <D5> (thread=main, member=n/a): Optional configuration override
    "/tangosol-coherence-override.xml" is not specified
    2009-12-22 12:09:31.540/5.127 Oracle Coherence 3.5.2/463 <D5> (thread=main, member=n/a): Optional configuration override
    "/custom-mbeans.xml" is not specified
    Oracle Coherence Version 3.5.2/463
    Grid Edition: Development mode
    Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
    2009-12-22 12:09:33.864/7.451 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=n/a): Loaded cache configuration
    from "file:/D:/examples/java/resource/config/examples-cache-config.xml"
    2009-12-22 12:09:39.983/13.570 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Service Cluster joined t
    he cluster with senior service member n/a
    2009-12-22 12:09:43.187/16.774 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): Created a new cluster
    "cluster:0xD3FB" with Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Locatio
    n=process:144, Role=CoherenceServer, Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1) UID=0xC0A8085000
    000125B75D888C60501F98
    2009-12-22 12:09:43.508/17.095 Oracle Coherence GE 3.5.2/463 <D5> (thread=Invocation:Management, member=1): Service Mana
    gement joined the cluster with senior service member 1
    2009-12-22 12:09:46.582/20.169 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:PartitionedPofCache, member=1
    ): Service PartitionedPofCache joined the cluster with senior service member 1
    2009-12-22 12:09:46.672/20.259 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:PartitionedPofCache, member
    =1): Loading POF configuration from resource "file:/D:/examples/java/resource/config/examples-pof-config.xml"
    2009-12-22 12:09:46.702/20.289 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:PartitionedPofCache, member
    =1): Loading POF configuration from resource "jar:file:/D:/coherence/lib/coherence.jar!/coherence-pof-config.xml"
    2009-12-22 12:09:47.734/21.321 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=1): Started DefaultCacheServer.
    SafeCluster: Name=cluster:0xD3FB
    Group{Address=224.3.5.2, Port=35463, TTL=4}
    MasterMemberSet
      ThisMember=Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=process
    :144, Role=CoherenceServer)
      OldestMember=Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=proce
    ss:144, Role=CoherenceServer)
      ActualMemberSet=MemberSet(Size=1, BitSetCount=2
        Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=process:144, Rol
    e=CoherenceServer)
      RecycleMillis=120000
      RecycleSet=MemberSet(Size=0, BitSetCount=0
    Services
      TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=192.168.8.80:8088}, Connections=[]}
      ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.5, OldestMemberId=1}
      InvocationService{Name=Management, State=(SERVICE_STARTED), Id=1, Version=3.1, OldestMemberId=1}
      DistributedCache{Name=PartitionedPofCache, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCo
    unt=1, AssignedPartitions=257, BackupPartitions=0}
    2009-12-22 12:12:29.737/183.324 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member(Id=2, Timestamp=20
    09-12-22 12:12:29.541, Address=192.168.8.80:8089, MachineId=24656, Location=process:1188, Role=CoherenceConsole) joined
    Cluster with senior member 1
    2009-12-22 12:12:30.498/184.085 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service M
    anagement with senior member 1
    2009-12-22 12:12:31.860/185.447 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): TcpRing: connecting to me
    mber 2 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/192.168.8.80,port=8089,localport=2463]}
    2009-12-22 12:12:51.338/204.925 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service D
    istributedCache with senior member 2The following command starts a cache client.
    D:\coherence\bin>coherence.cmd
    D:\coherence\bin>coherence.cmd
    ** Starting storage disabled console **
    java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)
    2009-12-22 12:12:21.054/3.425 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational configurat
    ion from resource "jar:file:/D:/coherence/lib/coherence.jar!/tangosol-coherence.xml"
    2009-12-22 12:12:21.355/3.726 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational overrides
    from resource "jar:file:/D:/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    2009-12-22 12:12:21.365/3.736 Oracle Coherence 3.5.2/463 <D5> (thread=main, member=n/a): Optional configuration override
    "/tangosol-coherence-override.xml" is not specified
    2009-12-22 12:12:21.415/3.786 Oracle Coherence 3.5.2/463 <D5> (thread=main, member=n/a): Optional configuration override
    "/custom-mbeans.xml" is not specified
    Oracle Coherence Version 3.5.2/463
    Grid Edition: Development mode
    Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
    2009-12-22 12:12:29.316/11.687 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Service Cluster joined t
    he cluster with senior service member n/a
    2009-12-22 12:12:29.356/11.727 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): Failed to satisfy the
    variance: allowed=16, actual=20
    2009-12-22 12:12:29.356/11.727 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): Increasing allowable v
    ariance to 17
    2009-12-22 12:12:29.807/12.178 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): This Member(Id=2, Time
    stamp=2009-12-22 12:12:29.541, Address=192.168.8.80:8089, MachineId=24656, Location=process:1188, Role=CoherenceConsole,
    Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1) joined cluster "cluster:0xD3FB" with senior Member(I
    d=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=process:144, Role=CoherenceS
    erver, Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1)
    2009-12-22 12:12:29.977/12.348 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Member 1 joined Service
    Management with senior member 1
    2009-12-22 12:12:29.977/12.348 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Member 1 joined Service
    PartitionedPofCache with senior member 1
    2009-12-22 12:12:30.578/12.949 Oracle Coherence GE 3.5.2/463 <D5> (thread=Invocation:Management, member=2): Service Mana
    gement joined the cluster with senior service member 1
    SafeCluster: Name=cluster:0xD3FB
    Group{Address=224.3.5.2, Port=35463, TTL=4}
    MasterMemberSet
      ThisMember=Member(Id=2, Timestamp=2009-12-22 12:12:29.541, Address=192.168.8.80:8089, MachineId=24656, Location=proces
    s:1188, Role=CoherenceConsole)
      OldestMember=Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=proce
    ss:144, Role=CoherenceServer)
      ActualMemberSet=MemberSet(Size=2, BitSetCount=2
        Member(Id=1, Timestamp=2009-12-22 12:09:38.06, Address=192.168.8.80:8088, MachineId=24656, Location=process:144, Rol
    e=CoherenceServer)
        Member(Id=2, Timestamp=2009-12-22 12:12:29.541, Address=192.168.8.80:8089, MachineId=24656, Location=process:1188, R
    ole=CoherenceConsole)
      RecycleMillis=120000
      RecycleSet=MemberSet(Size=0, BitSetCount=0
    Services
      TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=192.168.8.80:8089}, Connections=[]}
      ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.5, OldestMemberId=1}
      InvocationService{Name=Management, State=(SERVICE_STARTED), Id=1, Version=3.1, OldestMemberId=1}
    Map (?):
    2009-12-22 12:12:49.505/31.906 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=2): Loaded cache configuration
    from "jar:file:/D:/coherence/lib/coherence.jar!/coherence-cache-config.xml"
    2009-12-22 12:12:51.358/33.729 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache, member=2): Service Distribut
    edCache joined the cluster with senior service member 2
    <distributed-scheme>
      <!--
      To use POF serialization for this partitioned service,
      uncomment the following section
      <serializer>
      <class-
      name>com.tangosol.io.pof.ConfigurablePofContext</class-
      name>
      </serializer>
      -->
      <scheme-name>example-distributed</scheme-name>
      <service-name>DistributedCache</service-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>example-binary-backing-map</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
      <autostart>true</autostart>
    </distributed-scheme>But when I try to store data into cache from the client side, it report error message: it's staorage-disabled. It shows that this cache console cannot store the data in the existing cache server because then using different cache config files.
    Map (ca3): cache ca2
    <distributed-scheme>
      <!--
      To use POF serialization for this partitioned service,
      uncomment the following section
      <serializer>
      <class-
      name>com.tangosol.io.pof.ConfigurablePofContext</class-
      name>
      </serializer>
      -->
      <scheme-name>example-distributed</scheme-name>
      <service-name>DistributedCache</service-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>example-binary-backing-map</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
      <autostart>true</autostart>
    </distributed-scheme>
    Map (ca2): put 1 one
    2009-12-22 14:00:04.999/6467.370 Oracle Coherence GE 3.5.2/463 <Error> (thread=main, member=2):
    java.lang.RuntimeException: Storage is not configured
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.onMissing
    Storage(DistributedCache.CDB:9)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureReq
    uestTarget(DistributedCache.CDB:34)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.put(Distr
    ibutedCache.CDB:22)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.put(Distr
    ibutedCache.CDB:1)
            at com.tangosol.util.ConverterCollections$ConverterMap.put(ConverterCollections.java:1541)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.put(Distrib
    utedCache.CDB:1)
            at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)
            at com.tangosol.coherence.component.application.console.Coherence.processCommand(Coherence.CDB:581)
            at com.tangosol.coherence.component.application.console.Coherence.run(Coherence.CDB:39)
            at com.tangosol.coherence.component.application.console.Coherence.main(Coherence.CDB:3)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.tangosol.net.CacheFactory.main(CacheFactory.java:1400)

  • Can I add controls at runtime in JApplet

    Please also tell me what good is JApplet for. As I cannot interact with database and there are several other limitations. Should I go and use JApplet in my application or avoid using them.
    My basic question remains the same "Can I add controls at runtime in JApplet"

    Yes, you can add controls to an applet at runtime.
    Applets are run on remote computers, in browsers for instance.
    Since they are run remotely, connecting to a database can be difficult. In most cases you'll need a server that makes the connection with the database. The applet speaks with the server via a socket.
    If you're writing a standard desktop application, then you should use JFrame.

  • Creating java sockets behind proxy servers.

    Hi,
    I am trying to create a socket to an external server(i.e. a public server) from behind a proxy firewall, but the socket creation statement throws an IO exception. Can someone please let me know how to create sockets using proxy servers.
    TIA
    Shishir

    I tried using java.net.Proxy for the connection. But the socket to the proxy itself is not getting created. It throws the IllegalArgumentException.
    import java.io.*;
    import java.net.*;
    import java.net.Proxy.Type;
    public class Client {
    static Socket proxSocket = null;
    static PrintWriter out = null;
    static BufferedReader in = null;
    public static void main(String[] args) throws IOException {    
    try {
    System.out.println("Trying to create socket");
    InetSocketAddress proxyadd = new InetSocketAddress(InetAddress.getByName("148.87.19.20"),80);
    Proxy ps = new Proxy(Proxy.Type.HTTP,proxyadd);
    Socket proxSocket = new Socket(ps);
    out = new PrintWriter(proxSocket.getOutputStream(), true);
    in = new BufferedReader(new InputStreamReader(
    proxSocket.getInputStream()));
    } catch (UnknownHostException e) {
    System.err.println("Don't know about host: ...");
    System.exit(1);
    } catch (IOException e) {
    System.err.println("Couldn't get I/O for "
    + "the connection to: ...");
    System.exit(1);
    catch(IllegalArgumentException e)
    System.err.println("Unable to describe the proxy.");
    System.exit(1);
    }

  • Sun RPC - is there a way to create domain sockets?

    hi,
    I would like to know if there is a way of restricting the Sun rpcgen program to create an RPC for the same host. i.e instead of going through all the layers of the tcp/ip stack i would like it to create domain sockets. This would increase performance of the RPC ( as lesser time would be taken for message transfer).
    I am not sure such an option exists. if anyone could give me information abt. how this can be done (if it can be done) it would be very helpful.
    Thanks,
    Somari.

    Great, drop caps work, thanks.
    I wanted to kern them back (I can't help myself) and I found that if I put a space after the box and then kerned the space back, it worked visually. Do you think that will cause issues down the road? It previewed ok.
    Also if I make the boxes too tight, again to make it more typographically pleasing, may I have issues later if people increase or decrease the font size?
    I don't have an iPad yet so I can't check it that way. If something previews, will it run?
    thanks

  • Can I create a JAR that is an Applet and Desktop app at the same time?

    Hi mates.
    Can I create a JAR that is an Applet and Desktop app at the same time?
    Thanks.

    Ricardo_Ruiz_Lopez wrote:
    ..I have one problem, I want a JMenuBar but I can't add it inside a jPanel.
    Any idea?
    SSCCE
    It can be compiled/run as an applet or application something like this (e.g. for a Win command prompt).
    C:\Users\Andrew\Hybrid> javac Hybrid.java
    C:\Users\Andrew\Hybrid> java Hybrid
    C:\Users\Andrew\Hybrid> appletviewer Hybrid.java
    C:\Users\Andrew\Hybrid> // YES the previous line requires a '.java'  suffix - trust me.  ;-)Code
    // <applet code='Hybrid' width='600' height='400'></applet>
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class Hybrid extends JApplet {
        public void init() {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    GUI gui = new GUI();
                    getContentPane().add( gui.getMainPanel() );
                    setJMenuBar( gui.getMenuBar(false) );
                    validate();
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    JFrame f = new JFrame("Test Hybrid");
                    f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
                    GUI gui = new GUI();
                    f.setContentPane(gui.getMainPanel());
                    f.setJMenuBar(gui.getMenuBar(true));
                    f.pack();
                    f.setLocationRelativeTo(null);
                    f.setVisible(true);
    class GUI {
        private JPanel mainGui = null;
        private JMenuBar menuBar = null;
        public JPanel getMainPanel(){
            if (mainGui==null) {
                mainGui = new JPanel( new BorderLayout(3,3) );
                mainGui.setBorder( new EmptyBorder(5,5,5,5) );
                JToolBar tb = new JToolBar();
                for (int ii=1; ii<6; ii++) {
                    tb.add( new JButton( "Btn " + ii) );
                    if (ii%2==0) {
                        tb.addSeparator();
                mainGui.add(tb, BorderLayout.NORTH);
                mainGui.add( new JSplitPane(
                    JSplitPane.HORIZONTAL_SPLIT,
                    new JScrollPane(new JTree()),
                    new JTextArea(20,20)
                    ), BorderLayout.CENTER );
                mainGui.add(new JLabel("Main user interface.."), BorderLayout.SOUTH);
            return mainGui;
        public JMenuBar getMenuBar(boolean isFloating) {
            if (menuBar == null) {
                menuBar = new JMenuBar();
                if (isFloating) {
                    JMenu fileMenu = new JMenu("File");
                    fileMenu.add( new JMenuItem("Exit") );
                    menuBar.add( fileMenu );
                JMenu helpMenu = new JMenu("Help");
                helpMenu.add( new JMenuItem("About") );
                helpMenu.add( new JMenuItem("Help") );
                menuBar.add( helpMenu );
            return menuBar;
    The code is not intended to be well designed. It is just written to be brief and demonstrate a few points.
    Edit 1:
    Added some access keywords in a passing gesture that the sample aimed at encapsulation.
    Edited by: AndrewThompson64 on Sep 2, 2010 1:34 PM

Maybe you are looking for

  • Import Error: Connecting to Dynamic Link Server Failed

    Just tried to import file sinto a brand new LR Catalog when I got this message...here's the entire error message: "An unknown error has occurred while reading the video file. Connecting to Dynamic Link server failed. (98)" Connecting to Dynamic Link

  • Setting up sounds on SB Live

    Hi, I am completely new to using midi and would really appreciate some advice. I have installed Band in a Box but the played sounds are really poor, each guitar sound is just like a toy keyboard sound. I have gone into Creative HQ on my PC and tried

  • Premiere Pro CC keeps crashing upon open - Error: 16

    When I try opening Pr CC I get error code 16. The message asks me to unistall Pr CC then reinstall it, so that's what I did, but I keep getting that error code when I try opening Pr CC and it keeps crashing before it can even open the program. Could

  • IBook G4 won't start up after installing Airport Extreme card

    Hi, just installed an Airport Extreme Card into girlfriends iBook G4 (10.4.5), which now won't start up. After pressing the start button all I hear is the fan spin (pretty fast actually), but nothing else happens. When I remove the card the iBook sta

  • Elements and Windows 7 - it's crashing when loading Editor - help!

    Installed Elements 7 (and tried 8) on my Toshiba laptop, the organiser loads fine but when I try getting into the Editor nothing happens - any help appreciated.  Ali