CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Guest

    Help! RMI with jdbc-odbc bridge

    Hi!
    Please look at the codes below...

    1:import java.rmi.RMISecurityManager;
    2:
    3ublic class TNet {
    4: public static void main(String[] args) {
    5: if(System.getSecurityManager() == null)
    6: System.setSecurityManager(new RMISecurityManager());
    7:
    8: try {
    9: Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    10: } catch(ClassNotFoundException ce) {
    11: System.out.println(ce.getMessage());
    12: ce.printStackTrace();
    13: }
    14: }
    15:}

    I want to make a RMI application.
    I thought that RMI application would go well with jdbc-odbc bridge.
    However, I've gotten some problem since I just started.
    I got an Exception,"java.security.AccessControlException", at Line 9.
    If I remove Line 5 and 6, there is no exception.
    Yes, I can make my RMI application without setting security manager
    to RMISecurityManager.
    I think, however, there might be some security problem.

    Have anyone made a RMI application or applet using jdbc-odbc bridge?
    I do need your help.
    Thanks in advance.


  2. #2
    Join Date
    Sep 1999
    Location
    Madurai , TamilNadu , INDIA
    Posts
    1,024

    Re: Help! RMI with jdbc-odbc bridge


    Have you specified the policy file when you run this application ?

    Save the following line in a file called "Policy.txt"



    grant{
    permission java.security.AllPermission;
    };





    and try running your application like this ..



    C:> java -Djava.security.policy=Policy.txt MyRMIServer






  3. #3
    Guest

    Re: Thank you for your help

    Dear, poochi

    Thank you for your help.
    I've forgotten policy file.

    Thank you once more.


  4. #4
    Join Date
    Sep 1999
    Location
    Madurai , TamilNadu , INDIA
    Posts
    1,024

    Re: Thank you for your help


    you are welcome..


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured