0

I am having a strange issue with my Grails application. It seems that it's caching the views incorrectly. What is happening, is that the first time I hit a path with a specific action (let's say /controller/index) it will load the correct index view for that controller. Now, when I go to /anotherController/index, the correct controller is called, but it still tried to serve the old index gsp, resulting in obvious *NotFound exceptions.

This happens with all views. The first one that get's loaded gets displayed for all subsequent actions with the same name. I.e. the first show that get's called will be correct, but then any other show for another domain object tries to use the old one.

Any suggestions? My code is pretty much the stock standard generate-all versions at the moment.

I should also say, running in dev mode works 100%. Prod war in tomcat 7.0.42 is giving the issues.

1
  • Well, looks like a cache issue. Grails and Caching is in general a weird thing. Commented Sep 24, 2013 at 15:03

1 Answer 1

2

I had a weird issue like this a few weeks ago, but it was caching some information from the database and was not returning the correct results.

Here is what I did:

  1. Stopped Tomcat
  2. Deleted all the files in Tomcat's Temp directory
  3. Restarted Tomcat

After that, it worked fine.

Let me know if this helps.

Sign up to request clarification or add additional context in comments.

2 Comments

Might just be. I just ran it with the dev war and it works, but it was probably just the "cleanup" that was part of the process.
Yeah, seemed that it was just dirty files after all.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.