Your help will be greatly appreciated,
Alejandro Barrero
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Your help will be greatly appreciated,
Alejandro Barrero
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Your help will be greatly appreciated,
Alejandro Barrero
Your help will be greatly appreciated,
Alejandro Barrero
Alejandro Barrero wrote:Thanks again. What I am doing is
I know that there is a connection. The line "ResultSet result = statement.executeQuery(selectStatement);" gets executed and throws an exception with the error "No database selected".
I remember reading that this is a problem with MySQL and the solution was to somehow set the database. Unfortunately, "statement.execute("USE MySQL");" is giving me errors. This is happening in a MySQL connection pool and somebody knows the answer.
Your help will be greatly appreciated,
Alejandro Barrero
But you use MySQ in stead of MySQL:Alejandro Barrero wrote:Thank you Jan. I access the database in DbVisualiser with"jdbc:mysql://localhost:3306/MySQL". DbVisualiser shows "MySQL" as the root and node "mysql" contains the tables. In the GlassFish administrator console I created the connection pool with "DatabaseName" as "mysql" and I used "jdbc:mysql://localhost:3306/MySQL" as "url". "jdbc/paperles" is the name of the JDBC Resource in GlassFish.
but I have the database name in the URL "jdbc:mysql://localhost:3306/MySQ"
OCUP UML fundamental and ITIL foundation
Your help will be greatly appreciated,
Alejandro Barrero
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |