- This topic has 3 replies, 2 voices, and was last updated 14 years, 4 months ago by Ram.
-
AuthorPosts
-
ricardofressaMemberI’m trying to generate the classes from my table in my mysql database for the Hibernation but when will generate the error is appearing (During An internal error occurred: “Generating Artifacts”.)
I’m using the lib mysql-connector-java-5.1.13-bin
And the MySQL version 8.5-20100319org.hibernate.tool.hbm2x.ExporterException: MethodInvocationException while processing template Pojo. Invocation of method 'get' in class com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates threw exception class org.hibernate.tool.hbm2x.ExporterException : MethodInvocationException while processing template pojo/PojoPropertyAccessors.vm. Invocation of method 'get' in class com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates threw exception class org.hibernate.tool.hbm2x.ExporterException : MethodInvocationException while processing template pojo/Ejb3PropertyGetAnnotation.vm. Invocation of method 'generateAnnIdGenerator' in class com.genuitec.eclipse.hibernate.wizards.MEEntityPOJOClass threw exception class java.lang.NullPointerException : null at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:153) at com.genuitec.eclipse.hibernate.tool.hbm2x.VelocityProducer.firstPass(VelocityProducer.java:82) at com.genuitec.eclipse.hibernate.tool.hbm2x.VelocityProducer.produce(VelocityProducer.java:31) at com.genuitec.eclipse.hibernate.tool.hbm2x.VelocityProducer.produce(VelocityProducer.java:120) at com.genuitec.eclipse.hibernate.tool.hbm2x.VGenericExporter.exportPOJO(VGenericExporter.java:84) at com.genuitec.eclipse.hibernate.wizards.MEPOJOExporter.exportPOJO(MEPOJOExporter.java:107) at com.genuitec.eclipse.hibernate.tool.hbm2x.VGenericExporter.exportPersistentClass(VGenericExporter.java:73) at com.genuitec.eclipse.hibernate.wizards.MEPOJOExporter.exportClasses(MEPOJOExporter.java:166) at com.genuitec.eclipse.hibernate.wizards.MEPOJOExporter.doStart(MEPOJOExporter.java:140) at com.genuitec.eclipse.hibernate.tool.hbm2x.VAbstractExporter.start(VAbstractExporter.java:97) at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:484) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95) at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:419) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.hibernate.tool.hbm2x.ExporterException: MethodInvocationException while processing template pojo/PojoPropertyAccessors.vm. Invocation of method 'get' in class com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates threw exception class org.hibernate.tool.hbm2x.ExporterException : MethodInvocationException while processing template pojo/Ejb3PropertyGetAnnotation.vm. Invocation of method 'generateAnnIdGenerator' in class com.genuitec.eclipse.hibernate.wizards.MEEntityPOJOClass threw exception class java.lang.NullPointerException : null at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:153) at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates.get(VTemplateHelper.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.velocity.runtime.parser.node.GetExecutor.execute(GetExecutor.java:65) at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:302) at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:157) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.Template.merge(Template.java:256) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:450) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:419) at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:141) ... 14 more Caused by: org.hibernate.tool.hbm2x.ExporterException: MethodInvocationException while processing template pojo/Ejb3PropertyGetAnnotation.vm. Invocation of method 'generateAnnIdGenerator' in class com.genuitec.eclipse.hibernate.wizards.MEEntityPOJOClass threw exception class java.lang.NullPointerException : null at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:153) at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper$Templates.get(VTemplateHelper.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.velocity.runtime.parser.node.GetExecutor.execute(GetExecutor.java:65) at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:302) at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:157) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:166) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.Template.merge(Template.java:256) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:450) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:419) at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:141) ... 31 more Caused by: java.lang.NullPointerException at org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateAnnIdGenerator(EntityPOJOClass.java:252) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:267) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:197) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.Template.merge(Template.java:256) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:450) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:419) at com.genuitec.eclipse.hibernate.tool.hbm2x.VTemplateHelper.processTemplate(VTemplateHelper.java:141) ... 51 more
RamMemberricardofressa,
Can you create a sample project and send it across so that I can try reproducing this issue at my end as well.
Can you copy and paste your installation details. You can get them from – MyEclipse > Installation Summary > Installation Details
Can you mention the Hibernate,mysql versions
You can send a mail to support@genuitec.com. Please add ATTN: RAM in the subject and refer to this thread.
ricardofressaMemberMySQL 5.1.43
*** Date: Terça-feira, 29 de Junho de 2010 07h32min01s BRT ** System properties: OS=WindowsXP OS version=5.1.0 Java version=1.6.0_13 *** MyEclipse details: MyEclipse Enterprise Workbench Version: 8.5 Build id: 8.5-20100319 *** Eclipse details: MyEclipse Enterprise Workbench Version: 8.5 Build id: 8.5-20100319 Eclipse startup command=-os win32 -ws win32 -arch x86 -showsplash -launcher C:\Arquivos de programas\Genuitec\MyEclipse 8.5\myeclipse.exe -name Myeclipse --launcher.library C:\Arquivos de programas\Genuitec\MyEclipse 8.5\../Common/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll -startup C:\Arquivos de programas\Genuitec\MyEclipse 8.5\../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -install C:/Arquivos de programas/Genuitec/MyEclipse 8.5 -configuration configuration -vm C:/Arquivos de programas/Genuitec/Common/binary/com.sun.java.jdk.win32.x86_1.6.0.013/jre/bin/client/jvm.dll
RamMemberricardofressa,
Thank you for bringing this to our notice. I could replicate this at my end. I have filed a PR for the dev team.
We get this error when we use “Sequence” option for Id Generator field in the 2nd page of Reverse Engineer Wizard.
As a workaround, use default generator on 2nd page and choose “sequence” as genertor for table on 3rd page. -
AuthorPosts