cancel
Showing results for 
Search instead for 
Did you mean: 

Name of the status must not contain CR or LF characters.

esseti
Champ in-the-making
Champ in-the-making
Hi,
while uploading a process (with extended tasks) via the rest api, sometimes (when process is a bit longer than usual) i get this error:

WARNING: Exception or error caught in status service
java.lang.IllegalArgumentException: Name of the status must not contain CR or LF characters.
   at org.restlet.data.Status.checkName(Status.java:641)
   at org.restlet.data.Status.<init>(Status.java:1010)
   at org.restlet.data.Status.<init>(Status.java:977)
   at org.activiti.rest.application.ActivitiStatusService.getSpecificStatus(ActivitiStatusService.java:87)
   at org.activiti.rest.application.ActivitiStatusService.getStatus(ActivitiStatusService.java:66)
   at org.restlet.service.StatusService.getStatus(StatusService.java:185)
   at org.restlet.resource.UniformResource.doCatch(UniformResource.java:140)
   at org.restlet.resource.ServerResource.handle(ServerResource.java:873)
   at org.restlet.resource.Finder.handle(Finder.java:513)
   at org.restlet.routing.Filter.doHandle(Filter.java:159)
   at org.restlet.routing.Filter.handle(Filter.java:206)
   at org.restlet.routing.Router.doHandle(Router.java:500)
   at org.restlet.routing.Router.handle(Router.java:740)
   at org.restlet.routing.Filter.doHandle(Filter.java:159)
   at org.restlet.routing.Filter.handle(Filter.java:206)
   at org.restlet.routing.Filter.doHandle(Filter.java:159)
   at org.restlet.routing.Filter.handle(Filter.java:206)
   at org.restlet.routing.Filter.doHandle(Filter.java:159)
   at org.restlet.routing.Filter.handle(Filter.java:206)
   at org.restlet.routing.Filter.doHandle(Filter.java:159)
   at org.restlet.routing.Filter.handle(Filter.java:206)
   at org.restlet.routing.Filter.doHandle(Filter.java:159)
   at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:155)
   at org.restlet.routing.Filter.handle(Filter.java:206)
   at org.restlet.routing.Filter.doHandle(Filter.java:159)
   at org.restlet.routing.Filter.handle(Filter.java:206)
   at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
   at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:75)
   at org.restlet.Application.handle(Application.java:391)
   at org.restlet.routing.Filter.doHandle(Filter.java:159)
   at org.restlet.routing.Filter.handle(Filter.java:206)
   at org.restlet.routing.Router.doHandle(Router.java:500)
   at org.restlet.routing.Router.handle(Router.java:740)
   at org.restlet.routing.Filter.doHandle(Filter.java:159)
   at org.restlet.routing.Filter.handle(Filter.java:206)
   at org.restlet.routing.Router.doHandle(Router.java:500)
   at org.restlet.routing.Router.handle(Router.java:740)
   at org.restlet.routing.Filter.doHandle(Filter.java:159)
   at org.restlet.routing.Filter.handle(Filter.java:206)
   at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
   at org.restlet.Component.handle(Component.java:391)
   at org.restlet.Server.handle(Server.java:491)
   at org.restlet.engine.ServerHelper.handle(ServerHelper.java:74)
   at org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:153)
   at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1031)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
   at java.lang.Thread.run(Thread.java:680)


any idea on how to avoid it?
6 REPLIES 6

frederikherema1
Star Contributor
Star Contributor
Seems like an exception occurs and the "message" of the exception contains CRLF-character. Do you see any exception prior to that in your log? Although very rare, this is an issue that needs to be addressed in the next version of activiti… I'll take care of that.

esseti
Champ in-the-making
Champ in-the-making
No error before this.
It is - somehow - random. i redraw the same process and the new one works.

frederikherema1
Star Contributor
Star Contributor
The status-error has been resolved on master: https://jira.codehaus.org/browse/ACT-1740

If you really want to find out the original issue (masked by the exception about the status-name), you can use a custom ActivitiStatusService, based on the one committed on master…

esseti
Champ in-the-making
Champ in-the-making
since this error is showing up quite often lately, do you know how i can solve it?
or when there will be released in the jar? i would avoid to recompile the engine just for this error.

frederikherema1
Star Contributor
Star Contributor
If you really want to find out the original issue (masked by the exception about the status-name), you can use a custom ActivitiStatusService, based on the one committed on master…

Create a subclass of the (5.13 in your engine JAR) ActivitiStatusService, e.g.. CustomActivitiStatusService and replace it with the implementation found on github (https://github.com/Activiti/Activiti/blob/8b3b750b9a2b88fbf888761ea6afe81c7012da9a/modules/activiti-...). Next, create a subclass of org.activiti.rest.application.ActivitiRestServicesApplication, overriding the constructor and AFTER the super() call, invoke  setStatusService(customStatusService). Last, but not least, replace the entry in web.xml for the rest-wabapp:


<!– Restlet adapter –> 
  <servlet> 
    <servlet-name>RestletServlet</servlet-name> 
    <servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
    <init-param>
      <!– Application class name –>
      <param-name>org.restlet.application</param-name>
      <param-value>com.mycompany.CustomActivitiRestServicesApplication</param-value>
    </init-param>
  </servlet>

Hope that helps…

esseti
Champ in-the-making
Champ in-the-making
thanks.
Still, i'm not too much into this things. i'll wait for the new relase Smiley Happy.