- Bug fix on different database query type returns.
- Set embedded derby port to be flexible (default: 45000). As the previous default port 1527 is not working in some systems due to security issue.
- Fix the bug of unknown "localhost" for some systems where the alias is messed up.