I thought on that too, but not sure. It's a maven project where the Eclipse
metadata is generated by mvn eclipse:clean eclipse:eclipse.
>From what I saw there is an issue with some JDBC classes, like
org.h2.Driver and org.h2.jdbcx.JdbcDataSource. For example, Java 8 comes
with JDBC 4.1 and org.h2.Driver doesn't have a *getParentLogger* method
(same for JdbcDataSource). That missing method makes the classloader to
fail bc org.h2.Driver doesn't implement java.sql.Driver.
Also, in org.h2.Driver.java had *getParentLogger* commented, like:
/**
>
> * [Not supported]
>
> */
>
> /*## Java 1.7 ##
>
> public Logger getParentLogger() {
>
> return null;
>
> }
>
> //*/
Here is what I did
Class.forName("org.h2.Driver");
> Connection conn = DriverManager.getConnection("jdbc:h2:test");
and got
> Exception in thread "main" java.lang.ClassNotFoundException: org.h2.Driver
> at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:259)
> at jooby.MyApp.main(MyApp.java:66)
Environment:
h2:1.4.178 java 1.8 MAC OSX
Thanks
On Monday, June 23, 2014 2:59:34 AM UTC-3, Noel Grandin wrote:
>
> It's more likely that your classpath was not configured correctly.
>
> What exactly did the exception look like?
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.