|
View:
New views
15 Messages
—
Rating Filter:
Alert me
|
|
|
Problem with jetty:run in Tapestry basic archetypeHi,
I'm running into the following error on certain tapestry pages after login, including MainMenu. It looks as if the hivemind/spring wiring is broken. The app runs fine with jetty:run-war. [ +/- ] Exception: Error at context:/WEB-INF/tapestry/mainMenu.page, line 9, column 72: Error adding property userManager to class org.appfuse.webapp.pages.MainMenu: Error at context:/WEB-INF/tapestry/mainMenu.page, line 9, column 72: Unable to create injected property userManager: injection type 'spring' is not defined. org.apache.hivemind.ApplicationRuntimeException Error at context:/WEB-INF/tapestry/mainMenu.page, line 9, column 72: Error adding property userManager to class org.appfuse.webapp.pages.MainMenu: Error at context:/WEB-INF/tapestry/mainMenu.page, line 9, column 72: Unable to create injected property userManager: injection type 'spring' is not defined. Edit Profile, View Users, Reload Options all produce similar errors, probably related to the above: [ +/- ] Exception: There was an error borrowing the page with key PageKey[_pageName='mainMenu' , _locale=en_US ] from the page pool. org.apache.hivemind.ApplicationRuntimeException There was an error borrowing the page with key PageKey[_pageName='mainMenu' , _locale=en_US ] from the page pool. location: Annotation @org.apache.tapestry.annotations.InjectPage(value=mainMenu) of public abstract org.appfuse.webapp.pages.MainMenu org.appfuse.webapp.pages.BasePage.getMainMenu() [ +/- ] Exception: Error: An error occured processing annotation @org.apache.tapestry.annotations.InjectPage(value=mainMenu) of public abstract org.appfuse.webapp.pages.MainMenu org.appfuse.webapp.pages.BasePage.getMainMenu(): Property mainMenu has already been accounted for by the element at Annotation @org.apache.tapestry.annotations.InjectPage(value=mainMenu) of public abstract org.appfuse.webapp.pages.MainMenu org.appfuse.webapp.pages.BasePage.getMainMenu(). org.apache.hivemind.ApplicationRuntimeException Error: An error occured processing annotation @org.apache.tapestry.annotations.InjectPage(value=mainMenu) of public abstract org.appfuse.webapp.pages.MainMenu org.appfuse.webapp.pages.BasePage.getMainMenu(): Property mainMenu has already been accounted for by the element at Annotation @org.apache.tapestry.annotations.InjectPage(value=mainMenu) of public abstract org.appfuse.webapp.pages.MainMenu org.appfuse.webapp.pages.BasePage.getMainMenu(). To reproduce: 1. mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-tapestry -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject 2. cd myproject and run mvn (Fails on following error, but this seems consistent with struts2-basic) [echo] Testing 'myproject-1.0-SNAPSHOT' with locale 'en' Login: [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error executing ant tasks Embedded error: The following error occurred while executing this line: C:\app\test\myproject\src\test\resources\login.xml:1: Step[invoke "get Login Page" (1/6)]: HTTP error 400, at: invoke 3. mvn jetty:run-war and app works fine 4. mvn war:inplace 5. delete src/main/webapp/WEB-INF/classes & src/main/webapp/WEB-INF/lib. Omit either of these and jetty:run fails. 6. mvn jetty:run 7. hit http://localhost:8080 to see errors I'm running appfuse 2.0, on WinXP --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Problem with jetty:run in Tapestry basic archetypeThat's certainly a strange one. I was able to reproduce it, but have
no idea how to fix it. jetty:run-war works fine, as does tomcat:run. I don't think tomcat:run does directory scanning and auto-reloading, so I don't know if it's as good as the Jetty plugin. Here's the configuration for it: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.0-alpha-1</version> <configuration> <path>/</path> </configuration> </plugin> Matt On 9/19/07, Mark Rosenthal <mrosent@...> wrote: > Hi, > > I'm running into the following error on certain tapestry pages after > login, including MainMenu. It looks as if the hivemind/spring wiring > is broken. The app runs fine with jetty:run-war. > > > [ +/- ] Exception: Error at > context:/WEB-INF/tapestry/mainMenu.page, line 9, column 72: Error > adding property userManager to class > org.appfuse.webapp.pages.MainMenu: Error at > context:/WEB-INF/tapestry/mainMenu.page, line 9, column 72: Unable to > create injected property userManager: injection type 'spring' is not > defined. > org.apache.hivemind.ApplicationRuntimeException > Error at context:/WEB-INF/tapestry/mainMenu.page, line 9, column > 72: Error adding property userManager to class > org.appfuse.webapp.pages.MainMenu: Error at > context:/WEB-INF/tapestry/mainMenu.page, line 9, column 72: Unable to > create injected property userManager: injection type 'spring' is not > defined. > > Edit Profile, View Users, Reload Options all produce similar errors, > probably related to the above: > > [ +/- ] Exception: There was an error borrowing the page with > key PageKey[_pageName='mainMenu' , _locale=en_US ] from the page pool. > org.apache.hivemind.ApplicationRuntimeException > There was an error borrowing the page with key > PageKey[_pageName='mainMenu' , _locale=en_US ] from the page pool. > location: Annotation > @org.apache.tapestry.annotations.InjectPage(value=mainMenu) of public > abstract org.appfuse.webapp.pages.MainMenu > org.appfuse.webapp.pages.BasePage.getMainMenu() > [ +/- ] Exception: Error: An error occured processing > annotation @org.apache.tapestry.annotations.InjectPage(value=mainMenu) > of public abstract org.appfuse.webapp.pages.MainMenu > org.appfuse.webapp.pages.BasePage.getMainMenu(): Property mainMenu has > already been accounted for by the element at Annotation > @org.apache.tapestry.annotations.InjectPage(value=mainMenu) of public > abstract org.appfuse.webapp.pages.MainMenu > org.appfuse.webapp.pages.BasePage.getMainMenu(). > org.apache.hivemind.ApplicationRuntimeException > Error: An error occured processing annotation > @org.apache.tapestry.annotations.InjectPage(value=mainMenu) of public > abstract org.appfuse.webapp.pages.MainMenu > org.appfuse.webapp.pages.BasePage.getMainMenu(): Property mainMenu has > already been accounted for by the element at Annotation > @org.apache.tapestry.annotations.InjectPage(value=mainMenu) of public > abstract org.appfuse.webapp.pages.MainMenu > org.appfuse.webapp.pages.BasePage.getMainMenu(). > > > > To reproduce: > > 1. mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes > -DarchetypeArtifactId=appfuse-basic-tapestry > -DremoteRepositories=http://static.appfuse.org/releases > -DarchetypeVersion=2.0 -DgroupId=com.mycompany.app > -DartifactId=myproject > > 2. cd myproject and run mvn (Fails on following error, but this seems > consistent with struts2-basic) > [echo] Testing 'myproject-1.0-SNAPSHOT' with locale 'en' > Login: > [INFO] ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] ------------------------------------------------------------------------ > [INFO] Error executing ant tasks > Embedded error: The following error occurred while executing this line: > C:\app\test\myproject\src\test\resources\login.xml:1: Step[invoke "get > Login Page" (1/6)]: HTTP error 400, at: invoke > > 3. mvn jetty:run-war and app works fine > > 4. mvn war:inplace > > 5. delete src/main/webapp/WEB-INF/classes & > src/main/webapp/WEB-INF/lib. Omit either of these and jetty:run > fails. > > 6. mvn jetty:run > > 7. hit http://localhost:8080 to see errors > > I'm running appfuse 2.0, on WinXP > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Problem with jetty:run in Tapestry basic archetypeFWIW, I've posted this to the Tapestry users mailing list:
http://www.nabble.com/Problem-with-jetty%3Arun-when-using-Tapestry-4.1.3-tf4489399.html#a12805568 Matt
|
|
|
Re: Problem with jetty:run in Tapestry basic archetype
Outstanding, Matt! I can continue development with frequent restarts,
but it'll be so much nicer to have directory scanning and
auto-reloading. I'm new to the world of Maven, and find it somewhat
frustrating to not see what's going on under the covers. In the
meantime, I'll give tomcat:run a go.
mraible wrote: FWIW, I've posted this to the Tapestry users mailing list: http://www.nabble.com/Problem-with-jetty%3Arun-when-using-Tapestry-4.1.3-tf4489399.html#a12805568 Matt mraible wrote: |
|
|
Re: Problem with jetty:run in Tapestry basic archetypeMatt and Mark,
I think I may have isolated the problem here (if not completely solved it). Because the code works as advertised when running jetty:run-war (and tomcat:run), it has to be something to do with the way packaging works for the container that causes the problem. So, after looking at this page: http://static.appfuse.org/appfuse-tapestry/dependencies.html And comparing that with my pom, I noticed that I had scope="compile" for tapestry-spring and scope="runtime" for tapestry-flash. Then it dawned on me, I'd changed the scope for tapestry-spring in an earlier attempt to hunt down this problem. What made me twig was the fact that the problem reported by tapestry had *moved* from not knowing about "type='spring'", to not knowing about "persist='flash'". Changing the scope from "runtime" to "compile" time for both tapestry-spring and tapestry-flash in the web/pom.xml allowed jetty:run to work. Wow, that took me a lot longer to work through than I had hoped, but at least it's fixed. I can't say I know *why* changing the scope from runtime to compile makes jetty:run work, but I'll leave that for another day. Regards, M@
|
|
|
Re: Problem with jetty:run in Tapestry basic archetypeCan you please enter an issue for this in JIRA so we can solve this
before the next release? http://issues.appfuse.org/browse/APF Thanks, Matt On Nov 20, 2007, at 8:18 PM, Matthew Sinclair wrote: > > Matt and Mark, > > I think I may have isolated the problem here (if not completely > solved it). > Because the code works as advertised when running jetty:run-war (and > tomcat:run), it has to be something to do with the way packaging > works for > the container that causes the problem. So, after looking at this page: > > http://static.appfuse.org/appfuse-tapestry/dependencies.html > > And comparing that with my pom, I noticed that I had > scope="compile" for > tapestry-spring and scope="runtime" for tapestry-flash. Then it > dawned on > me, I'd changed the scope for tapestry-spring in an earlier attempt > to hunt > down this problem. What made me twig was the fact that the problem > reported > by tapestry had *moved* from not knowing about "type='spring'", to not > knowing about "persist='flash'". > > Changing the scope from "runtime" to "compile" time for both > tapestry-spring > and tapestry-flash in the web/pom.xml allowed jetty:run to work. > > Wow, that took me a lot longer to work through than I had hoped, > but at > least it's fixed. I can't say I know *why* changing the scope from > runtime > to compile makes jetty:run work, but I'll leave that for another day. > > Regards, > M@ > > > Mark Rosenthal-2 wrote: >> >> Outstanding, Matt! I can continue development with frequent >> restarts, >> but it'll be so much nicer to have directory scanning and >> auto-reloading. I'm new to the world of Maven, and find it somewhat >> frustrating to not see what's going on under the covers. In the >> meantime, I'll give tomcat:run a go. >> >> mraible wrote: >>> FWIW, I've posted this to the Tapestry users mailing list: >>> http://www.nabble.com/Problem-with-jetty%3Arun-when-using- >>> Tapestry-4.1.3-tf4489399.html#a12805568 >>> >>> Matt >> > > -- > View this message in context: http://www.nabble.com/Problem-with- > jetty%3Arun-in-Tapestry-basic-archetype-tf4485474s2369.html#a13870256 > Sent from the AppFuse - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Problem with jetty:run in Tapestry basic archetypehi together,
unfortunatley this doesn't work for me. in which specific pom i have to do this changes!? i have upto 5 pom's (wich tapestry-spring, tapestry-flash entries) in my target and 1 in my src folder. i've changed all specific entries from "runtime" to compile, but i still get the error. are there any more requried steps? thx for your help!
|
|
|
Re: Problem with jetty:run in Tapestry basic archetypeGood point about the pom - the one I made the change in was the root pom at the top level, above the "core" and "web" directories (in a tapestry-modular archetype). HTH, M@
|
|
|
Re: Problem with jetty:run in Tapestry basic archetypeokay.. i'm running a tapestry-basic app. after changing all pom's, i still have the problem. has anyone an idea?
|
|
|
Re: Problem with jetty:run in Tapestry basic archetypeHave you tried a mvn clean then full build after changing the pom files (as a note you should never change/need to change anything under target - target is Maven's work area so gets overwritten frequently).
Mike
On 11/23/07, traceon <traceon@...> wrote:
|
|
|
Re: Problem with jetty:run in Tapestry basic archetypethe point is, that i there are no "tapestry-flash, tapestry-spring" entries in my pom.xml under "myproject/pom.xml" which i can change from "runtime" to "compile". the entries only appear in the pom's under the target folder.
|
|
|
Re: Problem with jetty:run in Tapestry basic archetypeOn 11/23/07, traceon <traceon@...> wrote:
Then that explains it. Your entries are being inherited transitively through the appfuse-tapestry project. Point still stands though - changing anything under the target folder will have no effect on the build. What you will have to do to get things working is to copy the two dependencies from one of the
pom.xml files in target to the pom at the root of your project (assuming you are using a basic archetype). Change the scope of the dependency there and they will override the ones inherited transitively. Remember to do a clean before recompiling ...
Mike Mike Horwitz wrote: |
|
|
Re: Problem with jetty:run in Tapestry basic archetypei've done the following:
- run mvn package - copied changes (see below) from "myproject\target\myproject-1.0-SNAPSHOT\META-INF\maven\org.appfuse\appfuse-tapestry\pom.xml" to "myproject\pom.xml" - run mvn clean - run mvn package - open "myproject\target\myproject-1.0-SNAPSHOT\META-INF\maven\org.appfuse\appfuse-tapestry\pom.xml" tapestry-flash, tapestry-spring scope is still set to "runtime" and not (as specified in main pom.xml) to "compile". <dependency> <groupId>com.javaforge.tapestry</groupId> <artifactId>tapestry-flash</artifactId> <version>${tapestry.flash.version}</version> <scope>compile</scope> <exclusions> <exclusion> <groupId>tapestry</groupId> <artifactId>tapestry</artifactId> </exclusion> <exclusion> <groupId>tapestry</groupId> <artifactId>tapestry-annotations</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.javaforge.tapestry</groupId> <artifactId>tapestry-spring</artifactId> <version>${tapestry.spring.version}</version> <scope>compile</scope> <exclusions> <exclusion> <groupId>tapestry</groupId> <artifactId>tapestry</artifactId> </exclusion> <exclusion> <groupId>tapestry</groupId> <artifactId>tapestry-annotations</artifactId> </exclusion> </exclusions> </dependency> ... <properties> <!-- Application settings --> .... <tapestry.spring.version>1.0.0</tapestry.spring.version> <tapestry.flash.version>1.0.0</tapestry.flash.version> ...
|
|
|
Re: Problem with jetty:run in Tapestry basic archetypeOn 11/23/07, traceon <traceon@...> wrote:
This does not matter. The pom under target is not actually used for anything.
Mike. <dependency> |
|
|
Re: Problem with jetty:run in Tapestry basic archetypeMatt & M@,
Thanks for your work on this issue. I just upgraded to 2.01, and this works like a charm...
|
| Free embeddable forum powered by Nabble | Forum Help |