Hello I'm currently working on a small project using the new JBoss Wildfly 8.0, an embedded H2 Database from Wildfly during development and instead of integer primary keys I use UUIDs. For authentication / authorisation, I'd like to use the DatabaseLoginModule from Wildfly which must be configured with a query to obtain the Roles.
Unfortunately that's where this setup is breaking down. Setup: Two Entities: Hibernate: create table APPLICATION_GROUP (uuid VARCHAR(36) not null, description varchar(255), name varchar(255), primary key (uuid)) Hibernate: create table APPLICATION_USER (uuId VARCHAR(36) not null, password varchar(255), username varchar(255), primary key (uuId)) Hibernate: create table USER_GROUPS (APPLICATION_USER_uuId VARCHAR(36) not null, groups_uuid VARCHAR(36) not null, primary key (APPLICATION_USER_uuId, groups_uuid)) And the query configured in Wildfly looks like: SELECT DISTINCT name FROM APPLICATION_GROUP g INNER JOIN USER_GROUPS ug on g.uuid INNER JOIN APPLICATION_USER u on ug.APPLICATION_USER_uuid = u.uuid WHERE u.username = ? Error: Caused by: org.jboss.arquillian.test.spi.ArquillianProxyException: org.h2.jdbc.JdbcSQLException : Data conversion error converting "a1111"; SQL statement: select distinct name from APPLICATION_GROUP g inner join user_groups ug on g.uuid inner join APPLICATION_USER u on ug.APPLICATION_USER_uuid = u.uuid where u.username = ? [22018-173] ... some more stacktrace Caused by: java.lang.NumberFormatException at java.math.BigDecimal.<init>(BigDecimal.java:470) at java.math.BigDecimal.<init>(BigDecimal.java:739) at org.h2.value.Value.convertTo(Value.java:816) I tried also the same with an arquillian test against an h2 database, the result was just the same. On a sidenote, the same query did fine if the primary keys were configured as integers. The bundled version of H2 in Wildfly is 1.3.173 greetings -- 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.
