I am trying to deploy an application written a while back for JBoss AS 7 - and now trying to bring up a Wildfly 20 server and deploy it there. I was getting an error about duplicate generator names, and I found that the new requirement was that they were global, not local to the entity. So I went through and changed all the generator references to be unique. However, I still get the exact same error messages as before.
This is the stack trace I get.
ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool – 95) MSC000001: Failed to start service jboss.persistenceunit.“psa-ejb3.ear/psa-server-jboss-ejb3.jar#psaCreditReport”: org.jboss.msc.service.StartException in service jboss.persistenceunit.“psa-ejb3.ear/psa-server-jboss-ejb3.jar#psaCreditReport”: java.lang.IllegalArgumentException: Duplicate generator name idGen you will likely want to set the property hibernate.jpa.compliance.global_id_generators to false
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:198)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:128)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:658)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:212)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.IllegalArgumentException: Duplicate generator name idGen you will likely want to set the property hibernate.jpa.compliance.global_id_generators to false
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.addIdentifierGenerator(InFlightMetadataCollectorImpl.java:498)
at org.hibernate.cfg.AnnotationBinder.buildGenerators(AnnotationBinder.java:3436)
at org.hibernate.cfg.AnnotationBinder.processId(AnnotationBinder.java:2393)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:2287)
at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:969)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:796)
at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:250)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:231)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:274)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1215)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1246)
at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:170)
… 9 more
The generator name ‘idGen’ is the one I’ve replaced. I’ve tried deleting temp files, the deployment files, recompiling from the beginning. Nothing seems to get rid of this error. I’ve tried searching in my IDE for that name and using grep in all directories and that name isn’t referenced anymore in the code. So I’m stuck as to where to look next.
It is also giving me that same error on a persistence unit that has no generator values in it at all.
Thanks for any help or direction.
Lance