[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Tomcat error on a 550



> Hi guys,
>
> There is at the momment an error buging me as hell. And The solutions
> that I found on the net are not solving the problem
>
> The message I receive is copy/past at the bottom.
>
> I found at the sun forum that some one had made a new tomcat.policy, I
> tryed that one. But is not solving the problem.
>
>
> I like to here some sugestions,... To solve this pain in my ass  (:-)
>
>
> Greetz richard
>
>
>
> Location: /test.jsp
> Internal Servlet Error:
>
> javax.servlet.ServletException: Unable to connect to any hosts due to
> exception: java.security.AccessControlException: access denied
> (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
> 	at

Hi Richard,

Did you add this line to the big block in the tomcat.policy file?

permission java.net.SocketPermission "127.0.0.1",
"listen,resolve,connect,accept";

or

permission java.net.SocketPermission "localhost",
"listen,resolve,connect,accept";


If this works, you could restricting access a bit by placing the port
number behind it like:

permission java.net.SocketPermission "localhost:3306",
"resolve,connect,accept";

This setting should work for all vsites.

Of course, it should be possible to do it on a vsite level but that never
worked for us. This line also contains an error:
permission SocketPermission "localhost:1024-", "listen,connect,resolve";

You did restart Tomcat didn't you?

Regards, Bas