Hello,
Our IBMi doesn’t like table names wrapped in quotes. Is there a way to remove the quotes from the table name? Example:
Hibernate: select t1_0.codigo,t1_0.descricao,t1_0.englobamento from "i#shared.tiporend" t1_0 where t1_0.codigo=?
This query generates an error on the IBMi side.
Also, if we do not specify the dialect on persistence.xml, the selected dialect is DB2Dialect, which prompts the db version warning.
[org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 118) HHH000511: The 7.4.0 version for [org.hibernate.dialect.DB2Dialect] is no longer supported, hence certain features may not work properly. The minimum supported version is 10.5.0. Check the community dialects project for available legacy versions.
But since we are on IBMi the version is in fact v7r4
However, if we specify manually the DB2iDialect (which does not prompt the db version error), we get the following error:
Caused by: java.lang.NullPointerException: Cannot invoke "String.isEmpty()" because "rowId" is null
at org.hibernate@6.2.13.Final//org.hibernate.dialect.DB2iDialect.rowId(DB2iDialect.java:161)
at org.hibernate@6.2.13.Final//org.hibernate.dialect.Dialect.registerColumnTypes(Dialect.java:444)
at org.hibernate@6.2.13.Final//org.hibernate.dialect.DB2Dialect.registerColumnTypes(DB2Dialect.java:209)
at org.hibernate@6.2.13.Final//org.hibernate.dialect.Dialect.contributeTypes(Dialect.java:1580)
at org.hibernate@6.2.13.Final//org.hibernate.dialect.DB2Dialect.contributeTypes(DB2Dialect.java:900)
at org.hibernate@6.2.13.Final//org.hibernate.dialect.Dialect.contribute(Dialect.java:1569)
at org.hibernate@6.2.13.Final//org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:630)
at org.hibernate@6.2.13.Final//org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:174)
at org.hibernate@6.2.13.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1383)
at org.hibernate@6.2.13.Final//org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1454)
at org.hibernate.jipijapa-hibernate6@30.0.0.Final//org.jboss.as.jpa.hibernate.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:32)
at org.jboss.as.jpa@30.0.0.Final//org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:159)
... 10 more
We are currently testing on Wildfly 30 (Hibernate 6.2.13).
On our Wildfly 15 (Hibernate 5.3.7) installation everything works just fine with the defaults.