4 Replies Latest reply on May 6, 2009 8:09 AM by maxandersen

    Problem with Ejb3PropertyGetAnnotation.ftl

    pouncilt

      Hello,

      I have an error while trying to run the hibernate tools plugin 3.2.4GA-R200903141626-H5 for eclipse when I run the <hbm2java> tag in my hibernatetools ant script. I believe the plugin I have does not have the method defined for the Cfg2HbmTool class. However when I check out the source code for the project from subversion; which is located under tags/TOOLS_3_2_4_GA, the isOneToOne() method is defined for the Cfg2HbmTool class.

      Since I have the source of the Hibernate Tools, I would like to rebuild the code from the source. Is there any instruction on how to do this?

      Is there a way to plugin in a new version of the Cfg2HbmTool class during the reverse engineering process?

      How do I ensure that the version 3.2.4GA-R200903141626-H5 I have has the correct class with the correct methods?

      I've commented out the lines associated with the call to the c2h.isOneToOne call and all works find, However I am not sure it the generated class is correct.

      See error msg below.

      Any help is appreciated!

      Thanks!

      Tonté

      [hibernatetool] An exception occurred while running exporter #2:generic exporterclass: org.hibernate.tool.hbm2x.MyPOJOExportertemplate: Pojo.ftl
      [hibernatetool] To get the full stack trace run ant with -verbose
      [hibernatetool] org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: com.aviall.edi.jedi.persistence.core.models.generated.Person with template Pojo.ftl
      [hibernatetool] freemarker.core.InvalidReferenceException: Expression c2h.isOneToOne is undefined on line 11, column 14 in freemarker-templates/pojo/Ejb3PropertyGetAnnotation.ftl.


        • 1. Re: Problem with Ejb3PropertyGetAnnotation.ftl
          maxandersen

          hmm - that doesn't sound right.

          If our GA didn't have isOneToOne our templates would fail too..

          About build instructions then yes, I got a page for that on hibernate.org which unfortunately is down at the moment - when it comes up go to tools.hibernate.org and there is a "How to build" link.

          • 2. Re: Problem with Ejb3PropertyGetAnnotation.ftl
            pouncilt

            Yeah I know this is very strange. I even tried a clean installation of ecplispe ganymede and HTools 3.2.4.GA-N200904281128-H124 which I down loaded from the JBoss Tools update site for eclpse?

            Yeah I know the hibernate.org has been down for about a week or two now and its been point back to jboss.org. Can't want until it is back up so I can do a fresh build. And hopefully it will resolve this issue. Ultimately, I really don't want to have to do a fresh build. I just wish this would work.

            Do you have any idea to resolve or troubleshot this?

            Again thanks!

            • 3. Re: Problem with Ejb3PropertyGetAnnotation.ftl
              pouncilt

              I figured out what I was doing rrong. I had more than one HTools jar file in my classpath.

              Thanks for all the support!

              • 4. Re: Problem with Ejb3PropertyGetAnnotation.ftl
                maxandersen

                ah - that explains it ;) thanks for letting me know since I were getting crosseyed trying to reproduce it.