Hi guys!
I use the following target to generate models:
<target name="hbm2xml" description="Genera ficheros de mapeo: .hbmxml">
<hibernatetool destdir="temp" templatepath="src/template">
<jdbcconfiguration
configurationfile="temp/hibernate.cfg.xml"
packagename="com.iritec.generador.model"
revengfile="temp/hibernate.reveng.xml"
detectmanytomany="false"
detectoptimisticlock="false"
/>
<hbm2hbmxml destdir="temp"/>
</hibernatetool>
</target>
(the black line is the error line: c:\proyecto\generador\temp\model.xml:40)
and...
Hibernate version: Hibernate Tools 3.2.0.b9
Name and version of the database you are using: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
But I get an error and I'm a bit lost with it... this is my stack trace:
INFO 190508 101340 BaseDispatchAction accion /generador.iniciar
INFO 190508 101340 BaseDispatchAction forward /seleccion-drivers.jsp
INFO 190508 101341 BaseDispatchAction
INFO 190508 101341 BaseDispatchAction accion /generador.aceptarSeleccionDrivers
INFO 190508 101342 GeneradorAction Ya se ha consultado la base de datos
INFO 190508 101342 BaseDispatchAction forward /seleccion-tablas.jsp
INFO 190508 101346 BaseDispatchAction
INFO 190508 101346 BaseDispatchAction accion /generador.almacenarDatos
INFO 190508 101346 GeneradorAction Tabla seleccionada 0: CAT_CATEGORIAS
INFO 190508 101346 TablasBL select * from CAT_CATEGORIAS
INFO 190508 101346 TablasBL catalogo: null
INFO 190508 101346 TablasBL Primary Key Column: ID
INFO 190508 101346 BaseDispatchAction forward /seleccion-parametros.jsp
INFO 190508 101350 BaseDispatchAction
INFO 190508 101350 BaseDispatchAction accion /generador.configuraPlantillas
INFO 190508 101350 JDBCMetaDataConfiguration Ignoring sessionfactory mapping
INFO 190508 101350 OverrideRepository Override file: c:\proyecto\generador\temp\hibernate.reveng.xml
INFO 190508 101351 ManagerConnectionProvider Using Hibernate built-in connection pool (not for production use!)
INFO 190508 101351 ManagerConnectionProvider Hibernate connection pool size: 20
INFO 190508 101351 ManagerConnectionProvider autocommit mode: false
INFO 190508 101351 ManagerConnectionProvider using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@des09:1521:orcl
INFO 190508 101351 ManagerConnectionProvider connection properties: {user=xxx, password=xxx}
INFO 190508 101351 SettingsFactory RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
INFO 190508 101351 SettingsFactory JDBC driver: Oracle JDBC driver, version: 10.2.0.1.0
INFO 190508 101351 Dialect Using dialect: org.hibernate.dialect.OracleDialect
INFO 190508 101351 TransactionFactoryFactory Using default transaction strategy (direct JDBC transactions)
INFO 190508 101351 ctionManagerLookupFactory No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
INFO 190508 101351 SettingsFactory Automatic flush during beforeCompletion(): disabled
INFO 190508 101351 SettingsFactory Automatic session close at end of transaction: disabled
INFO 190508 101351 SettingsFactory JDBC batch size: 15
INFO 190508 101351 SettingsFactory JDBC batch updates for versioned data: disabled
INFO 190508 101351 SettingsFactory Scrollable result sets: enabled
INFO 190508 101351 SettingsFactory JDBC3 getGeneratedKeys(): enabled
INFO 190508 101351 SettingsFactory Connection release mode: auto
INFO 190508 101351 SettingsFactory Default batch fetch size: 1
INFO 190508 101351 SettingsFactory Generate SQL with comments: disabled
INFO 190508 101351 SettingsFactory Order SQL updates by primary key: disabled
INFO 190508 101351 SettingsFactory Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
INFO 190508 101351 ASTQueryTranslatorFactory Using ASTQueryTranslatorFactory
INFO 190508 101351 SettingsFactory Query language substitutions: {}
INFO 190508 101351 SettingsFactory Second-level cache: enabled
INFO 190508 101351 SettingsFactory Query cache: disabled
INFO 190508 101351 SettingsFactory Cache provider: org.hibernate.cache.EhCacheProvider
INFO 190508 101351 SettingsFactory Optimize cache for minimal puts: disabled
INFO 190508 101351 SettingsFactory Structured second-level cache entries: disabled
INFO 190508 101351 SettingsFactory Statistics: disabled
INFO 190508 101351 SettingsFactory Deleted entity synthetic identifier rollback: disabled
INFO 190508 101351 SettingsFactory Default entity-mode: pojo
INFO 190508 101352 ManagerConnectionProvider cleaning up connection pool: jdbc:oracle:thin:@des09:1521:orcl
ERROR 190508 101352 BaseDispatchAction c:\proyecto\generador\temp\model.xml:40: java.lang.IllegalAccessError: tried to access field org.hibernate.cfg.CollectionSecondPass.collection from class org.hibernate.cfg.JDBCBinder$JDBCCollectionSecondPass
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at com.iritec.generador.bl.HibernateBL.generar(HibernateBL.java:402)
at com.iritec.generador.bl.HibernateBL.configuracionHibernate(HibernateBL.java:62)
at com.iritec.generador.bl.HibernateBL$$FastClassByCGLIB$$d0b20932.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:693)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
at com.iritec.generador.bl.HibernateBL$$EnhancerByCGLIB$$7e543470.configuracionHibernate(<generated>)
at com.iritec.generador.controller.action.GeneradorAction.configuraPlantillas(GeneradorAction.java:356)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
at com.iritec.generador.controller.action.BaseDispatchAction.execute(BaseDispatchAction.java:45)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalAccessError: tried to access field org.hibernate.cfg.CollectionSecondPass.collection from class org.hibernate.cfg.JDBCBinder$JDBCCollectionSecondPass
at org.hibernate.cfg.JDBCBinder$JDBCCollectionSecondPass.secondPass(JDBCBinder.java:923)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:35)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1012)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:997)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:56)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:299)
at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:315)
at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:183)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
... 44 more
--- Nested Exception ---
java.lang.IllegalAccessError: tried to access field org.hibernate.cfg.CollectionSecondPass.collection from class org.hibernate.cfg.JDBCBinder$JDBCCollectionSecondPass
at org.hibernate.cfg.JDBCBinder$JDBCCollectionSecondPass.secondPass(JDBCBinder.java:923)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:35)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1012)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:997)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:56)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:299)
at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:315)
at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:183)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at com.iritec.generador.bl.HibernateBL.generar(HibernateBL.java:402)
at com.iritec.generador.bl.HibernateBL.configuracionHibernate(HibernateBL.java:62)
at com.iritec.generador.bl.HibernateBL$$FastClassByCGLIB$$d0b20932.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:693)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
at com.iritec.generador.bl.HibernateBL$$EnhancerByCGLIB$$7e543470.configuracionHibernate(<generated>)
at com.iritec.generador.controller.action.GeneradorAction.configuraPlantillas(GeneradorAction.java:356)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
at com.iritec.generador.controller.action.BaseDispatchAction.execute(BaseDispatchAction.java:45)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
INFO 190508 101352 BaseDispatchAction forward /error.jsp
Could you help me? All suggestions are welcome!
|