1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

problems with TOMCAT

Discussion in 'Plesk for Linux - 8.x and Older' started by dwskp, Apr 5, 2005.

  1. dwskp

    dwskp Guest

    0
     
    Have you guys run into a problem with Tomcat when trying to deploy a war that contains other jars. I can't even get the java code to connect to mysql through mysql jars installed through the war. I have also tried placing the jars into common/libs. Still, I am getting a security related problem. For some reason tomcat is not allowing java to connect to mysql through the correcponding drivers. What do I need to do to make sure that java has access to all the jars included in the war?? I need to be able to use hibernate,struts, etc.. otherwise what is the point of having tomcat in plesk??
     
  2. dwskp

    dwskp Guest

    0
     
    Never mind guys I solved it by editing the catalina.policy file, everything works fine now.
     
  3. ryanz

    ryanz Basic Pleskian

    24
    73%
    Joined:
    Nov 23, 2002
    Messages:
    91
    Likes Received:
    0
    What did you actually do/edit to get it working?
    Please post it here so we can share the information.

    Thanks
     
  4. dwskp

    dwskp Guest

    0
     
    Ryan,

    This is what I did, I added the following to the catalina.policy file in the WEB APPLICATION PERMISSIONS section, please note this definition is on its own, it's not embedded into grant {} that is already defined in the policy file:

    initially i have tried this, but it didn't work:

    grant codeBase "file:/var/cache/tomcat4/work/PSA/-" {
    permission java.net.SocketPermission "localhost:8080", "connect";
    permission java.net.SocketPermission "localhost:3306", "listen,connect,accept,resolve";
    permission java.net.SocketPermission "localhost.localdomain:3306", "listen,connect,accept,resolve";
    permission java.util.PropertyPermission "file.encoding", "read";
    };

    so I did this instead:

    grant codeBase "file:/var/cache/tomcat4/work/PSA/-" {
    permission java.security.AllPermission;
    };


    I know it's not the most secure way, but it works until I figure out what's wrong the the first way of doing it.

    Drew.
     
  5. dwskp

    dwskp Guest

    0
     
    oh you also need to restart tomcat after the edit to have this working.

    For those who don't know where catalina.policy is located, it's in /var/tomcat4/conf directory.

    Drew
     
  6. ryanz

    ryanz Basic Pleskian

    24
    73%
    Joined:
    Nov 23, 2002
    Messages:
    91
    Likes Received:
    0
    Thanks for the details :)
     
Loading...