1 2 3 4 5 Previous Next 64 Replies Latest reply on Jul 19, 2006 8:37 PM by tushardesai22 Go to original post
      • 30. Re: Seam reverse engineering tool
        zerzio

        I had almost the same problem and your suggestion to use the nightly build worked in a sense: Yes, the seam application was deployed. Great.

        The problem now is that no JSF renders something but errors...

        http://localhost:8080/seamapp/editCity.jsf

        javax.servlet.ServletException: Exception in JSP: /editCity.jsp:10
        
        7: <head>
        8: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        9: <title>
        10: <h:outputText value="#{msg.Create} #{msg.City}" rendered="#{cityEditor.new}"/>
        11: <h:outputText value="#{msg.Update}/#{msg.Delete} #{msg.City}" rendered="#{!cityEditor.new}"/>
        12: </title>
        13: <style type="text/css" media="all">
        
        Stacktrace:
         org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:51)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        


        http://localhost:8080/seamapp/findCity.jsf
        javax.servlet.ServletException: Cannot get value for expression '#{cityFinder.example.cityId}'
         org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:51)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        

        ---
        I feel so close...

        • 31. Re: Seam reverse engineering tool
          mirko27

          Generator did none ManyToMany mappings.
          But the errors came mostly from:
          instance.getUser().getLogentrys().remove(instance);

          but getLogentrys was not found, instead there is getLogentries.

          Hope this helps you improve the generator.

          • 32. Re: Seam reverse engineering tool
            maxandersen

            reverse engineering does not support automatic (nor manual) many-to-many detection.

            if you had mapping files the entitybeans would be correct, but i don't know about the seam generation.

            • 33. Re: Seam reverse engineering tool
              max522over

              It generates code to manage it but it doesn't work, has errors and sometimes just doesn't compile. When I initially found the problem. I backed off my multiple foreign keys fromone table to another and just put one in. Generated the code and then modified the generated code to support the other ones. Since then we've gotten into full development. We go into the generate code and fix the basic logic and compile errors. Limiting the changes to the most basic fixes required. Then we extend the functionality of the finders and editors using wrappers to the generate code. That way our addittions are seperate from the generated code if we need to regenerate for sweeping database changes or the fixes to these problems come in and regenerating has nice improvements.

              • 34. Re: Seam reverse engineering tool
                svoezemtsev

                Today I installed the lates version of Eclipse with JBOSS IDE (JBossIDE-1.5.1.GA-Bundle-win32.zip)
                and tryed to make reverse engineering.
                I use Oracle9 database.

                I did not get any errors but in "Hibernate configuration" view I do not see any table. Why?

                It is my hibernate.cfg.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>
                oracle.jdbc.driver.OracleDriver
                ***
                jdbc:oracle:thin:@192.168.1.12:1521:test
                nik
                nik
                org.hibernate.dialect.Oracle9Dialect
                </session-factory>
                </hibernate-configuration>

                • 35. Re: Seam reverse engineering tool
                  fkaufmes

                  My problem with the Seam tool is just told, I get the error message:

                  ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
                  javax.faces.el.EvaluationException: Cannot get value for expression '#{catererEditor.new}'


                  I have no many-to-many mappings. The database structure is very simple for testing. Is there a possible solution for this problem?

                  • 36. Re: Seam reverse engineering tool
                    comendolixo

                     

                    "svoezemtsev" wrote:
                    Today I installed the lates version of Eclipse with JBOSS IDE (JBossIDE-1.5.1.GA-Bundle-win32.zip)
                    and tryed to make reverse engineering.
                    I use Oracle9 database.

                    I did not get any errors but in "Hibernate configuration" view I do not see any table. Why?

                    It is my hibernate.cfg.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>
                    <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
                    <property name="hibernate.connection.password">***</property>
                    <property name="hibernate.connection.url">jdbc:oracle:thin:@192.168.1.12:1521:test</property>
                    <property name="hibernate.connection.username">nik</property>
                    <property name="hibernate.default_schema">nik</property>
                    <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
                    </session-factory>
                    </hibernate-configuration>


                    having the same problem here..it seems it can't fetch the database children

                    • 37. Re: Seam reverse engineering tool
                      maxandersen

                      the tables just takes a looong time to fetch with oracle ;(

                      Workaround: set default schema in your config and it will only fetch for your schema.

                      note: you don't need the database node for any functionallity besides "browsing", everything else should work just fine.

                      • 38. Re: Seam reverse engineering tool
                        jagoh

                        Just wonder how this statement work in persistence.xml:

                        <entity-manager>
                        <persistence-unit name="entityManager">
                        org.hibernate.ejb.HibernatePersistence
                        <jta-data-source>java:/MySqlDS2</jta-data-source>








                        </persistence-unit>
                        </entity-manager>


                        I didn't see the "java:/MySqlDS2" has bind with any driver or database configuration.


                        • 39. Re: Seam reverse engineering tool

                          I'm trying to use the Seam CRUD tool to get a simple app up against a mysql db... it starts to deploy ok but when it hits the seam stuff here's what happens...

                          08:39:51,743 INFO [Initialization] reading properties from: /seam.properties
                          08:39:51,743 INFO [Initialization] reading properties from: /jndi.properties
                          08:39:51,743 INFO [Initialization] initializing Seam
                          08:39:51,868 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
                          08:39:51,868 ERROR [[/seamapp]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
                          java.lang.IllegalArgumentException: no property for configuration setting: org.jboss.seam.core.init.managedPersistenceContexts
                          at org.jboss.seam.Component.initInitializers(Component.java:311)
                          at org.jboss.seam.Component.(Component.java:209)
                          at org.jboss.seam.Component.(Component.java:159)
                          at org.jboss.seam.Component.(Component.java:154)
                          .....
                          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
                          Caused by: java.beans.IntrospectionException: Method not found: isManagedPersistenceContexts
                          at java.beans.PropertyDescriptor.(PropertyDescriptor.java:89)
                          at java.beans.PropertyDescriptor.(PropertyDescriptor.java:53)
                          at org.jboss.seam.Component.initInitializers(Component.java:307)
                          ... 98 more

                          I took all the defaults, other than of course changing the datasource. I can run the seam examples ok, as I have done the latest upgrade. I'm on the newest release of Jboss IDE and hibernate tools, but I tried switching to various more recent builds but that doesn't fix it.

                          The seam.properties file (which is included in the .ejb3 file) has the following entries:
                          org.jboss.seam.core.init.managedPersistenceContexts entityManager
                          org.jboss.seam.core.init.jndiPattern seamapp/#\{ejbName}/local

                          I've also tried putting these settings in the web.xml file, but to no avail.

                          I've run out of ideas... please help!

                          Thx ahead of time...

                          • 40. Re: Seam reverse engineering tool
                            jason_rency

                             

                            "zerzio" wrote:
                            I had almost the same problem and your suggestion to use the nightly build worked in a sense: Yes, the seam application was deployed. Great.

                            The problem now is that no JSF renders something but errors...

                            http://localhost:8080/seamapp/editCity.jsf
                            javax.servlet.ServletException: Exception in JSP: /editCity.jsp:10
                            
                            7: <head>
                            8: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                            9: <title>
                            10: <h:outputText value="#{msg.Create} #{msg.City}" rendered="#{cityEditor.new}"/>
                            11: <h:outputText value="#{msg.Update}/#{msg.Delete} #{msg.City}" rendered="#{!cityEditor.new}"/>
                            12: </title>
                            13: <style type="text/css" media="all">
                            
                            Stacktrace:
                             org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:51)
                             org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                            


                            http://localhost:8080/seamapp/findCity.jsf
                            javax.servlet.ServletException: Cannot get value for expression '#{cityFinder.example.cityId}'
                             org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:51)
                             org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                            

                            ---
                            I feel so close...



                            hi, try the latest jboss ejb jars for your build path insted of the old one in the ejb3.deploy in the jobss server.
                            regards

                            Jason


                            • 41. Re: Seam reverse engineering tool
                              jason_rency

                               

                              "fkaufmes" wrote:
                              My problem with the Seam tool is just told, I get the error message:

                              ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
                              javax.faces.el.EvaluationException: Cannot get value for expression '#{catererEditor.new}'


                              I have no many-to-many mappings. The database structure is very simple for testing. Is there a possible solution for this problem?


                              try to use the latest version of jboss ejb3 jars (jobss-ejb3 latest download) instead of the jars in ejb3.deploy in the server is still the old version.

                              • 42. Re: Seam reverse engineering tool
                                ampieb

                                This tool is quite impressive. Any plans to take it even further, almost like a NakedObjects on Seam?

                                • 43. Re: Seam reverse engineering tool
                                  maxandersen

                                  we want to take it further; are you up for contributions ? :)

                                  • 44. Re: Seam reverse engineering tool
                                    ampieb

                                    I might just be :-). I recently did a tool using UML stereotypes and tagged values to generate a JSF interface. I would love to explore what commonalities there might be with your vision... Migrating from UML taggedvalues to annotations should not be