[Apiman-user] Strange exception trying to initialize apiman database with Postgres
Paul Blair
pblair at clearme.com
Tue Dec 8 20:53:05 EST 2015
I'm getting a weird data type exception when issuing a request to the API manager running against a Postgres instance:
I'm using apiman 1.1.9 with the DDL for Postgres found here: https://raw.githubusercontent.com/apiman/apiman/apiman-1.1.9.Final/distro/wildfly8/src/main/resources/overlay/apiman/ddls/apiman_postgresql9.ddl
The DDL does make that into a text column; I'm not sure why Hibernate doesn't like it and instead wants a VARCHAR that is too big for Postgres. This is on PostgreSQL 9.4.4; my driver configuration in the standalone-apiman.xml uses postgresql-9.3-1102-jdbc41.jar and doesn't have any particular validation configuration.
Relevant stack:
UT005023: Exception handling request to /apiman/currentuser/info: org.jboss.resteasy.spi.UnhandledException: org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void io.apiman.manager.api.jpa.EntityManagerFactoryAccessor.postConstruct() on io.apiman.manager.api.jpa.EntityManagerFactoryAccessor at 325203f1
...
Caused by: javax.persistence.PersistenceException: Unable to build entity manager factory
...
Caused by: org.hibernate.HibernateException: Wrong column type in public.auditlog for column data. Found: text, expected
: varchar(2147483647)
at org.hibernate.mapping.Table.validateColumns(Table.java:372) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1338) [hibernate-core-4.3.7.Final.jar:4.3.7
.Final]
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20151209/01183ef6/attachment-0001.html
More information about the Apiman-user
mailing list