You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jeff Campbell (JIRA)" <ji...@apache.org> on 2011/09/12 21:57:08 UTC
[jira] [Created] (WICKET-4045) Calling wicketTester.clickLink(...)
on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
Calling wicketTester.clickLink(...) on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
------------------------------------------------------------------------------------------------------
Key: WICKET-4045
URL: https://issues.apache.org/jira/browse/WICKET-4045
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.5.0
Environment: Ubuntu Linux 11.04
Java 1.7
Reporter: Jeff Campbell
Priority: Blocker
When running a JUnit test and I call wicketTester.clickLink(...) on a StatlessLink in a 1.5.0 project, will cause a PageExpiredException, if I change the code back to Wicket 1.4.18 the code does NOT throw any exception and the test works as expected. This is marked BLOCKER because this bug causes all of our unit tests to fail when we migrate over to Wicket 1.5.0
Reproduce
1. I created a new Maven archetype project:
mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.0 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false
2. Add a link to HomePage.html
<a wicket:id="clickMeLink" href="#">Click Me</a>
3. Add a StatelessLink to HomePage.java
add(new StatelessLink("clickMeLink") {
@Override
public void onClick() {
System.out.println("Clicked!!");
setResponsePage(OtherPage.class);
}
});
4. Add a blank OtherPage.java and OtherPage.html
5. Add a JUnit test:
@Test
public void homepageRendersSuccessfully() {
//start and render the test page
tester.startPage(HomePage.class);
//assert rendered page class
tester.assertRenderedPage(HomePage.class);
tester.clickLink("clickMeLink"); // !!!!! "PageExpiredException" with Wicket 1.5.0
tester.assertRenderedPage(OtherPage.class);
}
6. Run "mvn install"
Results
An Test failure occurs with:
org.apache.wicket.protocol.http.PageExpiredException: Page expired.
at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:171)
at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:89)
at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:149)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:596)
at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:516)
at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:988)
at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1795)
at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1677)
at com.mycompany.TestHomePage.homepageRendersSuccessfully(TestHomePage.java:29)
Expected Results
No Test failures
Other Notes:
If I change the link from "StatelessLink" to "Link" then the Test will succeed (although this is NOT what we want to do... we want our pages to be Stateless)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4045) Calling
wicketTester.clickLink(...) on a StatelessLink causes
"PageExpiredException" with Wicket 1.5.0
Posted by "Jeff Campbell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103011#comment-13103011 ]
Jeff Campbell commented on WICKET-4045:
---------------------------------------
WHY IS THIS MARKED MINOR!!!??? This is NOT a minor loss of functionality. There is no work-around (except to remove your unit tests, which is NOT a workaround for production code!!!).
> Calling wicketTester.clickLink(...) on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
> ------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4045
> URL: https://issues.apache.org/jira/browse/WICKET-4045
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.0
> Environment: Ubuntu Linux 11.04
> Java 1.7
> Reporter: Jeff Campbell
> Priority: Minor
> Attachments: myproject.zip
>
>
> When running a JUnit test and I call wicketTester.clickLink(...) on a StatlessLink in a 1.5.0 project, will cause a PageExpiredException, if I change the code back to Wicket 1.4.18 the code does NOT throw any exception and the test works as expected. This is marked BLOCKER because this bug causes all of our unit tests to fail when we migrate over to Wicket 1.5.0
> Reproduce
> 1. I created a new Maven archetype project:
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.0 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false
> 2. Add a link to HomePage.html
> <a wicket:id="clickMeLink" href="#">Click Me</a>
> 3. Add a StatelessLink to HomePage.java
> add(new StatelessLink("clickMeLink") {
> @Override
> public void onClick() {
> System.out.println("Clicked!!");
> setResponsePage(OtherPage.class);
> }
> });
> 4. Add a blank OtherPage.java and OtherPage.html
> 5. Add a JUnit test:
> @Test
> public void homepageRendersSuccessfully() {
> //start and render the test page
> tester.startPage(HomePage.class);
> //assert rendered page class
> tester.assertRenderedPage(HomePage.class);
> tester.clickLink("clickMeLink"); // !!!!! "PageExpiredException" with Wicket 1.5.0
> tester.assertRenderedPage(OtherPage.class);
> }
> 6. Run "mvn install"
> Results
> An Test failure occurs with:
> org.apache.wicket.protocol.http.PageExpiredException: Page expired.
> at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:171)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:89)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:149)
> at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
> at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
> at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:596)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:516)
> at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:988)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1795)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1677)
> at com.mycompany.TestHomePage.homepageRendersSuccessfully(TestHomePage.java:29)
> Expected Results
> No Test failures
> Other Notes:
> If I change the link from "StatelessLink" to "Link" then the Test will succeed (although this is NOT what we want to do... we want our pages to be Stateless)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4045) Calling wicketTester.clickLink(...)
on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-4045:
----------------------------------
Priority: Minor (was: Blocker)
> Calling wicketTester.clickLink(...) on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
> ------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4045
> URL: https://issues.apache.org/jira/browse/WICKET-4045
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.0
> Environment: Ubuntu Linux 11.04
> Java 1.7
> Reporter: Jeff Campbell
> Priority: Minor
> Attachments: myproject.zip
>
>
> When running a JUnit test and I call wicketTester.clickLink(...) on a StatlessLink in a 1.5.0 project, will cause a PageExpiredException, if I change the code back to Wicket 1.4.18 the code does NOT throw any exception and the test works as expected. This is marked BLOCKER because this bug causes all of our unit tests to fail when we migrate over to Wicket 1.5.0
> Reproduce
> 1. I created a new Maven archetype project:
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.0 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false
> 2. Add a link to HomePage.html
> <a wicket:id="clickMeLink" href="#">Click Me</a>
> 3. Add a StatelessLink to HomePage.java
> add(new StatelessLink("clickMeLink") {
> @Override
> public void onClick() {
> System.out.println("Clicked!!");
> setResponsePage(OtherPage.class);
> }
> });
> 4. Add a blank OtherPage.java and OtherPage.html
> 5. Add a JUnit test:
> @Test
> public void homepageRendersSuccessfully() {
> //start and render the test page
> tester.startPage(HomePage.class);
> //assert rendered page class
> tester.assertRenderedPage(HomePage.class);
> tester.clickLink("clickMeLink"); // !!!!! "PageExpiredException" with Wicket 1.5.0
> tester.assertRenderedPage(OtherPage.class);
> }
> 6. Run "mvn install"
> Results
> An Test failure occurs with:
> org.apache.wicket.protocol.http.PageExpiredException: Page expired.
> at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:171)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:89)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:149)
> at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
> at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
> at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:596)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:516)
> at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:988)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1795)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1677)
> at com.mycompany.TestHomePage.homepageRendersSuccessfully(TestHomePage.java:29)
> Expected Results
> No Test failures
> Other Notes:
> If I change the link from "StatelessLink" to "Link" then the Test will succeed (although this is NOT what we want to do... we want our pages to be Stateless)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4045) Calling
wicketTester.clickLink(...) on a StatelessLink causes
"PageExpiredException" with Wicket 1.5.0
Posted by "Jeff Campbell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103767#comment-13103767 ]
Jeff Campbell commented on WICKET-4045:
---------------------------------------
I just verified the fix by building the sources and using wicket-core-1.5-SNAPSHOT
Thanks!!
> Calling wicketTester.clickLink(...) on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
> ------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4045
> URL: https://issues.apache.org/jira/browse/WICKET-4045
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.0
> Environment: Ubuntu Linux 11.04
> Java 1.7
> Reporter: Jeff Campbell
> Assignee: Martin Grigorov
> Priority: Minor
> Attachments: myproject.zip
>
>
> When running a JUnit test and I call wicketTester.clickLink(...) on a StatlessLink in a 1.5.0 project, will cause a PageExpiredException, if I change the code back to Wicket 1.4.18 the code does NOT throw any exception and the test works as expected. This is marked BLOCKER because this bug causes all of our unit tests to fail when we migrate over to Wicket 1.5.0
> Reproduce
> 1. I created a new Maven archetype project:
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.0 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false
> 2. Add a link to HomePage.html
> <a wicket:id="clickMeLink" href="#">Click Me</a>
> 3. Add a StatelessLink to HomePage.java
> add(new StatelessLink("clickMeLink") {
> @Override
> public void onClick() {
> System.out.println("Clicked!!");
> setResponsePage(OtherPage.class);
> }
> });
> 4. Add a blank OtherPage.java and OtherPage.html
> 5. Add a JUnit test:
> @Test
> public void homepageRendersSuccessfully() {
> //start and render the test page
> tester.startPage(HomePage.class);
> //assert rendered page class
> tester.assertRenderedPage(HomePage.class);
> tester.clickLink("clickMeLink"); // !!!!! "PageExpiredException" with Wicket 1.5.0
> tester.assertRenderedPage(OtherPage.class);
> }
> 6. Run "mvn install"
> Results
> An Test failure occurs with:
> org.apache.wicket.protocol.http.PageExpiredException: Page expired.
> at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:171)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:89)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:149)
> at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
> at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
> at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:596)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:516)
> at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:988)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1795)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1677)
> at com.mycompany.TestHomePage.homepageRendersSuccessfully(TestHomePage.java:29)
> Expected Results
> No Test failures
> Other Notes:
> If I change the link from "StatelessLink" to "Link" then the Test will succeed (although this is NOT what we want to do... we want our pages to be Stateless)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4045) Calling
wicketTester.clickLink(...) on a StatelessLink causes
"PageExpiredException" with Wicket 1.5.0
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103286#comment-13103286 ]
Igor Vaynberg commented on WICKET-4045:
---------------------------------------
because it doesnt block people from developing apps or running them in production.
> Calling wicketTester.clickLink(...) on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
> ------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4045
> URL: https://issues.apache.org/jira/browse/WICKET-4045
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.0
> Environment: Ubuntu Linux 11.04
> Java 1.7
> Reporter: Jeff Campbell
> Priority: Minor
> Attachments: myproject.zip
>
>
> When running a JUnit test and I call wicketTester.clickLink(...) on a StatlessLink in a 1.5.0 project, will cause a PageExpiredException, if I change the code back to Wicket 1.4.18 the code does NOT throw any exception and the test works as expected. This is marked BLOCKER because this bug causes all of our unit tests to fail when we migrate over to Wicket 1.5.0
> Reproduce
> 1. I created a new Maven archetype project:
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.0 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false
> 2. Add a link to HomePage.html
> <a wicket:id="clickMeLink" href="#">Click Me</a>
> 3. Add a StatelessLink to HomePage.java
> add(new StatelessLink("clickMeLink") {
> @Override
> public void onClick() {
> System.out.println("Clicked!!");
> setResponsePage(OtherPage.class);
> }
> });
> 4. Add a blank OtherPage.java and OtherPage.html
> 5. Add a JUnit test:
> @Test
> public void homepageRendersSuccessfully() {
> //start and render the test page
> tester.startPage(HomePage.class);
> //assert rendered page class
> tester.assertRenderedPage(HomePage.class);
> tester.clickLink("clickMeLink"); // !!!!! "PageExpiredException" with Wicket 1.5.0
> tester.assertRenderedPage(OtherPage.class);
> }
> 6. Run "mvn install"
> Results
> An Test failure occurs with:
> org.apache.wicket.protocol.http.PageExpiredException: Page expired.
> at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:171)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:89)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:149)
> at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
> at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
> at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:596)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:516)
> at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:988)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1795)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1677)
> at com.mycompany.TestHomePage.homepageRendersSuccessfully(TestHomePage.java:29)
> Expected Results
> No Test failures
> Other Notes:
> If I change the link from "StatelessLink" to "Link" then the Test will succeed (although this is NOT what we want to do... we want our pages to be Stateless)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (WICKET-4045) Calling
wicketTester.clickLink(...) on a StatelessLink causes
"PageExpiredException" with Wicket 1.5.0
Posted by "Jeff Campbell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103011#comment-13103011 ]
Jeff Campbell edited comment on WICKET-4045 at 9/13/11 1:48 AM:
----------------------------------------------------------------
Why is this marked minor? This is not a minor loss of functionality. There is no work-around (except to remove your unit tests, which is not a workaround for production code).
was (Author: jeffdcamp):
WHY IS THIS MARKED MINOR!!!??? This is NOT a minor loss of functionality. There is no work-around (except to remove your unit tests, which is NOT a workaround for production code!!!).
> Calling wicketTester.clickLink(...) on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
> ------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4045
> URL: https://issues.apache.org/jira/browse/WICKET-4045
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.0
> Environment: Ubuntu Linux 11.04
> Java 1.7
> Reporter: Jeff Campbell
> Priority: Minor
> Attachments: myproject.zip
>
>
> When running a JUnit test and I call wicketTester.clickLink(...) on a StatlessLink in a 1.5.0 project, will cause a PageExpiredException, if I change the code back to Wicket 1.4.18 the code does NOT throw any exception and the test works as expected. This is marked BLOCKER because this bug causes all of our unit tests to fail when we migrate over to Wicket 1.5.0
> Reproduce
> 1. I created a new Maven archetype project:
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.0 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false
> 2. Add a link to HomePage.html
> <a wicket:id="clickMeLink" href="#">Click Me</a>
> 3. Add a StatelessLink to HomePage.java
> add(new StatelessLink("clickMeLink") {
> @Override
> public void onClick() {
> System.out.println("Clicked!!");
> setResponsePage(OtherPage.class);
> }
> });
> 4. Add a blank OtherPage.java and OtherPage.html
> 5. Add a JUnit test:
> @Test
> public void homepageRendersSuccessfully() {
> //start and render the test page
> tester.startPage(HomePage.class);
> //assert rendered page class
> tester.assertRenderedPage(HomePage.class);
> tester.clickLink("clickMeLink"); // !!!!! "PageExpiredException" with Wicket 1.5.0
> tester.assertRenderedPage(OtherPage.class);
> }
> 6. Run "mvn install"
> Results
> An Test failure occurs with:
> org.apache.wicket.protocol.http.PageExpiredException: Page expired.
> at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:171)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:89)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:149)
> at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
> at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
> at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:596)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:516)
> at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:988)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1795)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1677)
> at com.mycompany.TestHomePage.homepageRendersSuccessfully(TestHomePage.java:29)
> Expected Results
> No Test failures
> Other Notes:
> If I change the link from "StatelessLink" to "Link" then the Test will succeed (although this is NOT what we want to do... we want our pages to be Stateless)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (WICKET-4045) Calling wicketTester.clickLink(...)
on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov reassigned WICKET-4045:
---------------------------------------
Assignee: Martin Grigorov
> Calling wicketTester.clickLink(...) on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
> ------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4045
> URL: https://issues.apache.org/jira/browse/WICKET-4045
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.0
> Environment: Ubuntu Linux 11.04
> Java 1.7
> Reporter: Jeff Campbell
> Assignee: Martin Grigorov
> Priority: Minor
> Attachments: myproject.zip
>
>
> When running a JUnit test and I call wicketTester.clickLink(...) on a StatlessLink in a 1.5.0 project, will cause a PageExpiredException, if I change the code back to Wicket 1.4.18 the code does NOT throw any exception and the test works as expected. This is marked BLOCKER because this bug causes all of our unit tests to fail when we migrate over to Wicket 1.5.0
> Reproduce
> 1. I created a new Maven archetype project:
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.0 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false
> 2. Add a link to HomePage.html
> <a wicket:id="clickMeLink" href="#">Click Me</a>
> 3. Add a StatelessLink to HomePage.java
> add(new StatelessLink("clickMeLink") {
> @Override
> public void onClick() {
> System.out.println("Clicked!!");
> setResponsePage(OtherPage.class);
> }
> });
> 4. Add a blank OtherPage.java and OtherPage.html
> 5. Add a JUnit test:
> @Test
> public void homepageRendersSuccessfully() {
> //start and render the test page
> tester.startPage(HomePage.class);
> //assert rendered page class
> tester.assertRenderedPage(HomePage.class);
> tester.clickLink("clickMeLink"); // !!!!! "PageExpiredException" with Wicket 1.5.0
> tester.assertRenderedPage(OtherPage.class);
> }
> 6. Run "mvn install"
> Results
> An Test failure occurs with:
> org.apache.wicket.protocol.http.PageExpiredException: Page expired.
> at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:171)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:89)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:149)
> at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
> at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
> at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:596)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:516)
> at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:988)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1795)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1677)
> at com.mycompany.TestHomePage.homepageRendersSuccessfully(TestHomePage.java:29)
> Expected Results
> No Test failures
> Other Notes:
> If I change the link from "StatelessLink" to "Link" then the Test will succeed (although this is NOT what we want to do... we want our pages to be Stateless)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4045) Calling wicketTester.clickLink(...)
on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
Posted by "Jeff Campbell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeff Campbell updated WICKET-4045:
----------------------------------
Attachment: myproject.zip
Attached is a sample project that will cause project tests FAIL.
to switch it back and forth from Wicket 1.4.18 and Wicket 1.5.0, simply comment/uncomment the dependency section of the pom.xml file (below the WICKET DEPENDENCIES section)
Switching the dependency to 1.4.18 will cause the project tests to SUCCEED
> Calling wicketTester.clickLink(...) on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
> ------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4045
> URL: https://issues.apache.org/jira/browse/WICKET-4045
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.0
> Environment: Ubuntu Linux 11.04
> Java 1.7
> Reporter: Jeff Campbell
> Priority: Blocker
> Attachments: myproject.zip
>
>
> When running a JUnit test and I call wicketTester.clickLink(...) on a StatlessLink in a 1.5.0 project, will cause a PageExpiredException, if I change the code back to Wicket 1.4.18 the code does NOT throw any exception and the test works as expected. This is marked BLOCKER because this bug causes all of our unit tests to fail when we migrate over to Wicket 1.5.0
> Reproduce
> 1. I created a new Maven archetype project:
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.0 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false
> 2. Add a link to HomePage.html
> <a wicket:id="clickMeLink" href="#">Click Me</a>
> 3. Add a StatelessLink to HomePage.java
> add(new StatelessLink("clickMeLink") {
> @Override
> public void onClick() {
> System.out.println("Clicked!!");
> setResponsePage(OtherPage.class);
> }
> });
> 4. Add a blank OtherPage.java and OtherPage.html
> 5. Add a JUnit test:
> @Test
> public void homepageRendersSuccessfully() {
> //start and render the test page
> tester.startPage(HomePage.class);
> //assert rendered page class
> tester.assertRenderedPage(HomePage.class);
> tester.clickLink("clickMeLink"); // !!!!! "PageExpiredException" with Wicket 1.5.0
> tester.assertRenderedPage(OtherPage.class);
> }
> 6. Run "mvn install"
> Results
> An Test failure occurs with:
> org.apache.wicket.protocol.http.PageExpiredException: Page expired.
> at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:171)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:89)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:149)
> at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
> at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
> at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:596)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:516)
> at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:988)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1795)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1677)
> at com.mycompany.TestHomePage.homepageRendersSuccessfully(TestHomePage.java:29)
> Expected Results
> No Test failures
> Other Notes:
> If I change the link from "StatelessLink" to "Link" then the Test will succeed (although this is NOT what we want to do... we want our pages to be Stateless)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-4045) Calling wicketTester.clickLink(...)
on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-4045.
-------------------------------------
Resolution: Duplicate
The fix for this problem is in WICKET-3991.
Current trunk works OK with the provided quickstart.
> Calling wicketTester.clickLink(...) on a StatelessLink causes "PageExpiredException" with Wicket 1.5.0
> ------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4045
> URL: https://issues.apache.org/jira/browse/WICKET-4045
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.0
> Environment: Ubuntu Linux 11.04
> Java 1.7
> Reporter: Jeff Campbell
> Assignee: Martin Grigorov
> Priority: Minor
> Attachments: myproject.zip
>
>
> When running a JUnit test and I call wicketTester.clickLink(...) on a StatlessLink in a 1.5.0 project, will cause a PageExpiredException, if I change the code back to Wicket 1.4.18 the code does NOT throw any exception and the test works as expected. This is marked BLOCKER because this bug causes all of our unit tests to fail when we migrate over to Wicket 1.5.0
> Reproduce
> 1. I created a new Maven archetype project:
> mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.5.0 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false
> 2. Add a link to HomePage.html
> <a wicket:id="clickMeLink" href="#">Click Me</a>
> 3. Add a StatelessLink to HomePage.java
> add(new StatelessLink("clickMeLink") {
> @Override
> public void onClick() {
> System.out.println("Clicked!!");
> setResponsePage(OtherPage.class);
> }
> });
> 4. Add a blank OtherPage.java and OtherPage.html
> 5. Add a JUnit test:
> @Test
> public void homepageRendersSuccessfully() {
> //start and render the test page
> tester.startPage(HomePage.class);
> //assert rendered page class
> tester.assertRenderedPage(HomePage.class);
> tester.clickLink("clickMeLink"); // !!!!! "PageExpiredException" with Wicket 1.5.0
> tester.assertRenderedPage(OtherPage.class);
> }
> 6. Run "mvn install"
> Results
> An Test failure occurs with:
> org.apache.wicket.protocol.http.PageExpiredException: Page expired.
> at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:171)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:89)
> at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:149)
> at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
> at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
> at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
> at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:596)
> at org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:516)
> at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:988)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1795)
> at org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:1677)
> at com.mycompany.TestHomePage.homepageRendersSuccessfully(TestHomePage.java:29)
> Expected Results
> No Test failures
> Other Notes:
> If I change the link from "StatelessLink" to "Link" then the Test will succeed (although this is NOT what we want to do... we want our pages to be Stateless)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira