|
|
|
AppFuse - Issues mailing list
|
If class name has embedded capitals, AppGen code fails UI tests, and generated hyperlinks are incorrect.
-------------------------------------------------------------------------------------------------------- Key: APF-1088 URL: http://issues.appfuse.org/browse/APF-1088 Project: AppFuse Issue Type: Bug Components: Tools - AppGen Affects Versions: 2.0.2 Environment: WinXP/Pro/SP2, Maven 2.0.9, Java 1.6.0_05 Reporter: Dwight Harn Assignee: Matt Raible Using appfuse:gen -Dentity=TestCase creates code that doesn't work, due to the embedded uppercase letter in the class name. (see also forum http://www.nabble.com/problem-in-filenames-with-appfuse%3Agen-and-mixed-case-class-name-td18883094s2369.html) "mvn" fails during the UI test phase; after all the "User" UI tests complete OK, and FlushCache and FileUpload, then I get this: SearchTestCases: [INFO] [talledLocalContainer] [LStst4] WARN [http-8081-13] PageNotFound.noHandlerFound(1068) | No mapping found for HTTP request with URI [/LStst4-1.0-SNAPSHOT/testCases.html] in DispatcherServlet with name 'dispatcher' ... Note that /testcases.html does work; and /testcaseform.html works, also. However, the edit and Add links on testcases.html are to /testCaseform.html (capital C), so they fail. (And the main menu link is to /testCases.html, so that fails.) ...and poking around some more, i found in web-tests.xml: <webtest name="searchTestCases"> &config; <steps> &login; <invoke description="click View TestCase link" url="/testCases.html"/> I think the problem is a conflict between the controller mapping (ControllerClassNameHandlerMapping), which lower-cases the whole name, and the names used by the gen process, which keeps embedded capitals, e.g., testCases.jsp. The source for TestCase.java: package com.LStst.app.model; import javax.persistence.*; import static javax.persistence.GenerationType.IDENTITY; @Entity @Table(name = "test_case") public class TestCase implements java.io.Serializable { static final long serialVersionUID = 1L; private Integer id; private String name; public TestCase() { } public TestCase(String name) { this.name = name; } @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "Id", unique = true, nullable = false) public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } @Column(name = "Name", length = 50) public String getName() { return this.name; } public void setName(String name) { this.name = name; } } gen added this applicationContext.xml entry: <!--TestCaseManager-START--> <bean id="testCaseManager" class="org.appfuse.service.impl.GenericManagerImpl"> <constructor-arg> <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate"> <constructor-arg value="com.LStst.app.model.TestCase"/> <property name="sessionFactory" ref="sessionFactory"/> </bean> </constructor-arg> </bean> <!--TestCaseManager-END--> gen added this to dispatcher-servlet.xml: <!--TestCase-START--> <bean id="testCaseController" class="com.LStst.app.webapp.controller.TestCaseController"> <property name="testCaseManager" ref="testCaseManager"/> </bean> <bean id="testCaseFormController" class="com.LStst.app.webapp.controller.TestCaseFormController"> <property name="validator" ref="beanValidator"/> <property name="successView" value="redirect:testCases.html"/> <property name="testCaseManager" ref="testCaseManager"/> </bean> <!--TestCase-END--> gen added this menu-config.xml entry: <Menu name="TestCaseMenu" title="testCaseList.title" page="/testCases.html"/> gen added this to validation.xml: <!--TestCase-START--> <form name="testCase"> </form> <!--TestCase-END--> but that failed XML validation - "missing (field)+", so I added a field entry: <form name="testCase"> <field property="name" depends="required"> <arg0 key="testCase.name"/> </field> </form> gen also created LStst4\src\main\webapp\WEB-INF\pages\testCases.jsp LStst4\src\main\webapp\WEB-INF\pages\testCaseform.jsp -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.appfuse.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
AppFuse - Issues mailing list
|
[ http://issues.appfuse.org/browse/APF-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Raible updated APF-1088: ----------------------------- Fix Version/s: 2.1 > If class name has embedded capitals, AppGen code fails UI tests, and generated hyperlinks are incorrect. > -------------------------------------------------------------------------------------------------------- > > Key: APF-1088 > URL: http://issues.appfuse.org/browse/APF-1088 > Project: AppFuse > Issue Type: Bug > Components: Tools - AppGen > Affects Versions: 2.0.2 > Environment: WinXP/Pro/SP2, Maven 2.0.9, Java 1.6.0_05 > Reporter: Dwight Harn > Assignee: Matt Raible > Fix For: 2.1 > > > Using appfuse:gen -Dentity=TestCase creates code that doesn't work, due to the embedded uppercase letter in the class name. > (see also forum http://www.nabble.com/problem-in-filenames-with-appfuse%3Agen-and-mixed-case-class-name-td18883094s2369.html) > "mvn" fails during the UI test phase; after all the "User" UI tests complete OK, and FlushCache and FileUpload, then I get this: > SearchTestCases: > [INFO] [talledLocalContainer] [LStst4] WARN [http-8081-13] PageNotFound.noHandlerFound(1068) | No mapping found for HTTP request with URI [/LStst4-1.0-SNAPSHOT/testCases.html] in DispatcherServlet with name 'dispatcher' > ... > Note that /testcases.html does work; and /testcaseform.html works, also. However, the edit and Add links on testcases.html are to /testCaseform.html (capital C), so they fail. (And the main menu link is to /testCases.html, so that fails.) > ...and poking around some more, i found in web-tests.xml: > <webtest name="searchTestCases"> > &config; > <steps> > &login; > <invoke description="click View TestCase link" url="/testCases.html"/> > I think the problem is a conflict between the controller mapping (ControllerClassNameHandlerMapping), which lower-cases the whole name, and the names used by the gen process, which keeps embedded capitals, e.g., testCases.jsp. > The source for TestCase.java: > package com.LStst.app.model; > import javax.persistence.*; > import static javax.persistence.GenerationType.IDENTITY; > @Entity > @Table(name = "test_case") > public class TestCase implements java.io.Serializable { > static final long serialVersionUID = 1L; > private Integer id; > private String name; > public TestCase() { > } > public TestCase(String name) { > this.name = name; > } > @Id > @GeneratedValue(strategy = IDENTITY) > @Column(name = "Id", unique = true, nullable = false) > public Integer getId() { > return this.id; > } > public void setId(Integer id) { > this.id = id; > } > @Column(name = "Name", length = 50) > public String getName() { > return this.name; > } > public void setName(String name) { > this.name = name; > } > } > gen added this applicationContext.xml entry: > <!--TestCaseManager-START--> > <bean id="testCaseManager" class="org.appfuse.service.impl.GenericManagerImpl"> > <constructor-arg> > <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate"> > <constructor-arg value="com.LStst.app.model.TestCase"/> > <property name="sessionFactory" ref="sessionFactory"/> > </bean> > </constructor-arg> > </bean> > <!--TestCaseManager-END--> > gen added this to dispatcher-servlet.xml: > <!--TestCase-START--> > <bean id="testCaseController" class="com.LStst.app.webapp.controller.TestCaseController"> > <property name="testCaseManager" ref="testCaseManager"/> > </bean> > <bean id="testCaseFormController" class="com.LStst.app.webapp.controller.TestCaseFormController"> > <property name="validator" ref="beanValidator"/> > <property name="successView" value="redirect:testCases.html"/> > <property name="testCaseManager" ref="testCaseManager"/> > </bean> > <!--TestCase-END--> > gen added this menu-config.xml entry: > <Menu name="TestCaseMenu" title="testCaseList.title" page="/testCases.html"/> > gen added this to validation.xml: > <!--TestCase-START--> > <form name="testCase"> > </form> > <!--TestCase-END--> > but that failed XML validation - "missing (field)+", so I added a field entry: > <form name="testCase"> > <field property="name" depends="required"> > <arg0 key="testCase.name"/> > </field> > </form> > gen also created > LStst4\src\main\webapp\WEB-INF\pages\testCases.jsp > LStst4\src\main\webapp\WEB-INF\pages\testCaseform.jsp -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.appfuse.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
AppFuse - Issues mailing list
|
In reply to this post
by AppFuse - Issues mailing list
[ http://issues.appfuse.org/browse/APF-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12626 ] Enrique Jesús Cardona Cebrián commented on APF-1088: ---------------------------------------------------- A temporary fix to this issue in 2.0.2 version. The thing you have to do is get "/WEB-INF/dispatcher-servlet.xml" file and edit "ControllerClassNameHandlerMapping" entry like this: <bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"> <property name="order" value="1" /> <!-- Fixes JIRA APF-1088 --> <property name="caseSensitive" value="true" /> </bean> That worked for me. > If class name has embedded capitals, AppGen code fails UI tests, and generated hyperlinks are incorrect. > -------------------------------------------------------------------------------------------------------- > > Key: APF-1088 > URL: http://issues.appfuse.org/browse/APF-1088 > Project: AppFuse > Issue Type: Bug > Components: Tools - AppGen > Affects Versions: 2.0.2 > Environment: WinXP/Pro/SP2, Maven 2.0.9, Java 1.6.0_05 > Reporter: Dwight Harn > Assignee: Matt Raible > Fix For: 2.1 > > > Using appfuse:gen -Dentity=TestCase creates code that doesn't work, due to the embedded uppercase letter in the class name. > (see also forum http://www.nabble.com/problem-in-filenames-with-appfuse%3Agen-and-mixed-case-class-name-td18883094s2369.html) > "mvn" fails during the UI test phase; after all the "User" UI tests complete OK, and FlushCache and FileUpload, then I get this: > SearchTestCases: > [INFO] [talledLocalContainer] [LStst4] WARN [http-8081-13] PageNotFound.noHandlerFound(1068) | No mapping found for HTTP request with URI [/LStst4-1.0-SNAPSHOT/testCases.html] in DispatcherServlet with name 'dispatcher' > ... > Note that /testcases.html does work; and /testcaseform.html works, also. However, the edit and Add links on testcases.html are to /testCaseform.html (capital C), so they fail. (And the main menu link is to /testCases.html, so that fails.) > ...and poking around some more, i found in web-tests.xml: > <webtest name="searchTestCases"> > &config; > <steps> > &login; > <invoke description="click View TestCase link" url="/testCases.html"/> > I think the problem is a conflict between the controller mapping (ControllerClassNameHandlerMapping), which lower-cases the whole name, and the names used by the gen process, which keeps embedded capitals, e.g., testCases.jsp. > The source for TestCase.java: > package com.LStst.app.model; > import javax.persistence.*; > import static javax.persistence.GenerationType.IDENTITY; > @Entity > @Table(name = "test_case") > public class TestCase implements java.io.Serializable { > static final long serialVersionUID = 1L; > private Integer id; > private String name; > public TestCase() { > } > public TestCase(String name) { > this.name = name; > } > @Id > @GeneratedValue(strategy = IDENTITY) > @Column(name = "Id", unique = true, nullable = false) > public Integer getId() { > return this.id; > } > public void setId(Integer id) { > this.id = id; > } > @Column(name = "Name", length = 50) > public String getName() { > return this.name; > } > public void setName(String name) { > this.name = name; > } > } > gen added this applicationContext.xml entry: > <!--TestCaseManager-START--> > <bean id="testCaseManager" class="org.appfuse.service.impl.GenericManagerImpl"> > <constructor-arg> > <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate"> > <constructor-arg value="com.LStst.app.model.TestCase"/> > <property name="sessionFactory" ref="sessionFactory"/> > </bean> > </constructor-arg> > </bean> > <!--TestCaseManager-END--> > gen added this to dispatcher-servlet.xml: > <!--TestCase-START--> > <bean id="testCaseController" class="com.LStst.app.webapp.controller.TestCaseController"> > <property name="testCaseManager" ref="testCaseManager"/> > </bean> > <bean id="testCaseFormController" class="com.LStst.app.webapp.controller.TestCaseFormController"> > <property name="validator" ref="beanValidator"/> > <property name="successView" value="redirect:testCases.html"/> > <property name="testCaseManager" ref="testCaseManager"/> > </bean> > <!--TestCase-END--> > gen added this menu-config.xml entry: > <Menu name="TestCaseMenu" title="testCaseList.title" page="/testCases.html"/> > gen added this to validation.xml: > <!--TestCase-START--> > <form name="testCase"> > </form> > <!--TestCase-END--> > but that failed XML validation - "missing (field)+", so I added a field entry: > <form name="testCase"> > <field property="name" depends="required"> > <arg0 key="testCase.name"/> > </field> > </form> > gen also created > LStst4\src\main\webapp\WEB-INF\pages\testCases.jsp > LStst4\src\main\webapp\WEB-INF\pages\testCaseform.jsp -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.appfuse.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
AppFuse - Issues mailing list
|
In reply to this post
by AppFuse - Issues mailing list
[ http://issues.appfuse.org/browse/APF-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12627 ] Enrique Jesús Cardona Cebrián commented on APF-1088: ---------------------------------------------------- Sorry about my last comment. It solves this concrete problem but generates lots of other problems in other parts of the code. Don't use it. I'll have to wait next AppFuse release. > If class name has embedded capitals, AppGen code fails UI tests, and generated hyperlinks are incorrect. > -------------------------------------------------------------------------------------------------------- > > Key: APF-1088 > URL: http://issues.appfuse.org/browse/APF-1088 > Project: AppFuse > Issue Type: Bug > Components: Tools - AppGen > Affects Versions: 2.0.2 > Environment: WinXP/Pro/SP2, Maven 2.0.9, Java 1.6.0_05 > Reporter: Dwight Harn > Assignee: Matt Raible > Fix For: 2.1 > > > Using appfuse:gen -Dentity=TestCase creates code that doesn't work, due to the embedded uppercase letter in the class name. > (see also forum http://www.nabble.com/problem-in-filenames-with-appfuse%3Agen-and-mixed-case-class-name-td18883094s2369.html) > "mvn" fails during the UI test phase; after all the "User" UI tests complete OK, and FlushCache and FileUpload, then I get this: > SearchTestCases: > [INFO] [talledLocalContainer] [LStst4] WARN [http-8081-13] PageNotFound.noHandlerFound(1068) | No mapping found for HTTP request with URI [/LStst4-1.0-SNAPSHOT/testCases.html] in DispatcherServlet with name 'dispatcher' > ... > Note that /testcases.html does work; and /testcaseform.html works, also. However, the edit and Add links on testcases.html are to /testCaseform.html (capital C), so they fail. (And the main menu link is to /testCases.html, so that fails.) > ...and poking around some more, i found in web-tests.xml: > <webtest name="searchTestCases"> > &config; > <steps> > &login; > <invoke description="click View TestCase link" url="/testCases.html"/> > I think the problem is a conflict between the controller mapping (ControllerClassNameHandlerMapping), which lower-cases the whole name, and the names used by the gen process, which keeps embedded capitals, e.g., testCases.jsp. > The source for TestCase.java: > package com.LStst.app.model; > import javax.persistence.*; > import static javax.persistence.GenerationType.IDENTITY; > @Entity > @Table(name = "test_case") > public class TestCase implements java.io.Serializable { > static final long serialVersionUID = 1L; > private Integer id; > private String name; > public TestCase() { > } > public TestCase(String name) { > this.name = name; > } > @Id > @GeneratedValue(strategy = IDENTITY) > @Column(name = "Id", unique = true, nullable = false) > public Integer getId() { > return this.id; > } > public void setId(Integer id) { > this.id = id; > } > @Column(name = "Name", length = 50) > public String getName() { > return this.name; > } > public void setName(String name) { > this.name = name; > } > } > gen added this applicationContext.xml entry: > <!--TestCaseManager-START--> > <bean id="testCaseManager" class="org.appfuse.service.impl.GenericManagerImpl"> > <constructor-arg> > <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate"> > <constructor-arg value="com.LStst.app.model.TestCase"/> > <property name="sessionFactory" ref="sessionFactory"/> > </bean> > </constructor-arg> > </bean> > <!--TestCaseManager-END--> > gen added this to dispatcher-servlet.xml: > <!--TestCase-START--> > <bean id="testCaseController" class="com.LStst.app.webapp.controller.TestCaseController"> > <property name="testCaseManager" ref="testCaseManager"/> > </bean> > <bean id="testCaseFormController" class="com.LStst.app.webapp.controller.TestCaseFormController"> > <property name="validator" ref="beanValidator"/> > <property name="successView" value="redirect:testCases.html"/> > <property name="testCaseManager" ref="testCaseManager"/> > </bean> > <!--TestCase-END--> > gen added this menu-config.xml entry: > <Menu name="TestCaseMenu" title="testCaseList.title" page="/testCases.html"/> > gen added this to validation.xml: > <!--TestCase-START--> > <form name="testCase"> > </form> > <!--TestCase-END--> > but that failed XML validation - "missing (field)+", so I added a field entry: > <form name="testCase"> > <field property="name" depends="required"> > <arg0 key="testCase.name"/> > </field> > </form> > gen also created > LStst4\src\main\webapp\WEB-INF\pages\testCases.jsp > LStst4\src\main\webapp\WEB-INF\pages\testCaseform.jsp -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.appfuse.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
AppFuse - Issues mailing list
|
In reply to this post
by AppFuse - Issues mailing list
[ http://issues.appfuse.org/browse/APF-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Raible updated APF-1088: ----------------------------- Fix Version/s: (was: 2.1.0-M1) 2.1.0-M2 > If class name has embedded capitals, AppGen code fails UI tests, and generated hyperlinks are incorrect. > -------------------------------------------------------------------------------------------------------- > > Key: APF-1088 > URL: http://issues.appfuse.org/browse/APF-1088 > Project: AppFuse > Issue Type: Bug > Components: Tools - AppGen > Affects Versions: 2.0.2 > Environment: WinXP/Pro/SP2, Maven 2.0.9, Java 1.6.0_05 > Reporter: Dwight Harn > Assignee: Matt Raible > Fix For: 2.1.0-M2 > > > Using appfuse:gen -Dentity=TestCase creates code that doesn't work, due to the embedded uppercase letter in the class name. > (see also forum http://www.nabble.com/problem-in-filenames-with-appfuse%3Agen-and-mixed-case-class-name-td18883094s2369.html) > "mvn" fails during the UI test phase; after all the "User" UI tests complete OK, and FlushCache and FileUpload, then I get this: > SearchTestCases: > [INFO] [talledLocalContainer] [LStst4] WARN [http-8081-13] PageNotFound.noHandlerFound(1068) | No mapping found for HTTP request with URI [/LStst4-1.0-SNAPSHOT/testCases.html] in DispatcherServlet with name 'dispatcher' > ... > Note that /testcases.html does work; and /testcaseform.html works, also. However, the edit and Add links on testcases.html are to /testCaseform.html (capital C), so they fail. (And the main menu link is to /testCases.html, so that fails.) > ...and poking around some more, i found in web-tests.xml: > <webtest name="searchTestCases"> > &config; > <steps> > &login; > <invoke description="click View TestCase link" url="/testCases.html"/> > I think the problem is a conflict between the controller mapping (ControllerClassNameHandlerMapping), which lower-cases the whole name, and the names used by the gen process, which keeps embedded capitals, e.g., testCases.jsp. > The source for TestCase.java: > package com.LStst.app.model; > import javax.persistence.*; > import static javax.persistence.GenerationType.IDENTITY; > @Entity > @Table(name = "test_case") > public class TestCase implements java.io.Serializable { > static final long serialVersionUID = 1L; > private Integer id; > private String name; > public TestCase() { > } > public TestCase(String name) { > this.name = name; > } > @Id > @GeneratedValue(strategy = IDENTITY) > @Column(name = "Id", unique = true, nullable = false) > public Integer getId() { > return this.id; > } > public void setId(Integer id) { > this.id = id; > } > @Column(name = "Name", length = 50) > public String getName() { > return this.name; > } > public void setName(String name) { > this.name = name; > } > } > gen added this applicationContext.xml entry: > <!--TestCaseManager-START--> > <bean id="testCaseManager" class="org.appfuse.service.impl.GenericManagerImpl"> > <constructor-arg> > <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate"> > <constructor-arg value="com.LStst.app.model.TestCase"/> > <property name="sessionFactory" ref="sessionFactory"/> > </bean> > </constructor-arg> > </bean> > <!--TestCaseManager-END--> > gen added this to dispatcher-servlet.xml: > <!--TestCase-START--> > <bean id="testCaseController" class="com.LStst.app.webapp.controller.TestCaseController"> > <property name="testCaseManager" ref="testCaseManager"/> > </bean> > <bean id="testCaseFormController" class="com.LStst.app.webapp.controller.TestCaseFormController"> > <property name="validator" ref="beanValidator"/> > <property name="successView" value="redirect:testCases.html"/> > <property name="testCaseManager" ref="testCaseManager"/> > </bean> > <!--TestCase-END--> > gen added this menu-config.xml entry: > <Menu name="TestCaseMenu" title="testCaseList.title" page="/testCases.html"/> > gen added this to validation.xml: > <!--TestCase-START--> > <form name="testCase"> > </form> > <!--TestCase-END--> > but that failed XML validation - "missing (field)+", so I added a field entry: > <form name="testCase"> > <field property="name" depends="required"> > <arg0 key="testCase.name"/> > </field> > </form> > gen also created > LStst4\src\main\webapp\WEB-INF\pages\testCases.jsp > LStst4\src\main\webapp\WEB-INF\pages\testCaseform.jsp -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.appfuse.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |