Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Does anyone recognise this exception running Tomcat

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe one of you have come accross this. I'ed appreciate your help.
I have a small application that accesses a URL and retrieves the HTML code from it, and prints out a few attributes.
It works fine on my own Tomcat.
The problem is when I use it on my host environment. If the URL is correct the data is printed out as usual. However, if the URL is incorrect, instead of the exception being caught and forwarding to my error page JSP I get following exception.
My host is www.webappcabaret.com
Here is my code from my servlet (controller) followed by my exception.

java.security.AccessControlException: access denied (java.net.SocketPermission www.brucel.com resolve)
at java.security.AccessControlContext.checkPermission(AccessControlContext.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 ezj.security.e.checkConnect(Unknown Source)
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 sun.net.www.http.HttpClient.(HttpClient.java:257)
at sun.net.www.http.HttpClient.(HttpClient.java:277)
at sun.net.www.http.HttpClient.New(HttpClient.java:289)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:383)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:476)
at UrlBean.testUrl(UrlBean.java:59)
at UrlBean.(UrlBean.java:41)
at UrlServlet.service(UrlServlet.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at ngasi.connector.tomcat.TomcatConnectionHandler.handleConnection(Unknown Source)
at ezj.b.d.run(Unknown Source)
Thanks in advance
 
It is an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic