Good evening
After changing an entity that inherits a @MappedSuperclass my code started giving error. When trying to clean and build it the following warning appears:
Note: Hibernate JPA 2 Static-Metamodel Generator 5.1.12.Final
warning: The following options were not recognized by any processor: '[eclipselink.canonicalmodel.use_static_factory]'
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
The error that occurs during the execution of the program in the first query to the database is this:
run:
out 09, 2018 7:19:50 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
INFO: HHH000204: Processing PersistenceUnitInfo [
name: SimuladorDeInvestimentos-PU
...]
out 09, 2018 7:19:50 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.1.12.Final}
out 09, 2018 7:19:50 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000205: Loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.h2.Driver, hibernate.service.allow_crawling=false, hibernate.max_fetch_depth=5, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.format_sql=true, hibernate.generate_statistics=true, hibernate.connection.username=sa, hibernate.connection.url=jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=10000, hibernate.bytecode.use_reflection_optimizer=false, hibernate.connection.password=****, hibernate.connection.pool_size=5}
out 09, 2018 7:19:50 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
out 09, 2018 7:19:50 PM org.hibernate.spatial.integration.SpatialService <init>
INFO: HHH80000001: hibernate-spatial integration enabled : true
out 09, 2018 7:19:50 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
out 09, 2018 7:19:51 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
out 09, 2018 7:19:51 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/simulador_de_investimentos_03?useSSL=false]
out 09, 2018 7:19:51 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {user=root, password=****}
out 09, 2018 7:19:51 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
out 09, 2018 7:19:51 PM org.hibernate.engine.jdbc.connections.internal.PooledConnections <init>
INFO: HHH000115: Hibernate connection pool size: 5 (min=1)
out 09, 2018 7:19:52 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
out 09, 2018 7:19:52 PM org.hibernate.envers.boot.internal.EnversServiceImpl configure
INFO: Envers integration enabled? : true
out 09, 2018 7:19:53 PM org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection
INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@4eea3252] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.hibernate.jpa.internal.metamodel.MetadataContext.populateStaticMetamodel(MetadataContext.java:359)
at org.hibernate.jpa.internal.metamodel.MetadataContext.wrapUp(MetadataContext.java:220)
at org.hibernate.jpa.internal.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:82)
at org.hibernate.jpa.internal.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:118)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:889)
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39)
at br.com.flaviobarros.util.banco.ControleBanco.criaEntityManagerFactory(ControleBanco.java:35)
at br.com.flaviobarros.util.banco.ControleBanco.getEntityManager(ControleBanco.java:43)
at br.com.flaviobarros.analisedeinvestimentos.investimentos.controller.GerenciaArmazenamentoInvestimentos.getRegistrosDeTipoDeInvestimentoEspecifico(GerenciaArmazenamentoInvestimentos.java:228)
at br.com.flaviobarros.analisedeinvestimentos.investimentos.controller.GerenciaArmazenamentoInvestimentos.getRegistrosDeTodosOsInvestimentos(GerenciaArmazenamentoInvestimentos.java:213)
at br.com.flaviobarros.analisedeinvestimentos.investimentos.view.InvestimentosView.pesquisa(InvestimentosView.java:113)
at br.com.flaviobarros.analisedeinvestimentos.investimentos.view.InvestimentosView.inicializaComponentes(InvestimentosView.java:74)
at br.com.flaviobarros.analisedeinvestimentos.investimentos.view.InvestimentosView.<init>(InvestimentosView.java:66)
at br.com.flaviobarros.analisedeinvestimentos.telaprincipal.TelaPrincipal.jbInvestimentosActionPerformed(TelaPrincipal.java:162)
at br.com.flaviobarros.analisedeinvestimentos.telaprincipal.TelaPrincipal.access$000(TelaPrincipal.java:20)
at br.com.flaviobarros.analisedeinvestimentos.telaprincipal.TelaPrincipal$1.actionPerformed(TelaPrincipal.java:85)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.RuntimeException: Uncompilable source code - cannot find symbol
symbol: class InvestimentosComunsSemelhantes_
location: package br.com.flaviobarros.analisedeinvestimentos.investimentos.model
at br.com.flaviobarros.analisedeinvestimentos.investimentos.model.InvestimentoLCA_.<clinit>(InvestimentoLCA_.java:8)
... 56 more
out 09, 2018 7:19:53 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
INFO: HHH000204: Processing PersistenceUnitInfo [
name: SimuladorDeInvestimentos-PU
...]
out 09, 2018 7:19:53 PM org.hibernate.spatial.integration.SpatialService <init>
INFO: HHH80000001: hibernate-spatial integration enabled : true
out 09, 2018 7:19:53 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
out 09, 2018 7:19:53 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/simulador_de_investimentos_03?useSSL=false]
out 09, 2018 7:19:53 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {user=root, password=****}
out 09, 2018 7:19:53 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
out 09, 2018 7:19:53 PM org.hibernate.engine.jdbc.connections.internal.PooledConnections <init>
INFO: HHH000115: Hibernate connection pool size: 5 (min=1)
out 09, 2018 7:19:53 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
out 09, 2018 7:19:53 PM org.hibernate.envers.boot.internal.EnversServiceImpl configure
INFO: Envers integration enabled? : true
out 09, 2018 7:19:53 PM org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection
INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@588733b0] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class br.com.flaviobarros.analisedeinvestimentos.investimentos.model.InvestimentoLCA_
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.hibernate.jpa.internal.metamodel.MetadataContext.populateStaticMetamodel(MetadataContext.java:359)
at org.hibernate.jpa.internal.metamodel.MetadataContext.wrapUp(MetadataContext.java:220)
at org.hibernate.jpa.internal.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:82)
at org.hibernate.jpa.internal.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:118)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:889)
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39)
at br.com.flaviobarros.util.banco.ControleBanco.criaEntityManagerFactory(ControleBanco.java:35)
at br.com.flaviobarros.util.banco.ControleBanco.getEntityManager(ControleBanco.java:43)
at br.com.flaviobarros.analisedeinvestimentos.investimentos.controller.GerenciaArmazenamentoInvestimentos.getRegistrosDeTipoDeInvestimentoEspecifico(GerenciaArmazenamentoInvestimentos.java:228)
at br.com.flaviobarros.analisedeinvestimentos.investimentos.controller.GerenciaArmazenamentoInvestimentos.getRegistrosDeTodosOsInvestimentos(GerenciaArmazenamentoInvestimentos.java:213)
at br.com.flaviobarros.analisedeinvestimentos.investimentos.view.InvestimentosView.pesquisa(InvestimentosView.java:113)
at br.com.flaviobarros.analisedeinvestimentos.investimentos.view.InvestimentosView.inicializaComponentes(InvestimentosView.java:74)
at br.com.flaviobarros.analisedeinvestimentos.investimentos.view.InvestimentosView.<init>(InvestimentosView.java:66)
at br.com.flaviobarros.analisedeinvestimentos.telaprincipal.TelaPrincipal.jbInvestimentosActionPerformed(TelaPrincipal.java:162)
at br.com.flaviobarros.analisedeinvestimentos.telaprincipal.TelaPrincipal.access$000(TelaPrincipal.java:20)
at br.com.flaviobarros.analisedeinvestimentos.telaprincipal.TelaPrincipal$1.actionPerformed(TelaPrincipal.java:85)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
CONSTRUÍDO COM SUCESSO (tempo total: 12 minutos 3 segundos)
Does anyone know / can give me some clarification of the reason for the error and if possible how to solve it?