Japid icon indicating copy to clipboard operation
Japid copied to clipboard

(Play! fork) production mode errors not professional as in official play! 1.2.5

Open rrjanbiah opened this issue 11 years ago • 19 comments

(First of all, sorry. I don't know where to report issues about your play! 1.2.x fork, so posting here.)

Your play! fork is very productive to get template errors and development speed. But, there's a problem with displaying errors in production mode (in our case with WAR).

  1. If route is not found, in official version, 404 error is displayed within overall layout. But, this fork, only a plain "URL not found" error is getting displayed without layout.
  2. If there's runtime exception, official version displays something like "This exception has been logged with id 6f64ag6nb" within layout. But, this fork, directly displays error like without layout: System error 500: play.exceptions.JavaExecutionException

When you get time, please share where to look for (which file) fixing these errors. Unfortunately, we couldn't able to figure it out yet. Thanks.

rrjanbiah avatar Aug 30 '13 10:08 rrjanbiah

will take a look!

发自我的 iPad

在 2013-8-30,下午6:01,"R. Rajesh Jeba Anbiah" [email protected] 写道:

(First of all, sorry. I don't know where to report issues about your play! 1.2.x fork, so posting here.)

Your play! fork is very productive to get template errors and development speed. But, there's a problem with displaying errors in production mode (in our case with WAR).

If route is not found, in official version, 404 error is displayed within overall layout. But, this fork, only a plain "URL not found" error is getting displayed without layout.

If there's runtime exception, official version displays something like "This exception has been logged with id 6f64ag6nb" within layout. But, this fork, directly displays error like without layout: System error 500: play.exceptions.JavaExecutionException

When you get time, please share where to look for (which file) fixing these errors. Unfortunately, we couldn't able to figure it out yet. Thanks.

— Reply to this email directly or view it on GitHub.

branaway avatar Aug 30 '13 10:08 branaway

Thanks Bing

rrjanbiah avatar Aug 30 '13 10:08 rrjanbiah

OK, the error pages for 404 and 500 are 404.html and 500.html in the app/views/errors/ folder in your application. They're are classic Groovy pages. My play fork does not change the error reporting system. If you really want to code sophisticated error pages in Japid, you can use those two files to fire up a Japid script, like this:

// 404.html
${cn.bran.play.JapidPlayRenderer.renderWith("japidviews.error404").raw()}

Similarly, you can call into Japid to handle 500 errors with this line:

 // 500.html
${cn.bran.play.JapidPlayRenderer.renderWith("japidviews.error500", exception).raw()}

Of course you need error404.html and error500.html in the japidviews folder.

Can you verify it works in a WAR?

branaway avatar Sep 02 '13 13:09 branaway

Thanks Bing. Will check and update.

rrjanbiah avatar Sep 02 '13 14:09 rrjanbiah

I think, I have not communicated clearly. The problem is that on some errors like "routes not found", the 404.html file is not getting called in your fork in production mode. But, in official version, the control is coming to 404.

rrjanbiah avatar Sep 03 '13 07:09 rrjanbiah

Really? I tested yesterday with Play server (not with Tomcat) and it worked. Did it work with Play http server in your settings?

2013/9/3 R. Rajesh Jeba Anbiah [email protected]

I think, I have not communicated clearly. The problem is that on some errors like "routes not found", the 404.html file is not getting called in your fork in production mode. But, in official version, the control is coming to 404.

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/Japid/issues/58#issuecomment-23694916 .

branaway avatar Sep 03 '13 07:09 branaway

We're checking in Tomcat. Will check with play server and update.

rrjanbiah avatar Sep 03 '13 08:09 rrjanbiah

Yes, you're right. This is working in standalone version. But, not in Tomcat. If you can give us some hint like which file to check for, that will be much helpful. Thanks

rrjanbiah avatar Sep 03 '13 08:09 rrjanbiah

It might have something to do with packaging. Let me check.

2013/9/3 R. Rajesh Jeba Anbiah [email protected]

Yes, you're right. This is working in standalone version. But, not in Tomcat. If you can give us some hint like which file to check for, that will be much helpful. Thanks

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/Japid/issues/58#issuecomment-23698153 .

branaway avatar Sep 03 '13 10:09 branaway

Thanks Bing.

rrjanbiah avatar Sep 03 '13 11:09 rrjanbiah

Ha! It turned out to be a unfinished hack I had put in the ServletWrapper for Play.

Can you check out the latest Play fork from here: [email protected]:branaway/play.git and see if the problem would go away?

2013/9/3 R. Rajesh Jeba Anbiah [email protected]

Thanks Bing.

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/Japid/issues/58#issuecomment-23706183 .

branaway avatar Sep 03 '13 13:09 branaway

Thanks for the fix. Will check and update.

rrjanbiah avatar Sep 03 '13 15:09 rrjanbiah

Bing, thanks a lot. This is working now. Thanks again.

rrjanbiah avatar Sep 04 '13 07:09 rrjanbiah

Cool. Thanks for reporting. You can use the "Issues" in that project for further issues.

2013/9/4 R. Rajesh Jeba Anbiah [email protected]

Bing, thanks a lot. This is working now. Thanks again.

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/Japid/issues/58#issuecomment-23770393 .

branaway avatar Sep 04 '13 09:09 branaway

Sorry Bing. I'm not finding "Issues" in https://github.com/branaway/play Also, https://github.com/branaway/play/issues leads to 404.

rrjanbiah avatar Sep 04 '13 11:09 rrjanbiah

You're right! Hmm, don't know why. Projects forked from other projects do not have Issues... Weird.

2013/9/4 R. Rajesh Jeba Anbiah [email protected]

Sorry Bing. I'm not finding "Issues" in https://github.com/branaway/playAlso, https://github.com/branaway/play/issues leads to 404.

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/Japid/issues/58#issuecomment-23781079 .

branaway avatar Sep 04 '13 11:09 branaway

I think, it's a setting that you have to activate http://programmers.stackexchange.com/questions/179468/forking-a-repo-on-github-but-allowing-new-issues-on-the-fork

rrjanbiah avatar Sep 04 '13 11:09 rrjanbiah

I missed that entirely. Thanks for the tip. It's been activated now.

2013/9/4 R. Rajesh Jeba Anbiah [email protected]

I think, it's a setting that you have to activate http://programmers.stackexchange.com/questions/179468/forking-a-repo-on-github-but-allowing-new-issues-on-the-fork

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/Japid/issues/58#issuecomment-23783634 .

branaway avatar Sep 04 '13 12:09 branaway

Cool, thanks

rrjanbiah avatar Sep 04 '13 12:09 rrjanbiah