No database in the Console

82 views
Skip to first unread message

Max Telfer

unread,
Mar 3, 2015, 4:22:23 PM3/3/15
to h2-da...@googlegroups.com
Hi

I have posted this before. I am using an old version, h2-1.3.159, that is quite OK for my use.

Many updates ago, I could, in Windows, double click on theH2  jar file and the console would open and allow me to view/edit my database.

Now I get the following:

No suitable driver found for 08001/0
java.sql.SQLException: No suitable driver found for
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at org.h2.util.JdbcUtils.getConnection(JdbcUtils.java:188)
    at org.h2.server.web.WebServer.getConnection(WebServer.java:608)
    at org.h2.server.web.WebApp.login(WebApp.java:889)
    at org.h2.server.web.WebApp.process(WebApp.java:207)
    at org.h2.server.web.WebApp.processRequest(WebApp.java:166)
    at org.h2.server.web.WebThread.process(WebThread.java:132)
    at org.h2.server.web.WebThread.run(WebThread.java:88)
    at java.lang.Thread.run(Unknown Source)

I am using windows 7 64 bit.

The URL that is used when the jar file is clicked is:

The Console fields are:
Generic H2 (Server)
org.h2.Driver
jdbc:h2:c:/ProgramData/companyname/dbshift

My Java code connects to the database OK with a blank Username and Password (it has never been set to my recollection) and with the code lines:
Class.forName("org.h2.Driver");
and
con = DriverManager.getConnection("jdbc:h2:" + connectionURL + ";AUTO_SERVER=TRUE") where connectionURL is the location of the database directory.

Please assist

Many thanks

Max

Thomas Mueller

unread,
Mar 4, 2015, 1:43:31 AM3/4/15
to h2-da...@googlegroups.com
Hi,

If the message is really

  java.sql.SQLException: No suitable driver found for 
      at java.sql.DriverManager.getConnection(Unknown...

then your database URL is empty (an empty String).

Regards,
Thomas
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Max Telfer

unread,
Mar 4, 2015, 6:20:49 AM3/4/15
to h2-da...@googlegroups.com
Hi again

The URL and Console fields are in the original post. What should it be?

Thanks

Max
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscribe@googlegroups.com.

Noel Grandin

unread,
Mar 5, 2015, 2:35:24 AM3/5/15
to h2-da...@googlegroups.com
What browser are you using?
Do you perhaps have some nasty browser plugins installed?

Thomas Mueller

unread,
Mar 5, 2015, 2:59:22 AM3/5/15
to H2 Google Group
Hi,

Well, if the error message really is exactly this, then for some reason the database URL in the code itself is an empty string (you can't always thrust what is in the GUI).

You may want to debug.

Regards,
Thomas



To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.

Max Telfer

unread,
Mar 5, 2015, 5:46:21 AM3/5/15
to h2-da...@googlegroups.com
Hi again

I get the same result with any browser - Chrome, IE, Firefox. This used to work. 

I open the browser by double clicking the h2-4-186,jar file. The console window opens with the entries:
The Console fields are:
Generic H2 (Server)
org.h2.Driver
jdbc:h2:c:/ProgramData/companyname/dbshift

where the database file, dbshift.data.db is in the folder, c:/ProgramData/companyname/dbshift.

On clicking Connect, I get:
 jdbc:h2:C:/ProgramData/BMJ/dbshift
 INFORMATION_SCHEMA
 Users
 ADMIN
 Admin
 H2 1.3.176 (2014-04-05)

There are no tables of the dbshift database.
Adding the :file after jdbc:h2 does not make it work.

The code in my Java program accesses the database correctly.
How can I debug this? Once again, I am using 64 bit Windows 7.

Regards
Max

Thomas Mueller

unread,
Mar 9, 2015, 3:01:45 PM3/9/15
to H2 Google Group
Hi,

One way to debug is to look at the stack trace, and then set a breakpoint there, and then check what the parameters / variables are.

Regards,
Thomas




--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages