13 Replies Latest reply on Aug 9, 2007 5:45 AM by pmuir

    Problem with Hibernate Reverse Engineering tool..

    ilango_hex

      HI,

      I have downloaded latest JBoss IDE 1.5 with hibernate tools.
      I am getting the following exception while executing hibernate.reveng.xml using hibernate console.
      org.hibernate.console.HibernateConsoleRuntimeException: Could not create or find with one argument delegate constructor
      java.lang.ClassNotFoundException:
      java.lang.ClassNotFoundException:

      I am able to see all the tables in the schema by using hibernate reverse engineering editor. I am using my Sql as database.
      Hope I have followed all the instructions listed in the tutorial.

      Please guide me.

      Regards,

      Elango A

        • 1. Re: Problem with Hibernate Reverse Engineering tool..
          maxandersen

          Reported and answered else where too.

          it is a known issue that you workaround by entering org.hibernate.cfg.DelegatingReverseEngineeringStrategy in the reveng field.

          we will fix this soon.

          • 2. Re: Problem with Hibernate Reverse Engineering tool..
            u268

             

            "max.andersen@jboss.com" wrote:
            Reported and answered else where too.

            it is a known issue that you workaround by entering org.hibernate.cfg.DelegatingReverseEngineeringStrategy in the reveng field.

            we will fix this soon.


            It's not working :((((

            • 3. Re: Problem with Hibernate Reverse Engineering tool..

              The same problem I had encountered but I managed to solved it. Try adding classpath variable for your hibernate tools (e.g. <eclipse path>/plugins/org.hibernate.eclipse_3.1.0.beta3) because org.hibernate.cfg.DelegatingReverseEngineeringStrategy can be found on the jar file hibernate-tools.jar and your ide cant found it that's why you're receiving java.lang.ClassNotFoundException.

              I hope that solves the problem ;)

              • 4. Re: Problem with Hibernate Reverse Engineering tool..
                maxandersen

                new release just came out - use that instead ;)

                • 5. Re: Problem with Hibernate Reverse Engineering tool..
                  hoist2k

                   

                  "u268" wrote:
                  "max.andersen@jboss.com" wrote:
                  Reported and answered else where too.

                  it is a known issue that you workaround by entering org.hibernate.cfg.DelegatingReverseEngineeringStrategy in the reveng field.

                  we will fix this soon.


                  It's not working :((((

                  Try using org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy instead.
                  Also, make sure you have the jars in your Console Configuration classpath, as the other post mentioned.

                  • 6. Re: Problem with Hibernate Reverse Engineering tool..
                    gokcem19981

                    I have tried both with beta3 and beta4 it is not working. I have added to the classpath; but when I tried to select the reveng startegy it does not come to list automatically. When I directly type it stilll cannot find the class.

                    • 7. Re: Problem with Hibernate Reverse Engineering tool..
                      maxandersen

                      using beta4 there should not be a problem.

                      Please make´sure you are using beta4 and create a new launch configuration and see if that does not help.

                      • 8. Re: Problem with Hibernate Reverse Engineering tool..
                        gokcem19981

                        I added the hibernate jar to Eclipse -> window ->preferences ->Java -> Build path - class path variables.
                        I have left the reveng.strategy field empty. Now I have no errors but I also don't have any code generated.


                        I didn't add the jar to the console conf claddpath. It was written there but when I read the post from "hoist2k" I thougth I should add them there.

                        Try using org.hibernate.cfg. reveng .DelegatingReverseEngineeringStrategy instead.
                        Also, make sure you have the jars in your Console Configuration classpath, as the other post mentioned.



                        eclipse version : 3.1.2
                        hibernate tools version : 3.1.0.beta4


                        • 9. Re: Problem with Hibernate Reverse Engineering tool..
                          maxandersen

                          ...and what is the error ?

                          And did you remove all the hibernate related jars from the console classpath ?

                          And did you try and create a new code generation launcher ?

                          ...and are you sure you are using beta4?

                          • 10. Re: Problem with Hibernate Reverse Engineering tool..
                            gokcem19981

                            Thank you, thank you, THANK YOU.

                            The last problem was that there was no code generated. But it was my fault. I have repeated the same thing so many times that I forgot some step.

                            The code is generated thank you and have a nice day....

                            Gökcem

                            • 11. Re: Problem with Hibernate Reverse Engineering tool..
                              priyaandjp

                              Here's the correct reveng strategy class name

                              org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy

                              • 12. Re: Problem with Hibernate Reverse Engineering tool..
                                ampm

                                I am getting the following error while using the reverse engineering tool.. I am using the latest hibernate-tools (beta9).




                                java.lang.NullPointerException
                                at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.getLocation(CodeGenerationLaunchDelegate.java:286)
                                at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:285)
                                at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$1.execute(CodeGenerationLaunchDelegate.java:232)
                                at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
                                at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89)
                                at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:228)
                                at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:130)
                                at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:766)
                                at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608)
                                at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:899)
                                at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:1102)
                                at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

                                • 13. Re: Problem with Hibernate Reverse Engineering tool..
                                  pmuir

                                  This isn't the hibernate tools forum.