- This topic has 1 reply, 2 voices, and was last updated 13 years, 11 months ago by support-swapna.
-
AuthorPosts
-
elihusmailsMemberI am trying to reverse engineer a database. I am using Spring and Hibernate support in my project. I have no problems creating the hibernate session factory with spring. The problem I run in to is when I try and create annotated @Entity classes. I get the following exception.
I just installed MyEclipse 8.6.1 and would like to get this working before I purchase.
org.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:505)
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
support-swapnaModeratorelihusmails,
This is a known issue and the dev team is working on fixing it.
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 generator for table on 3rd page.Hope it helps.
-
AuthorPosts