Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7018381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:02:36+00:00 2026-05-27T23:02:36+00:00

my program is working fine on local desktop but when i have deployed it

  • 0

my program is working fine on local desktop but when i have deployed it on domain and run the same program then it is showing following exception.

java.security.AccessControlException: access denied (java.net.SocketPermission www.abc.com:80 connect,resolve)

at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)

at java.security.AccessController.checkPermission(AccessController.java:546)

at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)

at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)

at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)

at sun.net.www.http.HttpClient.(HttpClient.java:233)

at sun.net.www.http.HttpClient.New(HttpClient.java:306)

at sun.net.www.http.HttpClient.New(HttpClient.java:323)

at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:852)

at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793)

at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:718)

at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:896)

at pnr.PnrServlet.processRequest(PnrServlet.java:46)

at pnr.PnrServlet.doGet(PnrServlet.java:81)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

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 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)

at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)

at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)

at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)

at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)

at java.security.AccessController.doPrivileged(Native Method)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

at java.lang.Thread.run(Thread.java:619)

My program is to connect with other web site using java.net package
and show relevant data
i am running this code on apache tomcat
please help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:02:37+00:00Added an answer on May 27, 2026 at 11:02 pm

    Tomcat on your local machine is probably running without security turned on. On the actual server this is not the case and security manager is active. It is possible to grant the required SocketPermission privileges for your application for example by putting the following into the Tomcat security policy file:

    grant codeBase "file:${catalina.base}/webapps/your_app_root/-" {
      permission java.net.SocketPermission "www.abc.com:80", "connect";
    };
    

    This should go into the policy file, which is normally under conf/catalina.policy but your installation may differ. You should replace the file: URI with the correct one for your case.

    Please also read the detailed documentation on Tomcat security manager here: http://tomcat.apache.org/tomcat-6.0-doc/security-manager-howto.html.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So my program is working fine. Compiling, linking, running, the works. Then, I decide
My log4j is working fine when I run java pakcage.Main from command line, but
I am using Junit 4. My whole program is working fine. I am trying
I'm working on a socket program and everything seems fine when compiling. First I
I have a working program in C++ that generates data for a Mandelbrot Set.
I have a requirement for a program I'm working on to store job numbers
I have an otherwise working iPhone program. A recent change means that it generates
I have experience with setting up multiple Perl program with mac before, but come
I'm using Visual studio c++ 2010. My program was working fine until I linked
I have just written a program to run as a Windows Service Application, GasMeterMonitoring;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.