Error 500 while saving Drafts
Asked by V?ctor Garc?a:

Hi,

Pretty often we get Error 500 while saving drafts and the work is lost.

In the logs I see:

```
20-Oct-2021 22:30:38.797 SEVERE [https-jsse-nio2-8443-exec-14 url: /rest/watch-button/1.0/watchState/57095474] com.sun.jersey.spi.container.ContainerResponse.logException Mapped exception to response: 500 (Internal Server Error)
at com.sun.jersey.server.impl.model.HttpHelper.clientError(HttpHelper.java:273)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:24)
at com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:24)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:24)
at com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:24)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
```

But cannot find aditional info related to 20-Oct-2021 22:30:38.797 SEVERE \[https-jsse-nio2-8443-exec-14 url: /rest/watch-button/1.0/watchState/57095474\] com.sun.jersey.spi.container.ContainerResponse.logException Mapped exception to response: 500 (Internal Server Error)  
at com.sun.jersey.server.impl.model.HttpHelper.clientError(HttpHelper.java:273)

\[..\]

Any help to how further analyze this?

I've seen similar errors related like [duplicate record for a draft workflow](https://confluence.atlassian.com/jirakb/the-jira-application-statuses-page-throws-a-500-error-608731194.html) , [Error parsing HTTP request header ,](https://confluence.atlassian.com/confkb/error-saving-draft-in-confluence-while-editing-a-page-due-to-error-saving-draft-no-draft-has-been-saved-1019404296.html)or [others,](https://confluence.atlassian.com/jirakb/duplicate-workflow-drafts-results-in-500-errors-when-editing-an-affected-workflow-224401888.html)but not really the same.

Confluence 7.12.0


Answers:
author: Kishan Sharma
body: Welcome to the Atlassian Community [@V?ctor Garc?a](/t5/user/viewprofilepage/user-id/4606330) By any chance are you using any different language in your browser ? Just wanted to make sure, you are not facing issue similar to what mentioned [in this Bug](https://jira.atlassian.com/browse/CONFSERVER-59540)

comments: author: V?ctor Garc?a
body: Hi Kishan,

I'll take a look, thank you


author: V?ctor Garc?a
body: I see the :

```
 javax.ws.rs.WebApplicationException: java.text.ParseException: String, es-419, is not a valid language tag
Caused by: java.text.ParseException: String, es-419, is not a valid language tag
```

lines, but in the link yoy provide it seems is Spanish (Latin America) related; We are using Spanish Castillian, from Spain; so I understand it happens as well wit this spanish variant


author: V?ctor Garc?a
body: Hi Kishan,

It looks the issue is related to non unicode character.

It happens in different browsers (Chrome, Firefox, ..)

And we get entries in the logs like:

```
Line 795767: 25-Oct-2021 10:32:10.070 WARNING [https-jsse-nio2-8443-exec-25 url: /rest/tinymce/1/content/49840593/comment; user: USER.NAME] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI https://MYCONFLUENCE.MYDOMAIN.COM/rest/tinymce/1/content/49840593/comment?actions=true, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
Line 796794: 25-Oct-2021 10:57:25.353 WARNING [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [https-jsse-nio2-8443-exec-10 url: /pages/viewpage.action; user: USER.NAME] (id=[27]) has been active for [66,565] milliseconds (since [10/25/21 10:56 AM]) to serve the same request for [https://MYCONFLUENCE.MYDOMAIN.COM/pages/viewpage.action?pageId=57095474] and may be stuck (configured threshold for this StuckThreadDetectionValve is [60] seconds). There is/are [1] thread(s) in total that are monitored by this Valve and may be stuck.
Line 797123: 25-Oct-2021 10:57:45.409 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [https-jsse-nio2-8443-exec-25 url: /pages/viewpage.action; user: USER.NAME] (id=[42]) has been active for [63,841] milliseconds (since [10/25/21 10:56 AM]) to serve the same request for [https://MYCONFLUENCE.MYDOMAIN.COM/pages/viewpage.action?pageId=27526973] and may be stuck (configured threshold for this StuckThreadDetectionValve is [60] seconds). There is/are [2] thread(s) in total that are monitored by this Valve and may be stuck.
```

NOTE: Usernames and server URL redacted.


author: Kishan Sharma
body: Hi [@V?ctor Garc?a](/t5/user/viewprofilepage/user-id/4606330) thanks for the info. The log you pasted seems to be WARNINGs that can be ignored. I think you might be affected with the BUG i mentioned earlier. I would suggest [raising a support ticket](https://support.atlassian.com/contact/) to Atlassian Support to help you further with this.


author: V?ctor Garc?a
body: Hi Kishan,

Wrong logs attached sorry, my mistake.

It seemswe are being affected by errors coming from use non-unicode characters:

<https://jira.atlassian.com/browse/CONFSERVER-53047>

Is it possible to use them without these errors? (unsaved drafts in our case)

This is a last Confluence version running under Windows.

Thank you


Tags: confluence-server

error

server