|
|
| 1 2 |
|
Steve Tynor-2
|
Matt,
When I run "mvn appfuse:full-source" on a freshly checked out "appfuse-basic-jsf" archetype, I get a failure to create files - if I were to guess, I'd say that there's an attempt to write to a directory without first making sure the directory exists? (note how no "org/appfuse" directories are present in my src directory after the failure): # mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-basic-jsf -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5-SNAPSHOT -DgroupId=com.mycompany.app -DartifactId=myproject ... # mvn appfuse:full-source ... [INFO] [appfuse:full-source] [INFO] [AppFuse] Installing source from data modules... [ERROR] 204899 : svn: error: cannot create new file 'c:\newdev\appfuse-clean\test-for-h2\myproject\src\main\java\org\appfuse\model\BaseObject.java' [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] svn: error: cannot create new file 'c:\newdev\appfuse-clean\test-for-h2\ myproject\src\main\java\org\appfuse\model\BaseObject.java' [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5 seconds [INFO] Finished at: Tue May 22 11:56:16 EDT 2007 [INFO] Final Memory: 5M/10M [INFO] ------------------------------------------------------------------------ # find src -type d src src/main src/main/java src/main/java/com src/main/java/com/mycompany src/main/java/com/mycompany/app src/main/resources src/main/resources/META-INF src/main/webapp src/main/webapp/common src/main/webapp/WEB-INF src/site src/test src/test/java src/test/java/com src/test/java/com/mycompany src/test/java/com/mycompany/app src/test/resources --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
mraible
|
Doh! I remember making this change last night that causes this error.
I'll fix it and redeploy. Matt On 5/22/07, Steve Tynor <[hidden email]> wrote: > Matt, > > When I run "mvn appfuse:full-source" on a freshly checked out > "appfuse-basic-jsf" archetype, I get a failure to create files - if I > were to guess, I'd say that there's an attempt to write to a directory > without first making sure the directory exists? (note how no > "org/appfuse" directories are present in my src directory after the > failure): > > # mvn archetype:create -DarchetypeGroupId=org.appfuse > -DarchetypeArtifactId=appfuse-basic-jsf > -DremoteRepositories=http://static.appfuse.org/repository > -DarchetypeVersion=2.0-m5-SNAPSHOT -DgroupId=com.mycompany.app > -DartifactId=myproject > ... > > # mvn appfuse:full-source > ... > [INFO] [appfuse:full-source] > [INFO] [AppFuse] Installing source from data modules... > [ERROR] 204899 : svn: error: cannot create new file > 'c:\newdev\appfuse-clean\test-for-h2\myproject\src\main\java\org\appfuse\model\BaseObject.java' > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] svn: error: cannot create new file > 'c:\newdev\appfuse-clean\test-for-h2\ > myproject\src\main\java\org\appfuse\model\BaseObject.java' > [INFO] > ------------------------------------------------------------------------ > [INFO] For more information, run Maven with the -e switch > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 5 seconds > [INFO] Finished at: Tue May 22 11:56:16 EDT 2007 > [INFO] Final Memory: 5M/10M > [INFO] > ------------------------------------------------------------------------ > > > # find src -type d > src > src/main > src/main/java > src/main/java/com > src/main/java/com/mycompany > src/main/java/com/mycompany/app > src/main/resources > src/main/resources/META-INF > src/main/webapp > src/main/webapp/common > src/main/webapp/WEB-INF > src/site > src/test > src/test/java > src/test/java/com > src/test/java/com/mycompany > src/test/java/com/mycompany/app > src/test/resources > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
mraible
|
Should be fixed now.
Matt On 5/22/07, Matt Raible <[hidden email]> wrote: > Doh! I remember making this change last night that causes this error. > I'll fix it and redeploy. > > Matt > > On 5/22/07, Steve Tynor <[hidden email]> wrote: > > Matt, > > > > When I run "mvn appfuse:full-source" on a freshly checked out > > "appfuse-basic-jsf" archetype, I get a failure to create files - if I > > were to guess, I'd say that there's an attempt to write to a directory > > without first making sure the directory exists? (note how no > > "org/appfuse" directories are present in my src directory after the > > failure): > > > > # mvn archetype:create -DarchetypeGroupId=org.appfuse > > -DarchetypeArtifactId=appfuse-basic-jsf > > -DremoteRepositories=http://static.appfuse.org/repository > > -DarchetypeVersion=2.0-m5-SNAPSHOT -DgroupId=com.mycompany.app > > -DartifactId=myproject > > ... > > > > # mvn appfuse:full-source > > ... > > [INFO] [appfuse:full-source] > > [INFO] [AppFuse] Installing source from data modules... > > [ERROR] 204899 : svn: error: cannot create new file > > 'c:\newdev\appfuse-clean\test-for-h2\myproject\src\main\java\org\appfuse\model\BaseObject.java' > > [INFO] > > ------------------------------------------------------------------------ > > [ERROR] BUILD ERROR > > [INFO] > > ------------------------------------------------------------------------ > > [INFO] svn: error: cannot create new file > > 'c:\newdev\appfuse-clean\test-for-h2\ > > myproject\src\main\java\org\appfuse\model\BaseObject.java' > > [INFO] > > ------------------------------------------------------------------------ > > [INFO] For more information, run Maven with the -e switch > > [INFO] > > ------------------------------------------------------------------------ > > [INFO] Total time: 5 seconds > > [INFO] Finished at: Tue May 22 11:56:16 EDT 2007 > > [INFO] Final Memory: 5M/10M > > [INFO] > > ------------------------------------------------------------------------ > > > > > > # find src -type d > > src > > src/main > > src/main/java > > src/main/java/com > > src/main/java/com/mycompany > > src/main/java/com/mycompany/app > > src/main/resources > > src/main/resources/META-INF > > src/main/webapp > > src/main/webapp/common > > src/main/webapp/WEB-INF > > src/site > > src/test > > src/test/java > > src/test/java/com > > src/test/java/com/mycompany > > src/test/java/com/mycompany/app > > src/test/resources > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [hidden email] > > For additional commands, e-mail: [hidden email] > > > > > > > -- > http://raibledesigns.com > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
Steve Tynor-2
|
Matt,
Confirmed fixed. Now I can give you a cookbook to reproduce the h2/hsqldb lock errors: # mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-basic-jsf -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5-SNAPSHOT -DgroupId=com.mycompany.app -DartifactId=myproject # mvn appfuse:full-source then edit pom.xml to replace the test database mysql config at the bottom of the pom.xml with: <dbunit.dataTypeFactoryName>org.dbunit.ext.hsqldb.HsqldbDataTypeFactory</dbunit.dataTypeFactoryName> <dbunit.operation.type>CLEAN_INSERT</dbunit.operation.type> <hibernate.dialect>org.hibernate.dialect.HSQLDialect</hibernate.dialect> <jdbc.groupId>hsqldb</jdbc.groupId> <jdbc.artifactId>hsqldb</jdbc.artifactId> <jdbc.version>1.8.0.7</jdbc.version> <jdbc.driverClassName>org.hsqldb.jdbcDriver</jdbc.driverClassName> <jdbc.url><![CDATA[jdbc:hsqldb:ascent;shutdown=true]]></jdbc.url> <jdbc.username>sa</jdbc.username> <jdbc.password></jdbc.password> # mvn clean integration-test et voila: [INFO] [dbunit:operation {execution: test}] [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error executing database operation: CLEAN_INSERT Embedded error: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@a4df0f73[file=C:\newdev\appfuse-clean\test-for-h2\myproject\ascent.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\newdev\appfuse-clean\test-for-h2\myproject\ascent.lck Steve On 5/22/2007 12:20 PM, Matt Raible wrote: > Should be fixed now. > > Matt > > On 5/22/07, Matt Raible <[hidden email]> wrote: >> Doh! I remember making this change last night that causes this error. >> I'll fix it and redeploy. >> >> Matt >> >> On 5/22/07, Steve Tynor <[hidden email]> wrote: >> > Matt, >> > >> > When I run "mvn appfuse:full-source" on a freshly checked out >> > "appfuse-basic-jsf" archetype, I get a failure to create files - if I >> > were to guess, I'd say that there's an attempt to write to a directory >> > without first making sure the directory exists? (note how no >> > "org/appfuse" directories are present in my src directory after the >> > failure): >> > >> > # mvn archetype:create -DarchetypeGroupId=org.appfuse >> > -DarchetypeArtifactId=appfuse-basic-jsf >> > -DremoteRepositories=http://static.appfuse.org/repository >> > -DarchetypeVersion=2.0-m5-SNAPSHOT -DgroupId=com.mycompany.app >> > -DartifactId=myproject >> > ... >> > >> > # mvn appfuse:full-source >> > ... >> > [INFO] [appfuse:full-source] >> > [INFO] [AppFuse] Installing source from data modules... >> > [ERROR] 204899 : svn: error: cannot create new file >> > >> 'c:\newdev\appfuse-clean\test-for-h2\myproject\src\main\java\org\appfuse\model\BaseObject.java' >> >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > [ERROR] BUILD ERROR >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > [INFO] svn: error: cannot create new file >> > 'c:\newdev\appfuse-clean\test-for-h2\ >> > myproject\src\main\java\org\appfuse\model\BaseObject.java' >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > [INFO] For more information, run Maven with the -e switch >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > [INFO] Total time: 5 seconds >> > [INFO] Finished at: Tue May 22 11:56:16 EDT 2007 >> > [INFO] Final Memory: 5M/10M >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > >> > >> > # find src -type d >> > src >> > src/main >> > src/main/java >> > src/main/java/com >> > src/main/java/com/mycompany >> > src/main/java/com/mycompany/app >> > src/main/resources >> > src/main/resources/META-INF >> > src/main/webapp >> > src/main/webapp/common >> > src/main/webapp/WEB-INF >> > src/site >> > src/test >> > src/test/java >> > src/test/java/com >> > src/test/java/com/mycompany >> > src/test/java/com/mycompany/app >> > src/test/resources >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [hidden email] >> > For additional commands, e-mail: [hidden email] >> > >> > >> >> >> -- >> http://raibledesigns.com >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
mraible
|
So something isn't closing the database properly eh? I was able to
reproduce this problem on my end, so you should probably enter an issue for it. As a workaround, I found that commenting out the second <execution> block in the dbunit plugin's configuration solves the problem. Matt On 5/22/07, Steve Tynor <[hidden email]> wrote: > Matt, > > Confirmed fixed. Now I can give you a cookbook to reproduce the > h2/hsqldb lock errors: > > # mvn archetype:create -DarchetypeGroupId=org.appfuse > -DarchetypeArtifactId=appfuse-basic-jsf > -DremoteRepositories=http://static.appfuse.org/repository > -DarchetypeVersion=2.0-m5-SNAPSHOT -DgroupId=com.mycompany.app > -DartifactId=myproject > > # mvn appfuse:full-source > > then edit pom.xml to replace the test database mysql config at the > bottom of the pom.xml with: > > > <dbunit.dataTypeFactoryName>org.dbunit.ext.hsqldb.HsqldbDataTypeFactory</dbunit.dataTypeFactoryName> > <dbunit.operation.type>CLEAN_INSERT</dbunit.operation.type> > <hibernate.dialect>org.hibernate.dialect.HSQLDialect</hibernate.dialect> > <jdbc.groupId>hsqldb</jdbc.groupId> > <jdbc.artifactId>hsqldb</jdbc.artifactId> > <jdbc.version>1.8.0.7</jdbc.version> > <jdbc.driverClassName>org.hsqldb.jdbcDriver</jdbc.driverClassName> > <jdbc.url><![CDATA[jdbc:hsqldb:ascent;shutdown=true]]></jdbc.url> > <jdbc.username>sa</jdbc.username> > <jdbc.password></jdbc.password> > > # mvn clean integration-test > > et voila: > > [INFO] [dbunit:operation {execution: test}] > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Error executing database operation: CLEAN_INSERT > > Embedded error: The database is already in use by another process: > org.hsqldb.persist.NIOLockFile@a4df0f73[file=C:\newdev\appfuse-clean\test-for-h2\myproject\ascent.lck, > exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: > java.io.IOException: The process cannot access the file because > another process has locked a portion of the file : > C:\newdev\appfuse-clean\test-for-h2\myproject\ascent.lck > > > Steve > > > On 5/22/2007 12:20 PM, Matt Raible wrote: > > Should be fixed now. > > > > Matt > > > > On 5/22/07, Matt Raible <[hidden email]> wrote: > >> Doh! I remember making this change last night that causes this error. > >> I'll fix it and redeploy. > >> > >> Matt > >> > >> On 5/22/07, Steve Tynor <[hidden email]> wrote: > >> > Matt, > >> > > >> > When I run "mvn appfuse:full-source" on a freshly checked out > >> > "appfuse-basic-jsf" archetype, I get a failure to create files - if I > >> > were to guess, I'd say that there's an attempt to write to a directory > >> > without first making sure the directory exists? (note how no > >> > "org/appfuse" directories are present in my src directory after the > >> > failure): > >> > > >> > # mvn archetype:create -DarchetypeGroupId=org.appfuse > >> > -DarchetypeArtifactId=appfuse-basic-jsf > >> > -DremoteRepositories=http://static.appfuse.org/repository > >> > -DarchetypeVersion=2.0-m5-SNAPSHOT -DgroupId=com.mycompany.app > >> > -DartifactId=myproject > >> > ... > >> > > >> > # mvn appfuse:full-source > >> > ... > >> > [INFO] [appfuse:full-source] > >> > [INFO] [AppFuse] Installing source from data modules... > >> > [ERROR] 204899 : svn: error: cannot create new file > >> > > >> 'c:\newdev\appfuse-clean\test-for-h2\myproject\src\main\java\org\appfuse\model\BaseObject.java' > >> > >> > [INFO] > >> > > >> ------------------------------------------------------------------------ > >> > [ERROR] BUILD ERROR > >> > [INFO] > >> > > >> ------------------------------------------------------------------------ > >> > [INFO] svn: error: cannot create new file > >> > 'c:\newdev\appfuse-clean\test-for-h2\ > >> > myproject\src\main\java\org\appfuse\model\BaseObject.java' > >> > [INFO] > >> > > >> ------------------------------------------------------------------------ > >> > [INFO] For more information, run Maven with the -e switch > >> > [INFO] > >> > > >> ------------------------------------------------------------------------ > >> > [INFO] Total time: 5 seconds > >> > [INFO] Finished at: Tue May 22 11:56:16 EDT 2007 > >> > [INFO] Final Memory: 5M/10M > >> > [INFO] > >> > > >> ------------------------------------------------------------------------ > >> > > >> > > >> > # find src -type d > >> > src > >> > src/main > >> > src/main/java > >> > src/main/java/com > >> > src/main/java/com/mycompany > >> > src/main/java/com/mycompany/app > >> > src/main/resources > >> > src/main/resources/META-INF > >> > src/main/webapp > >> > src/main/webapp/common > >> > src/main/webapp/WEB-INF > >> > src/site > >> > src/test > >> > src/test/java > >> > src/test/java/com > >> > src/test/java/com/mycompany > >> > src/test/java/com/mycompany/app > >> > src/test/resources > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: [hidden email] > >> > For additional commands, e-mail: [hidden email] > >> > > >> > > >> > >> > >> -- > >> http://raibledesigns.com > >> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
Steve Tynor-2
|
http://issues.appfuse.org/browse/APF-761
On 5/22/2007 1:30 PM, Matt Raible wrote: > So something isn't closing the database properly eh? I was able to > reproduce this problem on my end, so you should probably enter an > issue for it. As a workaround, I found that commenting out the second > <execution> block in the dbunit plugin's configuration solves the > problem. > > Matt --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
marshall-14
|
Hey all; I'm pretty new to appfuse. I'm going thru the tutorial, using a modular spring MVC archetype. I've created a PersonController and PersonControllerTest in the respective directories in the web/ component. I've also modified the dispatcher-servlet.xml for the proper mapping. When I run mvn test -Dtest=PersoncontrollerTest I'm getting an AssertionfailedError on the following line in PersonControllerTest: assertNotNull(m.get("personList")); Is there another configuration setting that I've overlooked? Thanks; Marshall
Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. |
||||||||||||||||
|
mraible
|
What does the handleRequest() method of your PersonController look like?
Matt On 5/22/07, marshall <[hidden email]> wrote: > Hey all; > > I'm pretty new to appfuse. I'm going thru the tutorial, using a modular > spring MVC archetype. I've created a PersonController and > PersonControllerTest in the respective directories in the web/ component. > I've also modified the dispatcher-servlet.xml for the proper mapping. > When I run mvn test -Dtest=PersoncontrollerTest I'm getting an > AssertionfailedError on the following line in PersonControllerTest: > > assertNotNull(m.get("personList")); > > Is there another configuration setting that I've overlooked? > > Thanks; > > Marshall > > ________________________________ > Finding fabulous fares is fun. > Let Yahoo! FareChase search your favorite travel sites to find flight and > hotel bargains. > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
marshall-14
|
Sure Matt; I'll include a few things just in case, starting with the PersonControllerTest class: package com.ss.webapp.controller; import java.util.List; import org.appfuse.webapp.controller.BaseControllerTestCase; import org.springframework.ui.ModelMap; import org.springframework.web.servlet.ModelAndView; public class PersonControllerTest extends BaseControllerTestCase { private PersonController c; public void setPersonController(PersonController c) { this.c = c; } public void testHandleRequest() throws Exception { ModelAndView mav = c.handleRequest(null, null); ModelMap m = mav.getModelMap(); assertNotNull(m.get("personList")); assertTrue(((List) m.get("personList")).size() > 0); } } and the core/src/main/resources/applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="personManager" class="org.appfuse.service.impl.GenericManagerImpl"> <constructor-arg> <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate" autowire="byType"> <constructor-arg value="com.ss.model.Person"/> </bean> </constructor-arg> </bean> </beans> and my dispatcher-servlet.xml configuration for personController: <bean id="personController" class="com.ss.webapp.controller.PersonController"> <property name="personManager" ref="personManager"/> </bean> I hope this if enough information for you. thanks; Marshall Matt Raible <[hidden email]> wrote: What does the handleRequest() method of your PersonController look like?
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. |
||||||||||||||||
|
mraible
|
The problem likely occurs in PersonController.java - can you post the
code for that? Thanks, Matt On 5/22/07, marshall <[hidden email]> wrote: > Sure Matt; > > I'll include a few things just in case, starting with the > PersonControllerTest class: > > package com.ss.webapp.controller; > > import java.util.List; > import > org.appfuse.webapp.controller.BaseControllerTestCase; > import org.springframework.ui.ModelMap; > import org.springframework.web.servlet.ModelAndView; > > public class PersonControllerTest extends BaseControllerTestCase { > private PersonController c; > > public void setPersonController(PersonController c) { > this.c = c; > } > > public void testHandleRequest() throws Exception { > ModelAndView mav = c.handleRequest(null, null); > ModelMap m = mav.getModelMap(); > assertNotNull(m.get("personList")); > assertTrue(((List) m.get("personList")).size() > 0); > } > } > > and the core/src/main/resources/applicationContext.xml > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> > > <bean id="personManager" > class="org.appfuse.service.impl.GenericManagerImpl"> > <constructor-arg> > <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate" > autowire="byType"> > <constructor-arg value="com.ss.model.Person"/> > </bean> > </constructor-arg> > </bean> > > </beans> > > and my dispatcher-servlet.xml configuration for personController: > > <bean id="personController" > class="com.ss.webapp.controller.PersonController"> > <property name="personManager" ref="personManager"/> > </bean> > > I hope this if enough information for you. > > thanks; > > Marshall > > Matt Raible <[hidden email]> wrote: > What does the handleRequest() method of your PersonController look like? > > Matt > > On 5/22/07, marshall wrote: > > Hey all; > > > > I'm pretty new to appfuse. I'm going thru the tutorial, using a modular > > spring MVC archetype. I've created a PersonController and > > PersonControllerTest in the respective directories in the web/ component. > > I've also modified the dispatcher-servlet.xml for the proper mapping. > > When I run mvn test -Dtest=PersoncontrollerTest I'm getting an > > AssertionfailedError on the following line in PersonControllerTest: > > > > assertNotNull(m.get("personList")); > > > > Is there another configuration setting that I've overlooked? > > > > Thanks; > > > > Marshall > > > > ________________________________ > > Finding fabulous fares is fun. > > Let Yahoo! FareChase search your favorite travel sites to find flight and > > hotel bargains. > > > > > > > -- > http://raibledesigns.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [hidden email] > For additional commands, e-mail: [hidden email] > > > > > ________________________________ > Park yourself in front of a world of choices in alternative vehicles. > Visit the Yahoo! Auto Green Center. > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
Steve Tynor-2
|
In reply to this post
by Steve Tynor-2
Another appfuse:full-source bug. With a clean appfuse-basic-jsf
project, with dao.framework changed from hibernate to jpa-hibernate, appfuse:full-source tries to access an invalid URL: [INFO] [AppFuse] Installing source from data modules... [ERROR] 204900 : svn: No entry at URL 'https://appfuse.dev.java.net/svn/appfuse/trunk/data/jpa/src' [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] svn: No entry at URL 'https://appfuse.dev.java.net/svn/appfuse/trunk/data/jpa/src' (NOTE: .../data/jpa/src... -- I believe the correct URL would be .../data/jpa-hibernate/src) Steve --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
marshall-14
|
In reply to this post
by mraible
Sure; Here it is: package com.ss.webapp.controller; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.appfuse.service.GenericManager; import com.socialsplendor.relisting.model.Person; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.Controller; public class PersonController implements Controller { private final Log log = LogFactory.getLog(PersonController.class); private GenericManager<Person, Long> personManager = null; public void setPersonManager(GenericManager<Person, Long> personManager) { this.personManager = personManager; } public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { log.debug("entering 'handleRequest' method..."); return new ModelAndView().addObject(personManager.getAll()); } } Marshall The problem likely occurs in PersonController.java - can you post the Shape Yahoo! in your own image. Join our Network Research Panel today! http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 hot CTA = Join our Network Research Panel |
||||||||||||||||
|
mraible
|
In reply to this post
by Steve Tynor-2
Thanks - should be fixed now. You'll probably need to rm -r
~/.m2/repository/org/codehaus/mojo/appfuse-maven-plugin to get the latest deployed version. Matt On 5/22/07, Steve Tynor <[hidden email]> wrote: > Another appfuse:full-source bug. With a clean appfuse-basic-jsf > project, with dao.framework changed from hibernate to jpa-hibernate, > appfuse:full-source tries to access an invalid URL: > > [INFO] [AppFuse] Installing source from data modules... > [ERROR] 204900 : svn: No entry at URL > 'https://appfuse.dev.java.net/svn/appfuse/trunk/data/jpa/src' > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] svn: No entry at URL > 'https://appfuse.dev.java.net/svn/appfuse/trunk/data/jpa/src' > > > (NOTE: .../data/jpa/src... -- I believe the correct URL would be > .../data/jpa-hibernate/src) > > Steve > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
mraible
|
In reply to this post
by marshall-14
If you print out the contents of ModelMap, what does it have in there?
You might try debugging your test and setting a breakpoint to inspect. Matt On 5/22/07, marshall <[hidden email]> wrote: > Sure; > > Here it is: > > package com.ss.webapp.controller; > > > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > > import org.apache.commons.logging.Log; > import org.apache.commons.logging.LogFactory; > import org.appfuse.service.GenericManager; > import com.socialsplendor.relisting.model.Person; > > import org.springframework.web.servlet.ModelAndView; > import org.springframework.web.servlet.mvc.Controller; > > > public class PersonController implements Controller { > > private final Log log = LogFactory.getLog(PersonController.class); > private GenericManager<Person, Long> personManager = null; > > public void setPersonManager(GenericManager<Person, Long> > personManager) { > this.personManager = personManager; > } > > public ModelAndView handleRequest(HttpServletRequest > request, HttpServletResponse response) throws Exception { > log.debug("entering 'handleRequest' method..."); > > return new ModelAndView().addObject(personManager.getAll()); > } > } > > > Marshall > > > Matt Raible <[hidden email]> wrote: > The problem likely occurs in PersonController.java - can you post the > code for that? > > Thanks, > > Matt > > On 5/22/07, marshall wrote: > > Sure Matt; > > > > I'll include a few things just in case, starting with the > > PersonControllerTest class: > > > > package com.ss.webapp.controller; > > > > import java.util.List; > > import > > org.appfuse.webapp.controller.BaseControllerTestCase; > > import org.springframework.ui.ModelMap; > > import org.springframework.web.servlet.ModelAndView; > > > > public class PersonControllerTest extends BaseControllerTestCase { > > private PersonController c; > > > > public void setPersonController(PersonController c) { > > this.c = c; > > } > > > > public void testHandleRequest() throws Exception { > > ModelAndView mav = c.handleRequest(null, null); > > ModelMap m = mav.getModelMap(); > > assertNotNull(m.get("personList")); > > assertTrue(((List) m.get("personList")).size() > 0); > > } > > } > > > > and the core/src/main/resources/applicationContext.xml > > > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > xsi:schemaLocation="http://www.springframework.org/schema/beans > > > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> > > > > > class="org.appfuse.service.impl.GenericManagerImpl"> > > > > > autowire="byType"> > > > > > > > > > > > > > > > > and my dispatcher-servlet.xml configuration for personController: > > > > > class="com.ss.webapp.controller.PersonController"> > > > > > > > > I hope this if enough information for you. > > > > thanks; > > > > Marshall > > > > Matt Raible wrote: > > What does the handleRequest() method of your PersonController look like? > > > > Matt > > > > On 5/22/07, marshall wrote: > > > Hey all; > > > > > > I'm pretty new to appfuse. I'm going thru the tutorial, using a modular > > > spring MVC archetype. I've created a PersonController and > > > PersonControllerTest in the respective directories in the web/ > component. > > > I've also modified the dispatcher-servlet.xml for the proper mapping. > > > When I run mvn test -Dtest=PersoncontrollerTest I'm getting an > > > AssertionfailedError on the following line in PersonControllerTest: > > > > > > assertNotNull(m.get("personList")); > > > > > > Is there another configuration setting that I've overlooked? > > > > > > Thanks; > > > > > > Marshall > > > > > > ________________________________ > > > Finding fabulous fares is fun. > > > Let Yahoo! FareChase search your favorite travel sites to find flight > and > > > hotel bargains. > > > > > > > > > > > > -- > > http://raibledesigns.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [hidden email] > > For additional commands, e-mail: [hidden email] > > > > > > > > > > ________________________________ > > Park yourself in front of a world of choices in alternative vehicles. > > Visit the Yahoo! Auto Green Center. > > > > > > > -- > http://raibledesigns.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [hidden email] > For additional commands, e-mail: [hidden email] > > > > > Shape Yahoo! in your own image. Join our Network Research Panel today! > http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 > hot CTA = Join our Network Research Panel -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
marshall-14
|
Interestingly, when I debug the ModelMap, the object has null values. Matt Raible <[hidden email]> wrote: If you print out the contents of ModelMap, what does it have in there?
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. |
||||||||||||||||
|
mraible
|
What happens if you use new ModelAndView().addAllObjects() - do you
get the same error? Matt On 5/22/07, marshall <[hidden email]> wrote: > Interestingly, when I debug the ModelMap, the object has null values. > > Matt Raible <[hidden email]> wrote: > If you print out the contents of ModelMap, what does it have in there? > You might try debugging your test and setting a breakpoint to > inspect. > > Matt > > On 5/22/07, marshall wrote: > > Sure; > > > > Here it is: > > > > package com.ss.webapp.controller; > > > > > > import javax.servlet.http.HttpServletRequest; > > import javax.servlet.http.HttpServletResponse; > > > > import org.apache.commons.logging.Log; > > import org.apache.commons.logging.LogFactory; > > import org.appfuse.service.GenericManager; > > import com.socialsplendor.relisting.model.Person; > > > > import org.springframework.web.servlet.ModelAndView; > > import org.springframework.web.servlet.mvc.Controller; > > > > > > public class PersonController implements Controller { > > > > private final Log log = LogFactory.getLog(PersonController.class); > > private GenericManager personManager = null; > > > > public void setPersonManager(GenericManager > > personManager) { > > this.personManager = personManager; > > } > > > > public ModelAndView handleRequest(HttpServletRequest > > request, HttpServletResponse response) throws Exception { > > log.debug("entering 'handleRequest' method..."); > > > > return new ModelAndView().addObject(personManager.getAll()); > > } > > } > > > > > > Marshall > > > > > > Matt Raible wrote: > > The problem likely occurs in PersonController.java - can you post the > > code for that? > > > > Thanks, > > > > Matt > > > > On 5/22/07, marshall wrote: > > > Sure Matt; > > > > > > I'll include a few things just in case, starting with the > > > PersonControllerTest class: > > > > > > package com.ss.webapp.controller; > > > > > > import java.util.List; > > > import > > > org.appfuse.webapp.controller.BaseControllerTestCase; > > > import org.springframework.ui.ModelMap; > > > import org.springframework.web.servlet.ModelAndView; > > > > > > public class PersonControllerTest extends BaseControllerTestCase { > > > private PersonController c; > > > > > > public void setPersonController(PersonController c) { > > > this.c = c; > > > } > > > > > > public void testHandleRequest() throws Exception { > > > ModelAndView mav = c.handleRequest(null, null); > > > ModelMap m = mav.getModelMap(); > > > assertNotNull(m.get("personList")); > > > assertTrue(((List) m.get("personList")).size() > 0); > > > } > > > } > > > > > > and the core/src/main/resources/applicationContext.xml > > > > > > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > > > > xsi:schemaLocation="http://www.springframework.org/schema/beans > > > > > > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> > > > > > > > class="org.appfuse.service.impl.GenericManagerImpl"> > > > > > > > autowire="byType"> > > > > > > > > > > > > > > > > > > > > > > > > and my dispatcher-servlet.xml configuration for personController: > > > > > > > class="com.ss.webapp.controller.PersonController"> > > > > > > > > > > > > I hope this if enough information for you. > > > > > > thanks; > > > > > > Marshall > > > > > > Matt Raible wrote: > > > What does the handleRequest() method of your PersonController look like? > > > > > > Matt > > > > > > On 5/22/07, marshall wrote: > > > > Hey all; > > > > > > > > I'm pretty new to appfuse. I'm going thru the tutorial, using a > modular > > > > spring MVC archetype. I've created a PersonController and > > > > PersonControllerTest in the respective directories in the web/ > > component. > > > > I've also modified the dispatcher-servlet.xml for the proper mapping. > > > > When I run mvn test -Dtest=PersoncontrollerTest I'm getting an > > > > AssertionfailedError on the following line in PersonControllerTest: > > > > > > > > assertNotNull(m.get("personList")); > > > > > > > > Is there another configuration setting that I've overlooked? > > > > > > > > Thanks; > > > > > > > > Marshall > > > > > > > > ________________________________ > > > > Finding fabulous fares is fun. > > > > Let Yahoo! FareChase search your favorite travel sites to find flight > > and > > > > hotel bargains. > > > > > > > > > > > > > > > > > -- > > > http://raibledesigns.com > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [hidden email] > > > For additional commands, e-mail: [hidden email] > > > > > > > > > > > > > > > ________________________________ > > > Park yourself in front of a world of choices in alternative vehicles. > > > Visit the Yahoo! Auto Green Center. > > > > > > > > > > > > -- > > http://raibledesigns.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [hidden email] > > For additional commands, e-mail: [hidden email] > > > > > > > > > > Shape Yahoo! in your own image. Join our Network Research Panel today! > > > http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 > > hot CTA = Join our Network Research Panel > > > -- > http://raibledesigns.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [hidden email] > For additional commands, e-mail: [hidden email] > > > > > ________________________________ > Looking for a deal? Find great prices on flights and hotels with Yahoo! > FareChase. > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
marshall-14
|
Hmm; Matt, this may be where my naivete shows itself. I could add something like the following to PersonController's handleRequest method as you suggest below: return new ModelAndView().addAllObjects(personManager.getAll()); I also tested the contents of personManager as follows: List list = personManager.getAll(); Iterator i = list.iterator(); System.out.println("printing personManager's contents: " + list.size()); The list size comes back as zero. I can try setting more breakpoints, but at this point I'm feeling that maybe I'm missing some
configuration step? My config is below. Again, the ApplicationContext.xml is: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="personManager" class="org.appfuse.service.impl.GenericManagerImpl"> <constructor-arg> <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate" autowire="byType"> <constructor-arg value="com.ss.relisting.model.Person"/> </bean> </constructor-arg> </bean> </beans> Perhaps I could look at the tutorial example code and try a comparison of the files. Regards; What happens if you use new ModelAndView().addAllObjects() - do you
Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. |
||||||||||||||||
|
mraible
|
Do you have any Person records in your database? Maybe you forgot to
add them into sample-data.xml? You could manually add some as part of your test using PersonManager.save(). Matt On 5/24/07, marshall <[hidden email]> wrote: > Hmm; > > Matt, this may be where my naivete shows itself. I could add something like > the following to PersonController's handleRequest method as you suggest > below: > > return new ModelAndView().addAllObjects(personManager.getAll()); > > I also tested the contents of personManager as follows: > > List list = personManager.getAll(); > Iterator i = list.iterator(); > System.out.println("printing personManager's contents: " + list.size()); > > The list size comes back as zero. I can try setting more breakpoints, but at > this point I'm feeling that maybe I'm missing some configuration step? My > config is below. Again, the ApplicationContext.xml is: > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> > > <bean id="personManager" > class="org.appfuse.service.impl.GenericManagerImpl"> > <constructor-arg> > <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate" > autowire="byType"> > <constructor-arg value="com.ss.relisting.model.Person"/> > </bean> > </constructor-arg> > </bean> > > </beans> > > Perhaps I could look at the tutorial example code and try a comparison of > the files. > > Regards; > > Marshall > > Matt Raible <[hidden email]> wrote: > What happens if you use new ModelAndView().addAllObjects() - do you > get the same error? > > Matt > > On 5/22/07, marshall wrote: > > Interestingly, when I debug the ModelMap, the object has null values. > > > > Matt Raible wrote: > > If you print out the contents of ModelMap, what does it have in there? > > You might try debugging your test and setting a breakpoint to > > inspect. > > > > Matt > > > > On 5/22/07, marshall wrote: > > > Sure; > > > > > > Here it is: > > > > > > package com.ss.webapp.controller; > > > > > > > > > import javax.servlet.http.HttpServletRequest; > > > import javax.servlet.http.HttpServletResponse; > > > > > > import org.apache.commons.logging.Log; > > > import org.apache.commons.logging.LogFactory; > > > import org.appfuse.service.GenericManager; > > > import com.socialsplendor.relisting.model.Person; > > > > > > import org.springframework.web.servlet.ModelAndView; > > > import org.springframework.web.servlet.mvc.Controller; > > > > > > > > > public class PersonController implements Controller { > > > > > > private final Log log = LogFactory.getLog(PersonController.class); > > > private GenericManager personManager = null; > > > > > > public void setPersonManager(GenericManager > > > personManager) { > > > this.personManager = personManager; > > > } > > > > > > public ModelAndView handleRequest(HttpServletRequest > > > request, HttpServletResponse response) throws Exception { > > > log.debug("entering 'handleRequest' method..."); > > > > > > return new ModelAndView().addObject(personManager.getAll()); > > > } > > > } > > > > > > > > > Marshall > > > > > > > > > Matt Raible wrote: > > > The problem likely occurs in PersonController.java - can you post the > > > code for that? > > > > > > Thanks, > > > > > > Matt > > > > > > On 5/22/07, marshall wrote: > > > > Sure Matt; > > > > > > > > I'll include a few things just in case, starting with the > > > > PersonControllerTest class: > > > > > > > > package com.ss.webapp.controller; > > > > > > > > import java.util.List; > > > > import > > > > org.appfuse.webapp.controller.BaseControllerTestCase; > > > > import org.springframework.ui.ModelMap; > > > > import org.springframework.web.servlet.ModelAndView; > > > > > > > > public class PersonControllerTest extends BaseControllerTestCase { > > > > private PersonController c; > > > > > > > > public void setPersonController(PersonController c) { > > > > this.c = c; > > > > } > > > > > > > > public void testHandleRequest() throws Exception { > > > > ModelAndView mav = c.handleRequest(null, null); > > > > ModelMap m = mav.getModelMap(); > > > > assertNotNull(m.get("personList")); > > > > assertTrue(((List) m.get("personList")).size() > 0); > > > > } > > > > } > > > > > > > > and the > core/src/main/resources/applicationContext.xml > > > > > > > > > > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > > > > > > > > xsi:schemaLocation="http://www.springframework.org/schema/beans > > > > > > > > > > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> > > > > > > > > > > class="org.appfuse.service.impl.GenericManagerImpl"> > > > > > > > > > autowire="byType"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and my dispatcher-servlet.xml configuration for personController: > > > > > > > > > class="com.ss.webapp.controller.PersonController"> > > > > > > > > > > > > > > > > I hope this if enough information for you. > > > > > > > > thanks; > > > > > > > > Marshall > > > > > > > > Matt Raible wrote: > > > > What does the handleRequest() method of your PersonController look > like? > > > > > > > > Matt > > > > > > > > On 5/22/07, marshall wrote: > > > > > Hey all; > > > > > > > > > > I'm pretty new to appfuse. I'm going thru the tutorial, using a > > modular > > > > > spring MVC archetype. I've created a PersonController and > > > > > PersonControllerTest in the respective directories in the web/ > > > component. > > > > > I've also modified the dispatcher-servlet.xml for the proper > mapping. > > > > > When I run mvn test -Dtest=PersoncontrollerTest I'm getting an > > > > > AssertionfailedError on the following line in PersonControllerTest: > > > > > > > > > > assertNotNull(m.get("personList")); > > > > > > > > > > Is there another configuration setting that I've overlooked? > > > > > > > > > > Thanks; > > > > > > > > > > Marshall > > > > > > > > > > ________________________________ > > > > > Finding fabulous fares is fun. > > > > > Let Yahoo! FareChase search your favorite travel sites to find > flight > > > and > > > > > hotel bargains. > > > > > > > > > > > > > > > > > > > > > > -- > > > > http://raibledesigns.com > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > > > [hidden email] > > > > For additional commands, e-mail: [hidden email] > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > Park yourself in front of a world of choices in alternative vehicles. > > > > Visit the Yahoo! Auto Green Center. > > > > > > > > > > > > > > > > > -- > > > http://raibledesigns.com > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [hidden email] > > > For additional commands, e-mail: [hidden email] > > > > > > > > > > > > > > > Shape Yahoo! in your own image. Join our Network Research Panel today! > > > > > > http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 > > > hot CTA = Join our Network Research Panel > > > > > > -- > > http://raibledesigns.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [hidden email] > > For additional commands, e-mail: [hidden email] > > > > > > > > > > ________________________________ > > Looking for a deal? Find great prices on flights and hotels with Yahoo! > > FareChase. > > > > > > > -- > http://raibledesigns.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [hidden email] > For additional commands, e-mail: [hidden email] > > > > > ________________________________ > Expecting? Get great news right away with email Auto-Check. > Try the Yahoo! Mail Beta. > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
|
marshall-14
|
In reply to this post
by marshall-14
Hey Matt; I've tried comparing my version with the tutorial-spring code and I don't see any difference. The java classes are the same. The configs all look good too. I'm wondering if this is a potential modular issue? Your tutorial runs fine with the tests passing. I've added data to the person table and to the sample-data.xml file and the assertion error still occurs. At this point, I'm not sure what else I can do to look into the issue. If you've any other ideas, I'd appreciate it. Thanks. Regards;
|
||||||||||||||||
|
mraible
|
Did you add sample data to both sample-data.xml files? There's one in
each project. Unfortunately, I haven't figured out a better way to do this, although you may be able to point the web project's dbunit configuration to the core project. Matt On 5/25/07, marshall <[hidden email]> wrote: > Hey Matt; > > I've tried comparing my version with the tutorial-spring code and I don't > see any difference. The java classes are the same. The configs all look good > too. > I'm wondering if this is a potential modular issue? > Your tutorial runs fine with the tests passing. > > I've added data to the person table and to the sample-data.xml file and the > assertion error still occurs. At this point, I'm not sure what else I can do > to look into the issue. If you've any other ideas, I'd appreciate it. > Thanks. > > Regards; > > Marshall > > marshall <[hidden email]> wrote: > > > Hmm; > > Matt, this may be where my naivete shows itself. I could add something like > the following to PersonController's handleRequest method as you suggest > below: > > return new ModelAndView().addAllObjects(personManager.getAll()); > > I also tested the contents of personManager as follows: > > List list = personManager.getAll(); > Iterator i = list.iterator(); > System.out.println("printing personManager's contents: " + list.size()); > > The list size comes back as zero. I can try setting more breakpoints, but at > this point I'm feeling that maybe I'm missing some configuration step? My > config is below. Again, the ApplicationContext.xml is: > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> > > <bean id="personManager" > class="org.appfuse.service.impl.GenericManagerImpl"> > <constructor-arg> > <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate" > autowire="byType"> > <constructor-arg value="com.ss.relisting.model.Person"/> > </bean> > </constructor-arg> > </bean> > > </beans> > > Perhaps I could look at the tutorial example code and try a comparison of > the files. > > Regards; > > Marshall > > Matt Raible <[hidden email]> wrote: > What happens if you use new ModelAndView().addAllObjects() - do you > get the same error? > > Matt > > On 5/22/07, marshall wrote: > > Interestingly, when I debug the ModelMap, the object has null values. > > > > Matt Raible wrote: > > If you print out the contents of ModelMap, what does it have in there? > > You might try debugging your test and setting a breakpoint to > > inspect. > > > > Matt > > > > On 5/22/07, marshall wrote: > > > Sure; > > > > > > Here it is: > > > > > > package com.ss.webapp.controller; > > > > > > > > > import javax.servlet.http.HttpServletRequest; > > > import javax.servlet.http.HttpServletResponse; > > > > > > import org.apache.commons.logging.Log; > > > import org.apache.commons.logging.LogFactory; > > > import org.appfuse.service.GenericManager; > > > import com.socialsplendor.relisting.model.Person; > > > > > > import org.springframework.web.servlet.ModelAndView; > > > import org.springframework.web.servlet.mvc.Controller; > > > > > > > > > public class PersonController implements Controller { > > > > > > private final Log log = LogFactory.getLog(PersonController.class); > > > private GenericManager personManager = null; > > > > > > public void setPersonManager(GenericManager > > > personManager) { > > > this.personManager = personManager; > > > } > > > > > > public ModelAndView handleRequest(HttpServletRequest > > > request, HttpServletResponse response) throws Exception { > > > log.debug("entering 'handleRequest' method..."); > > > > > > return new ModelAndView().addObject(personManager.getAll()); > > > } > > > } > > > > > > > > > Marshall > > > > > > > > > Matt Raible wrote: > > > The problem likely occurs in PersonController.java - can you post the > > > code for that? > > > > > > Thanks, > > > > > > Matt > > > > > > On 5/22/07, marshall wrote: > > > > Sure Matt; > > > > > > > > I'll include a few things just in case, starting with the > > > > PersonControllerTest class: > > > > > > > > package com.ss.webapp.controller; > > > > > > > > import java.util.List; > > > > import > > > > org.appfuse.webapp.controller.BaseControllerTestCase; > > > > import org.springframework.ui.ModelMap; > > > > import org.springframework.web.servlet.ModelAndView; > > > > > > > > public class PersonControllerTest extends BaseControllerTestCase { > > > > private PersonController c; > > > > > > > > public void setPersonController(PersonController c) { > > > > this.c = c; > > > > } > > > > > > > > public void testHandleRequest() throws Exception { > > > > ModelAndView mav = c.handleRequest(null, null); > > > > ModelMap m = mav.getModelMap(); > > > > assertNotNull(m.get("personList")); > > > > assertTrue(((List) m.get("personList")).size() > 0); > > > > } > > > > } > > > > > > > > and the > core/src/main/resources/applicationContext.xml > > > > > > > > > > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > > > > > > > > xsi:schemaLocation="http://www.springframework.org/schema/beans > > > > > > > > > > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> > > > > > > > > > > class="org.appfuse.service.impl.GenericManagerImpl"> > > > > > > > > > autowire="byType"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and my dispatcher-servlet.xml configuration for personController: > > > > > > > > > class="com.ss.webapp.controller.PersonController"> > > > > > > > > > > > > > > > > I hope this if enough information for you. > > > > > > > > thanks; > > > > > > > > Marshall > > > > > > > > Matt Raible wrote: > > > > What does the handleRequest() method of your PersonController look > like? > > > > > > > > Matt > > > > > > > > On 5/22/07, marshall wrote: > > > > > Hey all; > > > > > > > > > > I'm pretty new to appfuse. I'm going thru the tutorial, using a > > modular > > > > > spring MVC archetype. I've created a PersonController and > > > > > PersonControllerTest in the respective directories in the web/ > > > component. > > > > > I've also modified the dispatcher-servlet.xml for the proper > mapping. > > > > > When I run mvn test -Dtest=PersoncontrollerTest I'm getting an > > > > > AssertionfailedError on the following line in PersonControllerTest: > > > > > > > > > > assertNotNull(m.get("personList")); > > > > > > > > > > Is there another configuration setting that I've overlooked? > > > > > > > > > > Thanks; > > > > > > > > > > Marshall > > > > > > > > > > ________________________________ > > > > > Finding fabulous fares is fun. > > > > > Let Yahoo! FareChase search your favorite travel sites to find > flight > > > and > > > > > hotel bargains. > > > > > > > > > > > > > > > > > > > > > > -- > > > > http://raibledesigns.com > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > > > [hidden email] > > > > For additional commands, e-mail: [hidden email] > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > Park yourself in front of a world of choices in alternative vehicles. > > > > Visit the Yahoo! Auto Green Center. > > > > > > > > > > > > > > > > > -- > > > http://raibledesigns.com > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [hidden email] > > > For additional commands, e-mail: [hidden email] > > > > > > > > > > > > > > > Shape Yahoo! in your own image. Join our Network Research Panel today! > > > > > > http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 > > > hot CTA = Join our Network Research Panel > > > > > > -- > > http://raibledesigns.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [hidden email] > > For additional commands, e-mail: [hidden email] > > > > > > > > > > ________________________________ > > Looking for a deal? Find great prices on flights and hotels with Yahoo! > > FareChase. > > > > > > > -- > http://raibledesigns.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [hidden email] > For additional commands, e-mail: [hidden email] > > > > ________________________________ > Expecting? Get great news right away with email Auto-Check. > Try the Yahoo! Mail Beta. > > > ________________________________ > Got a little couch potato? > Check out fun summer activities for kids. > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |