Flowable modeler returns "Unexpected error: could not save model" with jetty

Hi,

I want to save a bpmn.xml model in the flowable modeler (v5.22) and it returns “Unexpected error: could not save model”.
The problem only occurs when I use Jetty. I tried the exact same thing under tomcat and there was no problem.

There was no sign of this in the logs. I increased the loglevel to DEBUG and notices this stacktrace:

12:23:32,641 [qtp617000740-15] DEBUG org.springframework.web.servlet.DispatcherServlet  - DispatcherServlet with name 'dispatcher' processing PUT request for [/
flowable-explorer/service/model/50/save]
12:23:32,651 [qtp617000740-15] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping  - Looking up handler method for path /m
odel/50/save
12:23:32,659 [qtp617000740-15] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping  - Returning handler method [public void
 org.activiti.rest.editor.model.ModelSaveRestResource.saveModel(java.lang.String,org.springframework.util.MultiValueMap<java.lang.String, java.lang.String>)]
12:23:32,659 [qtp617000740-15] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory  - Returning cached instance of singleton bean 'modelS
aveRestResource'
12:23:32,712 [qtp617000740-15] DEBUG org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver  - Resolving exception from handler [public void org.activiti.rest.editor.model.ModelSaveRestResource.saveModel(java.lang.String,org.springframework.util.MultiValueMap<java.lang.String, java.lang.String>)]: org.springframework.http.converter.HttpMessageNotReadableException: Required request body content is missing: org.springframework.web.method.HandlerMethod$HandlerMethodParameter@d84a7286
12:23:32,749 [qtp617000740-15] DEBUG org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver  - Resolving exception from handler [public void org.activiti.rest.editor.model.ModelSaveRestResource.saveModel(java.lang.String,org.springframework.util.MultiValueMap<java.lang.String, java.lang.String>)]: org.springframework.http.converter.HttpMessageNotReadableException: Required request body content is missing: org.springframework.web.method.HandlerMethod$HandlerMethodParameter@d84a7286
12:23:32,750 [qtp617000740-15] DEBUG org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver  - Resolving exception from handler [public void org.activiti.rest.editor.model.ModelSaveRestResource.saveModel(java.lang.String,org.springframework.util.MultiValueMap<java.lang.String, java.lang.String>)]: org.springframework.http.converter.HttpMessageNotReadableException: Required request body content is missing: org.springframework.web.method.HandlerMethod$HandlerMethodParameter@d84a7286
12:23:32,835 [qtp617000740-15] DEBUG org.springframework.web.servlet.DispatcherServlet  - Null ModelAndView returned to DispatcherServlet with name 'dispatcher': assuming HandlerAdapter completed request handling
12:23:32,835 [qtp617000740-15] DEBUG org.springframework.web.servlet.DispatcherServlet  - Successfully completed request

Anyone had this problem before?

Thanks in advance,

spille

Hi,

No didn’t see this before. We’ll do some testing with Jetty to see if we can find the cause of this issue.

Best regards,

Tijs

That’s great thanks!

I’m having the same error on every model save. This is the full HTTP 500 response body I get:

<!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1><hr class="line" /><p><b>Type</b> Exception Report</p><p><b>Message</b> Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.apache.batik.bridge.CursorManager</p><p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request.</p><p><b>Exception</b></p><pre>org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.apache.batik.bridge.CursorManager
	org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1287)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:961)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
	org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:879)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:664)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.activiti.explorer.servlet.JsonpCallbackFilter.doFilter(JsonpCallbackFilter.java:57)
	org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.java:53)
</pre><p><b>Root Cause</b></p><pre>java.lang.NoClassDefFoundError: Could not initialize class org.apache.batik.bridge.CursorManager
	org.apache.batik.bridge.BridgeContext.&lt;init&gt;(BridgeContext.java:1154)
	org.apache.batik.bridge.BridgeContext.&lt;init&gt;(BridgeContext.java:289)
	org.apache.batik.transcoder.SVGAbstractTranscoder.createBridgeContext(SVGAbstractTranscoder.java:337)
	org.apache.batik.transcoder.SVGAbstractTranscoder.createBridgeContext(SVGAbstractTranscoder.java:313)
	org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:194)
	org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:92)
	org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
	org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
	org.activiti.rest.editor.model.ModelSaveRestResource.saveModel(ModelSaveRestResource.java:82)
	sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
	org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:879)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:664)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.activiti.explorer.servlet.JsonpCallbackFilter.doFilter(JsonpCallbackFilter.java:57)
	org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.java:53)
</pre><p><b>Note</b> The full stack trace of the root cause is available in the server logs.</p><hr class="line" /><h3>Apache Tomcat/8.5.20</h3></body></html>

I talked with @verheyenkoen and apparenlty this is not a ‘jetty’ issue. He has the same problem with the latest Tomcat.

We haven’t figured it out yet.

The model gets saved but then there is an error while rendering the image.

Anybody else had this issue and knows how to fix it?

I have the same problem with tomcat, have you fix it?

No still struggling on…

Managed to resolve this by reinstalling it on a new tomcat docker container (on Docker community edition for Mac). Don’t know what I did different than before. Maybe a bug with an older version of the docker host software.