Applet server problem

I have an applet that tries to call a servlet which is located back to the server (the same it came from). The result is:
java.security.AccessControlException: access denied
(java.net.SocketPermission localhost:80 connect,resolve)
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.checkConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at
com.acer.applets.PackageVisualizationApplet.doEverythingElse(PackageVisualizationApplet.java:61)
at
com.acer.applets.PackageVisualizationApplet.init(PackageVisualizationApplet.java:45)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
As i found to the web, an applet is permitted to open(only) a client socket without the need to be certified.
An other point is that, as i remember, an applet can communicate freely, only with the server it came from(without certification).
Is there any idea why is this happening?

Hi igorm3
Never tried such way but very successfull to communicate with scripts in server side using simple URL connection:
    final String
      USER_URL = "http://yourDomain/",
      SCRIPT_PATH = "scripPath/",
      SCRIPT = "yourScriptOrServlet";
    StringBuffer
      buff = new StringBuffer(USER_URL).append(SCRIPT_PATH).append(SCRIPT);
      buff.append("someQueryString");
    String result = null; // script response storage
    BufferedReader inp = null;
    try {
      URL url = new URL(buff.toString());
      URLConnection conn = url.openConnection();
      conn.setDoInput(true);
      conn.connect();
      inp = new BufferedReader(
              new InputStreamReader(conn.getInputStream()));
      result = inp.readLine();
      inp.close();
      inp = null;
    catch (MalformedURLException ue) {}
    catch (Exception e) {}
    finally {
      try { if (inp != null) inp.close(); } catch(IOException e) {}
    }Regards.

Similar Messages

  • Applet socket problem in client-server, urgent!

    Dear All:
    I have implemented a client server teamwork environment. I have managered to get the server running fine. The server is responsible for passing messages between clients and accessing Oracle database using JDBC. The client is a Java Applet. The code is like the following. The problem is when I try to register the client, the socket connection get java.security.AccessControlException: access denied(java.net.SocketPermission mugca.its.monash.edu.
    au resolve)
    However, I have written a Java application with the same socket connection method to connect to the same server, it connects to the server without any problem. Is it because of the applet security problem? How should I solve it? Very appreciate for any ideas.
    public class User extends java.applet.Applet implements ActionListener, ItemListener
    public void init()
    Authentication auth = new Authentication((Frame)anchorpoint);
    if(auth.getConnectionStreams() != null) {
    ConnectionStreams server_conn = auth.getConnectionStreams();
    // Authenticates the user and establishes a connection to the server
    class Authentication extends Dialog implements ActionListener, KeyListener {
    // Object holding information relevant to the server connection
    ConnectionStreams server_conn;
    final static int port = 6012;
    // Authenticates the user and establishes connection to the server
    public Authentication(Frame parent) {
    // call the class Dialog's constructor
    super(parent, "User Authentication", true);
    setLocation(parent.getSize().width/3, parent.getSize().height/2);
    setupDialog();
    // sets up the components of the dialog box
    private void setupDialog() {
    // create and set the layout manager
    //Create a username text field here
    //Create a password text field here
    //Create a OK button here
    public void actionPerformed(ActionEvent e) {
    authenticateUser();
    dispose();
    // returns the ConnectionStreams object
    public ConnectionStreams getConnectionStreams() {
    return(server_conn);
    // authenticates the user
    private void authenticateUser() {
    Socket socket;
    InetAddress address;
    try {
    // open socket to server
    System.out.println("Ready to connect to server on: " + port);
    socket = new Socket("mugca.its.monash.edu.au", port);
    address = socket.getInetAddress();
    System.out.println("The hostname,address,hostaddress,localhost is:" + address.getHostName() + ";\n" +
    address.getAddress() + ";\n" +
    address.getHostAddress() + ";\n" +
    address.getLocalHost());
    catch(Exception e) {
    displayMessage("Error occured. See console");
    System.err.println(e);
                                  e.printStackTrace();
    }

    Hi, there:
    Thanks for the help. But I don't have to configure the security policy. Instead, inspired by a message in this forum, I simply upload the applet to the HTTP server (mugca.its.monash.edu.au) where my won server is running. Then the applet is download from the server and running fine in my local machine.
    Dengsheng

  • Client Applet and EJB Server problem

    Hi,
    I developed a applet client that tries to connect to an EJB on the server side. The Applet runs okay in JDev3 but if I deploy it and test it outside the JDev tool I get an error. I tracked the problem to the following line of code:
    ic = new InitialContext(environment);
    Do I run into an applet security problem? If so what do i have to do to allow the applet to read/write to the local system?
    Thanks for any hints!
    Peter
    Error I get
    JAR cache enabled.
    Opening http://pete/gateway/clientmanagement.jar no proxy
    CacheHandler file name: C:\WINNT\Profiles\peter.000\Temporary Internet Files\Content.IE5\ALMN6PAZ\clientmanagement[1].jar
    Creating an initial context
    Opening http://pete/gateway/oracle/oas/container/nls/Version_en_US.class no proxy
    CacheHandler file name: null
    null

    Hi,
    I have still problems getting the client applet running. I tested it with the appletviewer and I modified the security.policy file. I allow the applet to almost everthing but i still get the following error:
    What do I do wrong? Do I really have to sign the jar file? Do I miss some stub classes?
    Thanks for any hints...
    Peter
    JAR cache disabled.
    Opening http://pete/Gateway/. no proxy
    Opening http://pete/Gateway/. no proxy
    Opening http://pete/Gateway/test/Client.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\peter.000\Temporary Internet Files\Content.IE5\ALMN6PAZ\Client[1].class
    Opening http://pete/Gateway/test/Client$1.class no proxy
    CacheHandler file name: C:\WINNT\Profiles\peter.000\Temporary Internet Files\Content.IE5\ALMN6PAZ\Client$1[1].class
    Creating an initial context
    Looking for the EJB published as 'Gateway/GatewayProcessorRemote'
    Opening http://pete:80/_RMProxyURL_ no proxy
    Naming exception!
    [Root exception is org.omg.CORBA.NO_IMPLEMENT: minor code: 0 completed: No]javax.naming.ServiceUnavailableException
    at oracle.oas.jndi.oas.SecCosNamingContext.resolve(SecCosNamingContext.java:265)
    at oracle.oas.jndi.oas.BeanContext.lookup(BeanContext.java:328)
    at oracle.oas.jndi.oas.BeanInitialContext.resolve(BeanInitialContext.java:265)
    at oracle.oas.jndi.oas.BeanContext.lookup(BeanContext.java:328)
    at oracle.oas.jndi.oas.BeanInitialContext.lookup(BeanInitialContext.java:165)
    at oracle.oas.jndi.oas.WrapperContext.lookup(WrapperContext.java:78)
    at oracle.oas.jndi.oas.BeanContext.lookup(BeanContext.java:422)
    at javax.naming.InitialContext.lookup(InitialContext.java:288)
    at test.Client.initializeEJB(Client.java:104)
    at test.Client.startButton_actionPerformed(Client.java, Compiled Code)
    at test.Client$1.actionPerformed(Client.java:55)
    at java.awt.Button.processActionEvent(Button.java:308)
    at java.awt.Button.processEvent(Button.java:281)
    at java.awt.Component.dispatchEventImpl(Component.java, Compiled Code)
    at java.awt.Component.dispatchEvent(Component.java, Compiled Code)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java, Compiled Code)
    at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java, Compiled Code)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:92)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:83)
    null

  • Applet loading problem for SOME people

    Ive made a java applet that works for me and some other computers:
    http://strike.insurrection-games.com/loa2%20test/loa%20test.htm
    Unfortunately, for some computers, the status bar shows this message:
    "class loa2_t1 not found"
    Its not a server problem, because those people experienced the same error when running it from a folder on the hard drive (and yes, that folder contained all class files including loa2_t1)
    those same people could play almost all other java applets found all over the internet.
    what could be the problem?
    (i dont use any jar files, just one folder with all necesary files, it runs perfectly for me)

    bbrita,
    http://java.sun.com/j2se/1.4.2/docs/guide/plugin/develo
    er_guide/using_tags.html#ie-nav
    doesnt work at all, same errorI just tried switching Sun's JVM to be the default browser for IE. This made your applet work.
    Thus, I can say with almost 100% certainty that your problem is exactly what we have told you. Those people that are testing your applet and getting an error, do NOT have Sun's JVM installed or it is NOT setup as default JVM for IE.
    You need to go back and reread the documentation on how to use the <object> tag properly. Try updating the link that you posted in your first thread to use the <object> tag. Then we may be able to see what you are doing wrong.

  • How to fix "server problem" error message when trying to use PhoneGap build service.

    I have a site that is now optimized for mobile devices and want to use the PhoneGap Build service in Dreamweaver CS6 to make a native app.  Unfortunately, I keep getting the "We seem to be having server problems." error message when I try to create a new project.  I did notice that the configuration file was created at the site root.  I've seen a few other similar threads on this, but no solution.  I've checked on any firewall issues (none) and know that the PhoneGap server is not down.  The problem is on my end.
    Thanks,
    Loren

    Not an answer to the server problem, but I have posted the PhoneGap Build process here: http://forums.adobe.com/message/4669054#4669054. It might help anyone still having problems.

  • [Fwd: Starting Managed server problem ......]

    Forwarding to the security news group...
    -------- Original Message --------
    Subject: Starting Managed server problem ......
    Date: 1 Jun 2004 23:02:53 -0700
    From: Sameer <barsatkiraat2001>
    Newsgroups: weblogic.developer.interest.management
    Hi All,
    I need you guy's help in this regard, that I am using solaris 8 and
    installed Weblogic8.1 Server.
    My Scenario is;
    Have configured Admin Server and Managed server with nodemanager on one
    unix machine.
    So, what am facing the problem;
    I am not able to get run Managed server after starting the nodemanager
    and admin server, getting the error in nodemanager logs that is :
    <Jun 2, 2004 9:44:26 AM GMT 04:00> <Warning> <Security> <BEA-090482>
    <BAD_CERTIFICATE alert was received from PortalQA - 10.12.10.94. Check
    the peer to determine why it rejected the certificate chain (trusted CA
    configuration, hostname verification). SSL debug tracing may be required
    to determine the exact reason the certificate was rejected.>
    And in Admin Server logs it's saying;
    <Jun 2, 2004 9:44:26 AM GMT 04:00> <Warning> <Security> <BEA-090504>
    <Certificate chain received from PortalQA - 10.12.10.94 failed hostname
    verification check. Certificate contained AdminQA but check expected
    PortalQA>
    The WebLogic Server did not start up properly.
    Exception raised:
    'weblogic.management.configuration.ConfigurationException: Due to faulty
    SSL configuration, this server is unable to establish a connection to
    the node manager.'
    <Jun 2, 2004 9:44:26 AM GMT 04:00> <Warning> <NodeManager> <BEA-300038>
    <The node manager is unable to monitor this server. Could not create an
    SSL connection to the node manager. Reason :
    [Security:090504]Certificate chain received from PortalQA - 10.12.10.94
    failed hostname verification check. Certificate contained AdminQA but
    check expected PortalQA>
    Reason: weblogic.management.configuration.ConfigurationException: Due to
    faulty SSL configuration, this server is unable to establish a
    connection to the node manager.
    <Jun 2, 2004 9:44:26 AM GMT 04:00> <Emergency> <WebLogicServer>
    <BEA-000342> <Unable to initialize the server:
    weblogic.management.configuration.ConfigurationException: Due to faulty
    SSL configuration, this server is unable to establish a connection to
    the node manager.>
    If some one can help me, I do appreciate in all due respect.
    Sameer.

    Hello Satya/All,
    I'm also experiencing the exact problem you are facing. It would be great if
    somebody could help in this regard at the earliest.
    Thanks, senthil
    Satya Ghattu <[email protected]> wrote:
    Forwarding to the security news group...
    -------- Original Message --------
    Subject: Starting Managed server problem ......
    Date: 1 Jun 2004 23:02:53 -0700
    From: Sameer <barsatkiraat2001>
    Newsgroups: weblogic.developer.interest.management
    Hi All,
    I need you guy's help in this regard, that I am using solaris 8 and
    installed Weblogic8.1 Server.
    My Scenario is;
    Have configured Admin Server and Managed server with nodemanager on one
    unix machine.
    So, what am facing the problem;
    I am not able to get run Managed server after starting the nodemanager
    and admin server, getting the error in nodemanager logs that is :
    <Jun 2, 2004 9:44:26 AM GMT 04:00> <Warning> <Security> <BEA-090482>
    <BAD_CERTIFICATE alert was received from PortalQA - 10.12.10.94. Check
    the peer to determine why it rejected the certificate chain (trusted
    CA
    configuration, hostname verification). SSL debug tracing may be required
    to determine the exact reason the certificate was rejected.>
    And in Admin Server logs it's saying;
    <Jun 2, 2004 9:44:26 AM GMT 04:00> <Warning> <Security> <BEA-090504>
    <Certificate chain received from PortalQA - 10.12.10.94 failed hostname
    verification check. Certificate contained AdminQA but check expected
    PortalQA>
    The WebLogic Server did not start up properly.
    Exception raised:
    'weblogic.management.configuration.ConfigurationException: Due to faulty
    SSL configuration, this server is unable to establish a connection to
    the node manager.'
    <Jun 2, 2004 9:44:26 AM GMT 04:00> <Warning> <NodeManager> <BEA-300038>
    <The node manager is unable to monitor this server. Could not create
    an
    SSL connection to the node manager. Reason :
    [Security:090504]Certificate chain received from PortalQA - 10.12.10.94
    failed hostname verification check. Certificate contained AdminQA but
    check expected PortalQA>
    Reason: weblogic.management.configuration.ConfigurationException: Due
    to
    faulty SSL configuration, this server is unable to establish a
    connection to the node manager.
    <Jun 2, 2004 9:44:26 AM GMT 04:00> <Emergency> <WebLogicServer>
    <BEA-000342> <Unable to initialize the server:
    weblogic.management.configuration.ConfigurationException: Due to faulty
    SSL configuration, this server is unable to establish a connection to
    the node manager.>
    If some one can help me, I do appreciate in all due respect.
    Sameer.

  • Photoshop CS2: name server problem: Is there a solution?

    Hi!
    I have Photoshop CS2. I can't start the program anymore because of the already well known name server problem... (DEAR ADOBE!! HOW COULD YOU!!! )
    Now, what can I do? As far as I know I purchased the software for an unlimited amount of time (thanks to the fact that there weren't any clouds, halleluja!)
    Can anybody help me, please? Is there a way "around"?
    Thanks a lot!!!
    Christiane

    Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3

  • I keep getting Server problems when trying to sign into messages

    Hi can anyone help, I have an Imac, and Lion  X 10.7.3, I have downloaded Messages Beta, evertytime I try to register it will not let me, telling me Server Problems try again later? Has anyone come across this? And can anyone help? Thank you.

    Hi can anyone help, I have an Imac, and Lion  X 10.7.3, I have downloaded Messages Beta, evertytime I try to register it will not let me, telling me Server Problems try again later? Has anyone come across this? And can anyone help? Thank you.

  • I recently updated Firefox and now it will not open. It says there is a proxy server problem.

    I was requested to update the program and now it says there is a proxy server problem.

    Hi:
    You can try this COMPRESSOR TROUBLESHOOTING document:
    http://docs.info.apple.com/article.html?artnum=302845
    Hope it helps !
      Alberto

  • Firefox periodically drops my Verizon/Yahoo email site indicating it cannot find the server. Verizon alledges there are no server problems.

    My email page will crash and the message received is:Firefox can't find the server at us.mc844.mail.yahoo.com. Repeated reloading does not help. After a period of time from 5 minutes to an hour the site can be accessed and is Ok for several days. The the problem reoccurs several times in the same day. When my email provider is contacted they indicate no server problems.

    Report your error messages so your peers, like me, can make suggestions..
    Official recommendations are on http://help.yahoo.com/l/us/verizon/mail/ymail/basics/mail-12859445.html NOTE THE URL's Stick with them if using YAHOO.  I have not found a newer recommendation for pop.yahoo.verizon.net that you mention, and the help page was updated this month.
    Note some have had trouble with missing intermediate certificates so get encryption errors.  Shouldn't happen (except if you are missing the root certificate, which is your responsibility),  but can be fixed by installing manually.
    Some have reported needing to specify [email protected] rather than just userid, I believe on the SMTP side.  Normally you specify only userid and password without the @verizon.net.

  • Mail Server Problem

    The mail server problem has been resolved, mail is working as designed....yeah!!

    silly discusting board, I've got 3 replies in my email but it's not showing here ...
    anyway, this time I found after some chasing my tail .... that the mail preferences had wiped my password and I needed to reinstall it, then instruct it to go online and some other click stuff ....
    and it seems to be ok now ....
    but each round in past 2 weeks has been different "fix" .... or wait ....
    sorry for anyone without master email for 5 days, that's just not right ....
    I'm afraid that as apple starts "giving away" email accounts to build the cloud into something much bigger than the mobile me was .... that their folo up will fail and we will find ourselves not with the same apple durability / consistency but with the "hey it's free" attitude ....
    let's see

  • Email server problem - failed to connect to server

    Since Friday 27th August I've been having trouble connecting to the email server for my BT Yahoo account. It simply can't find the server, even though none of the account settings have changed and it has worked fine for years. Weirdly, sometimes it works and emails come through (so the settings are obviously fine) but then it will stop working for no apparent reason. I use Thunderbird as my email client, but I tested the account in Outlook Express and it gives the same error. The account works fine over webmail, and through my iPhone, however.
    It seems like this is a DNS error rather than software related - is there anything BT-related that could be causing this, or any simple fixes? I've tried rebooting the HomeHub but that doesn't seem to have made a difference. I work from home, so this is a really annoying problem.

    Lynx wrote:
    Interesting - we have exactly the same problem. Haven't been able to download for days. This has happened with two different computers with different anti-virus systems - so one assumes it's not suddenly that. I can access my e-mail online and reply (having to bcc myself, so when it does eventually work I have copies on my outlook express. It was working perfectly one night and the next morning just stopped - nothing happened in between.
    I have tried to find out what the error number means, but no-one - not even BT's Help section - seem to have the solution. Have you ever seen the Eddie Izzard sketch on YouTube? This is definately one of those moments!
    If you find a solution - would really appreciate you posting it on here, so I can fix mine. Will do the same for youi.
    Hi.
    This sort of problem is hard to determine. It could be a few things, including a corruption of the mail account (which can last for a short time or a number of days), it could be a local problem - which you've ruled out by the different computer check, or perhaps a "stuck" email - say one which is spam/virus attached and the online checking systems failing to pass through it, or possibly a stale IP address.
    The latter 2 are easy to check, the first via webmail and see if there is anything near the "top" of the list that may cause a problem, moving to a new folder, and try again. The last can be tried by power cycling the router to get a new IP address. Disconnect the broadband and router for say 15 minutes and then reconnect to try again.
    If there was a major server problem, there would be lots more complaints.
    http://www.andyweb.co.uk/shortcuts
    http://www.andyweb.co.uk/pictures

  • I have just installed Lion OS and Face Time encounters server problems on sign up. I have sought the firewall problem without success and even temporarily turned off firewall with no success.

    I have just installed Lion OS and Face Time encounters server problems on sign up. I have sought to rectify the firewall problem without success and even temporarily turned off firewall with no success. Any ideas?

    Some folks have discovered that changing their DNS service fixes FaceTime connection issues.
    The ideal way is to configure your modem/router with DNS service, but often settings in System Preferences/Network/Advanced/DNS on your Mac will override the router settings. Try either of these;
    OpenDNS
    208.67.222.222, 208.67.220.220
    Google Public DNS
    8.8.8.8, 8.8.4.4

  • TS4002 Anybody having icloud server problems today? No incoming mail

    Dear all,
    I'm not receiving any mail guz Icloud tells me it has a server problem. I can send mail but not receive any. I can send myself a message using gmail sending it to my own gmail adres and I receive in my Mail program, no problem, it's just the ME account that does not work on any of my apple devices. I've checked the setting in the prefference from the Mail program, they all seam normal......ANY tips???
    Thank you so much,
    Simon

    Most inconvenient... trying to run a business and I made the mistake of using my me.com acct. for business rather than the old Yahoo acct.   I haven't been able to receive email all day either.
    Seeing that it's affecting less than 1% of it's customers, really is annoying for some reason. 

  • Could Not Sign In:  A server problem is blocking Apple ID sign in.  Try signing in later.

    After a successful iOS 5 upgrade to my iPhone 3GS, I began going through the setup wizard the phone takes you through upon initial use.  However, I'm unable to make it past the part where you are supposed to "Sign In with an Apple ID".  The steps to reproduce the problem are:
    Click "Sign In with an Apple ID".
    Per the "Have MobileMe and an ITunes Account?" instructions, I opt to type in my MobileMe e-mail address (e.g. [email protected]) and password.
    Click "Next".
    Specify birthday.
    Click "Next".
    Click "Agree".
    Click "Agree" on popup.
    A popup error is produced which reads "Could Not Sign In:  A server problem is blocking Apple ID sign in.  Try signing in later.".
    Click "OK" which takes you back to the initial sign in screen.
    I have tried logging in since 2am ET.  It is now 8:17am ET.  The server should not be down for over 6 hours.  Any ideas?
    Thanks in advance for any assistance offered!

    Hi Natalie,
    I was able to workaround this issue by clicking the "Skip" option on the first screen.  Afterwards, I went back and manually entered my me.com Apple ID in Settings | iCloud and my iTunes Apple ID in Settings | Store.  Doing it this way doesn't ask you to enter your birthday and I haven't yet found where that is supposed to be set.  However, everything appears to be working correctly without it.  Hope this helps!
    Brad

Maybe you are looking for