1 2 Previous Next 24 Replies Latest reply on Aug 6, 2006 12:27 PM by pmuir Go to original post
      • 15. Re: Tools & Documentation
        maxandersen

        why is it that users think that because there is a checkbox you *have* to flick it ?

        If you don't flick the reverse engineering box then (surprisingly) no reverse engineering will be done and we will just dump whatever mappings you have in the hibernate.cfg.xml (and yes, using

        <mapping class="..."/>
        is possible for ejb3 classes).


        sorry for sounding so cranky but i'm just really surprised that people don't get that a checkbox means enable or disable/yes or no/do it or don't do it....any input on how that can be made more clear is very welcome!

        • 16. Re: Tools & Documentation

          Well may be I was not clear.

          I wasn't talking about the reverse engineering check box ( I understood that I don't need reverse engineering from the DB but actually from the EJB themself).

          I don't actually use hibernate (well directly at leat) but ejb3. I don't see why I should have a mapping file (or even a hibernate.cfg.xml with a mapping entry) to generate the jboss seam web application?

          I should just be able to specify the entity beans that I want to be part of the generated jboss seam web app. Or. is this feature exclusive for hibernate users?

          • 17. Re: Tools & Documentation
            maxandersen

            for now you need to list the EJB's you want the tool to use for generation in a hibernate.cfg.xml.

            That will work with anything that is ejb3 compliant (and supported by hibernate annotations)

            Not a big price to pay is it ?

            (we are working on making the tool autodetect these beans, but right now you need to tell the name of the beans explicitly to the tool - but it is definitly not tied to hibernate (besides that the tool uses hibernate behind the scenes to read the pojo's and is called hibernate tools)

            • 18. Re: Tools & Documentation

              Sorry to disturb you again, but I still cannot make it work:

              I have the following hibernate.cfg.xml file:

              
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE hibernate-configuration PUBLIC
               "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
               "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
              <hibernate-configuration>
               <session-factory>
               <mapping package="mypackage.ejb.entity"/>
               </session-factory>
              </hibernate-configuration>
              


              And when trying the generate the jboss seam file I have the following error:

              org.hibernate.MappingException: An AnnotationConfiguration instance is required to use

              In the admin console, I tried with adding the ejb-persistence.jar and hibernate-annotation.jar in classpath.
              Both this files are also in my classpath.

              Btw, Is there a way to delete/update hibernate console configuration?

              Thanks for you patience,

              Nicolas



              • 19. Re: Tools & Documentation
                maxandersen

                Have you chekked the "use ejb3/annotations" checkbox in the console configuration ?

                (btw. would actually be nice if we autodetected this need depending on the contents of the hibernate.cfg.xml ...please put that in jira if you want it)

                ...and you should *not* add any hibernate related jars to the console configuration.

                Delete a config : select a config and press Delete
                Edit a config : select a config and dblclick or rightclick and select "Edit"


                • 20. Re: Tools & Documentation

                  Hi,

                  Yes the "use ejb3/annotations" was checked in the console configuration.

                  I also tried without any hibernate related jars to the console and I have the same results. I tested on jboss ide 1.5 and on the nighty build.

                  About the management of the console configuration:

                  I can create a console configuration using the wizard, but after that where do I select the console configuration in order to edit/delete it? I am sorry if the question looks rather stupid to you, but I am obviously missing something:

                  I can select/edit/delete the "hibernate code generation" configuration, but I cannot find where to do it for the console configuration.

                  Thanks for your help and you time,

                  • 21. Re: Tools & Documentation
                    lcoetzee

                    This thread might help you:

                    http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76430

                    In the end I also had to add mapping stuff manually to my generated hibernate.cfg.xml ...

                    stuff like:

                    <mapping class="csir.user.par.PortalRole"/>
                     <mapping class="csir.user.par.PortalUser"/>
                     <mapping class="csir.user.par.I18nApplicableDisability"/>
                     <mapping class="csir.user.par.ApplicableDisability"/>
                     <mapping class="csir.helloworld.par.HelloWorldEntity"/>
                     <mapping class="csir.structure.par.I18nGroupingName"/>
                     <mapping class="csir.structure.par.I18nTopicName"/>
                     <mapping class="csir.structure.par.Service"/>
                     <mapping class="csir.structure.par.I18nServiceName"/>
                     <mapping class="csir.structure.par.Grouping"/>
                     <mapping class="csir.structure.par.Topic"/>
                     <mapping class="csir.content.par.Content"/>
                     <mapping class="csir.content.par.I18nAudio"/>
                     <mapping class="csir.content.par.ContentElement"/>
                     <mapping class="csir.content.par.ApplicableLocation"/>
                     <mapping class="csir.content.par.ContactInfo"/>
                     <mapping class="csir.content.par.InterestGroup"/>
                     <mapping class="csir.content.par.I18nContentName"/>
                     <mapping class="csir.content.par.MetaContentInfo"/>
                     <mapping class="csir.content.par.I18nContentDescription"/>
                     <mapping class="csir.content.par.I18nDocument"/>
                     <mapping class="csir.content.par.I18nImage"/>
                     <mapping class="csir.content.par.I18nURL"/>
                     <mapping class="csir.content.par.I18nText"/>
                     <mapping class="csir.content.par.I18nVideo"/>
                     <mapping class="csir.content.par.I18nApplicableLocation"/>
                     <mapping class="csir.content.par.I18nInterestGroup"/>
                     <mapping class="csir.content.par.ContentElementContainer"/>
                     <mapping class="csir.content.par.I18nContentElementName"/>
                    


                    Regards

                    Louis


                    • 22. Re: Tools & Documentation
                      maxandersen

                      the console configurations is in the hibernate console perspective

                      • 23. Re: Tools & Documentation

                        Did you ever find out how to get the pageflow editor in Eclipse? It would be handy to have.

                        Thanks

                        • 24. Re: Tools & Documentation
                          pmuir

                          It 'just works' for me (using both the Eclipse 3.2 stuff and JBossIDE 1.6) - my files are .jpdl.xml, also I think there is an item in the 'new' list.

                          1 2 Previous Next