Ok this problem has confused me, i will outline what the program does first before i tell you the issue i am having.
I have set up HSQLDB i have created a program which reads from my database.properties file and connects to the database.
I then use this connection to perform some SQL commands such as add, remove and update entries from a simple console menu. If i enter my connection details manually so the url, username, password and driver it connects fine. When doing it manually i have username and password both as "", so the value is null. It all works fine then, my menu works, i can add, delete, update and display my table. If however, i try and connect by directing my program to the details in my database.properties file which also has a blank username and password field i cannot connect, i get this error message.
Exception in thread "main" java.sql.SQLInvalidAuthorizationSpecException: invalid authorization specification - not found: SA
I wanted to see what values were being used to connect so i put a println in to display the username and password when entering my details manually and also from reading from the file.
So when i attempt to establish a connection it shows me this line first. They both display username=null and password= null but if i link to the database.properties file i get the error message mentioned above . . . .It doesn't make sense to me as if a password/username were required, why can i connect by manually setting these to "" in my connection program?
Below is the connection program, you can see in the getConnection method i have the username and password field set to "". To use the values read from the file i use username and password instead.
It looks to me as if you have ignored almost everything which was said in that thread.
Not really because i can read the file now, that is no longer the problem. The issue is that i can connect to the database by manually entering the details, but if i use the same (blank) details i read from the file it wont let me access the database and gives me the above error message. I have checked that i can read the details correctly from the properties file, the problem is explained in more detail in my first post.