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 8193567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:31:11+00:00 2026-06-07T04:31:11+00:00

We are getting a mustache play error in production (amazon linux EC2 AMI) but

  • 0

We are getting a mustache play error in production (amazon linux EC2 AMI) but not in development (MACs) and we have tried upgrading the jvm, using the jdk instead, and changing from a tomcat deploy model to match our development environments as much as possible but nothing is working. Please any help would be greatly appreciated. We have lots of shared code in java and javascript using mustache and it would be a big deal to rewrite everything if we had to ditch mustache on the java side.

20:48:52,403 ERROR ~

@6al2dd0po
Internal Server Error (500) for request GET /mystuff/people

Execution exception (In {module:mustache-0.2}/app/play/modules/mustache/MustacheTags.java around line 32)
NullPointerException occured : null

play.exceptions.JavaExecutionException
    at play.templates.BaseTemplate.throwException(BaseTemplate.java:90)
    at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:257)
    at play.templates.Template.render(Template.java:26)
    at play.templates.GroovyTemplate.render(GroovyTemplate.java:187)
    at play.mvc.results.RenderTemplate.<init>(RenderTemplate.java:24)
    at play.mvc.Controller.renderTemplate(Controller.java:660)
    at play.mvc.Controller.renderTemplate(Controller.java:640)
    at play.mvc.Controller.render(Controller.java:695)
    at controllers.MyStuff.people(MyStuff.java:183)
    at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:548)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:502)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:478)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:473)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
    at Invocation.HTTP Request(Play!)
Caused by: java.lang.NullPointerException
    at play.modules.mustache.MustacheTags._template(MustacheTags.java:32)
    at play.modules.mustache.MustacheTags$_template.call(Unknown Source)
    at /app/views/User/people.html.(line:22)
    at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:232)
    ... 13 more
  • 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-06-07T04:31:13+00:00Added an answer on June 7, 2026 at 4:31 am

    Seems the issue is with the threadlocal. In Prod as per my logs, the session gets initialized with the main thread.

         [2012-06-30 18:35:38,102] INFO 10097[**main**] - Mustache module initialized
    

    However, MustacheTag tries to access with various thread like this during request.

         [2012-06-30 17:48:44,669] INFO 66048[**play-thread-1**] - [{module:mustache-0.2}/app/play/modules/mustache/MustacheTags.java:46] _meta() :: MustachePlugin.session():null
    

    So I changed the implementation of MustachePlugin like this.Changed line commented out:

        //private static ThreadLocal<MustacheSession> session_ = new ThreadLocal<MustacheSession>();
        private static MustacheSession _session = null;
        public static MustacheSession session(){
        //return session_.get();
        return _session;
        }
        public void onConfigurationRead(){
        // some code
        _session = new MustacheSession(compiler, root);
        // some code
        }
    

    And it is working fine now in prod mode! I see no reason why it should have been in a ThreadLocal in the first place as the session gets initialized at startup!

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

Sidebar

Related Questions

Getting the following error, which I understand and have seen before. But one thing
Getting this weird LINQ error. title = System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Xml.Linq.XElement,System.String Here is the code I have:
Getting this. Site works fine locally, but up on production server I get this
I'm just getting started using Mustache and I have this rendering problem. I send
Getting an error is usually unpleasant, but sometimes it is also unpleasant when you
Getting a weird error after I've tried to extend the MVC Membership provider in
Getting the active application is not a problem, I already have this implemented. What
getting an unusual error:- 'void' type not allowed here import javax.sound.midi.*; public class MiniMusicPlayer1
Getting more and more familiar with DI but I still have few niggles. Read
Getting extremely confused with an adminhtml module i'm trying to write! Effectively I have

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.