[h2] Re: H2 embeded User-Defined class problem spring hibernate unit test
I think H2 only supports user defined functions, not classes. The docs say: "When referencing a method, the class must already be compiled and included in the classpath where the database is running. Only static Java methods are supported; both the class and the method must be public" However, you do not have any static methods, that will be something to look into. Also, the ALIAS is to the method, not the class. On Tuesday, September 27, 2016 at 1:28:27 PM UTC-4, Adam McMahon wrote: > > The jar with your user defined class needs to be in your class path, that > seems to be the first place to check -- 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+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] H2 embeded User-Defined class problem spring hibernate unit test
The jar with your user defined class needs to be in your class path, that seems to be the first place to check -- 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+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] Re: Update from 1.4.191 to 1.4.192 leads to unit test failure
Update: I have found via the debugger that there is indeed a behavioural change between 1.4.191 and 1.4.192. The jdbcTemplate from Spring uses in the end the "resultSet.getObject(index, requiredType)" method. In 1.4.191, this throws an AbstractMethodError, which Spring handles by calling another method. In 1.4.192, this no longer throws this exception, but the method in H2 returns null. The org.h2.result.LocalResult has 1 row with 1 value with a ValueBytes object of 16 bytes (representing a UUID). Should this be considered a bug in H2 1.4.192 ? regards, Wim Op dinsdag 27 september 2016 17:21:39 UTC+2 schreef Wim Deblauwe: > > Hi, > > I am using H2 1.4.191 (Pulled in via Spring Boot 1.3.5). I wanted to try > to upgrade to Spring Boot 1.3.8 (which uses H2 1.4.192 by default), but one > of my unit tests suddenly fails. I managed to make it work again by > explicitly going back to H2 1.4.191 with Spring Boot 1.3.8. If I use H2 > 1.4.192 with Spring Boot 1.3.5, then the test also failed. So something > must have changed in 1.4.192 which makes it fail. > > I am using Spring Data and the unit test uses: > > jdbcTemplate.queryForObject("SELECT image_id FROM game", Object.class) > > This returns a non-null value using 1.4.191 and a null value using 1.4.192. > > I know this is very little info to go by, but maybe it rings a bell with > somebody? > > regards, > > Wim > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] Update from 1.4.191 to 1.4.192 leads to unit test failure
Hi, I am using H2 1.4.191 (Pulled in via Spring Boot 1.3.5). I wanted to try to upgrade to Spring Boot 1.3.8 (which uses H2 1.4.192 by default), but one of my unit tests suddenly fails. I managed to make it work again by explicitly going back to H2 1.4.191 with Spring Boot 1.3.8. If I use H2 1.4.192 with Spring Boot 1.3.5, then the test also failed. So something must have changed in 1.4.192 which makes it fail. I am using Spring Data and the unit test uses: jdbcTemplate.queryForObject("SELECT image_id FROM game", Object.class) This returns a non-null value using 1.4.191 and a null value using 1.4.192. I know this is very little info to go by, but maybe it rings a bell with somebody? regards, Wim -- 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+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
Re: [h2] Java 6 compatibility
Sorry about that, the documentation is out of date. We've need Java7 since version 1.4.192 -- 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+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] Java 6 compatibility
The H2 website states: To run this database, a Java Runtime Environment (JRE) version 1.6 or higher is required. http://www.h2database.com/html/build.html However, after upgrading from release 1.4.191 to 1.4.192 in our web application (using Maven), our application on longer starts up. The root error is the following: Caused by: java.lang.UnsupportedClassVersionError: org/h2/Driver : Unsupported major.minor version 51.0 (unable to load class org.h2.Driver) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2905) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556) at org.springframework.util.ClassUtils.forName(ClassUtils.java:265) at org.springframework.jdbc.datasource.embedded.H2EmbeddedDatabaseConfigurer.getInstance(H2EmbeddedDatabaseConfigurer.java:45) at org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseConfigurerFactory.getConfigurer(EmbeddedDatabaseConfigurerFactory.java:38) at org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactory.setDatabaseType(EmbeddedDatabaseFactory.java:106) at org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder.setType(EmbeddedDatabaseBuilder.java:85) -- 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+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.