Unable to start derby database from Netbeans 7.4

This is what I did:

  1. Find out exactly where the java home is by executing this instruction from NetBeans 7.4 :
System.out.println(System.getProperty("java.home"));
This is the output for my case:
C:\Program Files\Java\jdk1.7.0_51\jre

which is quite important for me, I was modifying another java.policy and took no effect and wasted me a couple of hours.

  1. For reason of java.policy is an unix style file and read-only, I opened and edited it with notepad++ and executed as administrator (under the same java home):

    C:\Program Files\Java\jdk1.7.0_51\jre\lib\security\java.policy

Add only these lines into the file after the first grant:

<pre>grant {
    permission java.net.SocketPermission "localhost:1527", "listen";
};</pre>
  1. Save the file, which is a little tricky for reason of the permission. But if you run notepad++ or any other edit program as administrator, you can solve the problem.

    Then try to connect the database from NetBeans, it works for me.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)