Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6321521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:09:48+00:00 2026-05-24T16:09:48+00:00

I am developing an application in play and in my selenium tests I use

  • 0

I am developing an application in play and in my selenium tests I use several tags for repetitive tasks. Two tags are:

app/views/tags/loginAs.html

*{ Tag for running selenium tests when being logged in }*

#{if !_keepData}
#{braindumpFixture delete:'all', load:'users.yml' /}
#{/if}

#{selenium}
 ... some selenium code to log into the application
#{/selenium}

app/views/tags/braindumpFixture.html

%{
if(_delete == 'all') {
play.test.Fixtures.deleteAll()
} else if(_delete) {
play.test.Fixtures.delete(_delete)
}
}%

%{
if(_load) {
play.test.Fixtures.load(_load)
}
// finally make sure the index is correctly updated.
new application.jobs.CompleteReindexJob().doJob();
}%

These work without a problem in Play 1.1. After switching to play 1.2.2, I get the following exception when running a selenium test that uses loginAs:

test/selenium/AddCard.test.html

*{ Tests adding a simple card }*

#{loginAs login:'foobar@foobar.com', password:'foobar' /}

#{selenium}
open('@{Application.index()}')
... more selenium stuff here
#{/selenium}

The exception being:

play.exceptions.TemplateExecutionException: Cannot get property 'data' on null object
    at play.templates.BaseTemplate.throwException(BaseTemplate.java:84)
    at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:252)
    at play.templates.GroovyTemplate$ExecutableTemplate.invokeTag(GroovyTemplate.java:374)
    at /test/selenium/AddCard.test.html.(line:3)
    at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:229)
    at play.templates.Template.render(Template.java:26)
    at play.templates.GroovyTemplate.render(GroovyTemplate.java:184)
    at controllers.TestRunner.run(TestRunner.java:107)
    at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:543)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:499)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:475)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:470)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:158)
    at Invocation.HTTP Request(Play!)
Caused by: java.lang.NullPointerException: Cannot get property 'data' on null object
    at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:229)
    ... 12 more

When I remove the #{if !_keepData} around the call to braindumpFixture I get an EmptyStackException:

play.exceptions.TemplateExecutionException
    at play.templates.BaseTemplate.throwException(BaseTemplate.java:84)
    at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:252)
    at play.templates.Template.render(Template.java:26)
    at play.templates.GroovyTemplate.render(GroovyTemplate.java:184)
    at controllers.TestRunner.run(TestRunner.java:107)
    at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:543)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:499)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:475)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:470)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:158)
    at Invocation.HTTP Request(Play!)
Caused by: java.util.EmptyStackException
    at java.util.Stack.peek(Stack.java:85)
    at java.util.Stack.pop(Stack.java:67)
    at play.templates.TagContext.exitTag(TagContext.java:31)
    at play.templates.GroovyTemplate$ExecutableTemplate.invokeTag(GroovyTemplate.java:380)
    at /test/selenium/AddCard.test.html.(line:3)
    at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:229)
    ... 9 more

I wonder if something fundamentally changed with tags in Play 1.2 and I just overlooked it in the documentation or if this might be a bug. Any ideas on solving this riddle are welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:09:50+00:00Added an answer on May 24, 2026 at 4:09 pm

    I am not aware that anything should have changed to stop this from working, so would expect this is a bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an application using MVC Preview 5. I have used typed views.
I am developing a Qt application that can play the videos and shows some
I am developing an application that requires to play some video. However I do
I'm developing an iPhone application that uses the iPod library to play some songs.
I'm developing a WP7 app and the application needs to change the icon of
When developing an application that sends out notification email messages, what are the best
I`m developing an application using Spring WebFlow 2, Facelets and JSF. One of my
I'm developing an application for Windows Mobile Devices using Visual Studio .NET 2008 whose
I am developing an application to install a large number of data files from
I am developing console application in .Net and I want to change a behavior

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.