Could not resolve view with name 'alive' when deployed with Tomcat 8

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Could not resolve view with name 'alive' when deployed with Tomcat 8



When deployed to our production server(AWS Linux, Tomcat 8, Grails 3.3.3, Java 1.8) the app cannot find the view. When running locally (grails prod run-app, grails run-app, Java 1.8) there is no issue.



View(alive.gson)


import java.time.Instant
json
dateTime Instant.now().toEpochMilli()
version config.getProperty("info.app.version", String, null)



URL Mappings


"/apistatus"(view:"alive")



URLS



http://localhost:8080/cf/apistatus (works without issue)
https://my.domain.com/cf/apistatus (throws exception - javax.servlet.ServletException: Could not resolve view with name 'alive' in servlet with name 'grailsDispatcherServlet')



Update



I've configured the app according to this issue which has not worked





Are you using Elastic beanstalk or tomcat on EC2 directly? Can you access tomcat logs? catalina logs. Should have clue in that.
– srikanth Nutigattu
Aug 6 at 16:56





Tomcat on EC2. The exception is coming from the tomcat log. The page renders "HTTP Status 500 - Request processing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'timestamp' cannot be found on object of type 'java.util.HashMap' - maybe not public?" with an exception report. I believe the page is rendering a secondary error as Grails is using a default template since it cannot find the correct template.
– kuda
Aug 6 at 17:05






verify your JDK version of local and that of EC2..
– srikanth Nutigattu
Aug 6 at 21:34





Try to log you values in gson, think that problem can be with they
– Koloritnij
Aug 7 at 7:22





@Koloritnij I cannot 'log' the values in gson as it cannot find the gson template
– kuda
Aug 8 at 11:08










By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS