Hi fellow Mendix enthousiasts, When uploading an invoice within the app, the process continues as normal. But then, when you upload a second invoice, I get this error (see stack trace below). It won't pick up in the debugger. It throws an error to the user (see screenshot). In the stack trace I see a NullPointerException, which obviously something is empty, but I can't see 'what’ is empty here. I searched the forums but nothing helped me so far. Can you help me out on this one? Thanks in advance. Full stack trace: null [User 'laurens' with session id '8ec859d0-b2b6-4007-8f7e-629fe26f2c2c' and roles 'Candidate'] -------- com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"changes":"Map(Name -> Factuur test.pdf, HasContents -> true, System.changedBy -> 19421773393036466, Size -> 31186, System.owner -> 19421773393036466, Delete -> false, Contents -> null, changedDate -> 1559658522...","type":"ChangeAction"}', all database changes executed by this action were rolled back at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:210) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"changes":"Map(Name -> Factuur test.pdf, HasContents -> true, System.changedBy -> 19421773393036466, Size -> 31186, System.owner -> 19421773393036466, Delete -> false, Contents -> null, changedDate -> 1559658522...","type":"ChangeAction"}', all database changes executed by this action were rolled back at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"changes":"Map(Name -> Factuur test.pdf, HasContents -> true, System.changedBy -> 19421773393036466, Size -> 31186, System.owner -> 19421773393036466, Delete -> false, Contents -> null, changedDate -> 1559658522...","type":"ChangeAction"}', all database changes executed by this action were rolled back at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.processErrorState(CoreActionHandlerImpl.scala:160) Caused by: java.lang.NullPointerException: null at com.mendix.basis.objectmanagement.member.MendixBinaryImpl.getValueFromString(MendixBinaryImpl.java:150) at com.mendix.basis.objectmanagement.member.MendixBinaryImpl.getValueFromString(MendixBinaryImpl.java:25) at com.mendix.basis.action.user.Changer.setMemberValue(Changer.scala:58) at com.mendix.basis.action.user.Changer.setMemberValue$(Changer.scala:47) at com.mendix.basis.action.user.ChangeAction.setMemberValue(ChangeAction.scala:11) at com.mendix.basis.action.user.Changer.changeMember(Changer.scala:29) at com.mendix.basis.action.user.Changer.changeMember$(Changer.scala:24) at com.mendix.basis.action.user.ChangeAction.changeMember(ChangeAction.scala:11) at com.mendix.basis.action.user.ChangeAction.$anonfun$executeAction$2(ChangeAction.scala:38) at com.mendix.basis.action.user.ChangeAction.$anonfun$executeAction$2$adapted(ChangeAction.scala:37) at scala.collection.immutable.HashMap$HashMap1.foreach(HashMap.scala:231) at scala.collection.immutable.HashMap$HashTrieMap.foreach(HashMap.scala:462) at com.mendix.basis.action.user.ChangeAction.executeAction(ChangeAction.scala:37) at com.mendix.basis.action.user.ChangeAction.executeAction(ChangeAction.scala:11) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:79) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:57) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55) at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:201) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:206) at com.mendix.basis.component.InternalCore.change(InternalCore.java:175) at com.mendix.webui.requesthandling.RequestHandlingUtil$.$anonfun$validateChanges$4(RequestHandlingUtil.scala:67) at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12) at scala.util.Try$.apply(Try.scala:209) at com.mendix.webui.requesthandling.RequestHandlingUtil$.$anonfun$validateChanges$2(RequestHandlingUtil.scala:67) at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:241) at scala.collection.Iterator.foreach(Iterator.scala:944) at scala.collection.Iterator.foreach$(Iterator.scala:944) at scala.collection.AbstractIterator.foreach(Iterator.scala:1432) at scala.collection.IterableLike.foreach(IterableLike.scala:71) at scala.collection.IterableLike.foreach$(IterableLike.scala:70) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike.flatMap(TraversableLike.scala:241) at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:238) at scala.collection.AbstractTraversable.flatMap(Traversable.scala:104) at com.mendix.webui.requesthandling.RequestHandlingUtil$.validateChanges(RequestHandlingUtil.scala:57) at com.mendix.webui.requesthandling.helpers.StateHandling.withState(StateHandling.scala:21) at com.mendix.webui.requesthandling.helpers.StateHandling.withState$(StateHandling.scala:17) at com.mendix.webui.requesthandling.ClientRequestHandler.withState(ClientRequestHandler.scala:29) at com.mendix.webui.requesthandling.ClientRequestHandler.$anonfun$handleRequest$1(ClientRequestHandler.scala:185) at com.mendix.webui.requesthandling.ClientRequestHandler.$anonfun$handleRequest$1$adapted(ClientRequestHandler.scala:171) at com.mendix.webui.requesthandling.helpers.ContextHandling.$anonfun$inContext$4(ContextHandling.scala:41) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.basis.actionmanagement.IMonitoredAction.monitor(IMonitoredAction.scala:49) at com.mendix.basis.actionmanagement.IMonitoredAction.monitor$(IMonitoredAction.scala:25) at com.mendix.webui.requesthandling.helpers.ContextHandling$ClientMonitoredAction.monitor(ContextHandling.scala:49) at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:41) at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:27) at com.mendix.webui.requesthandling.ClientRequestHandler.inContext(ClientRequestHandler.scala:29) at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:24) at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:19) at com.mendix.webui.requesthandling.ClientRequestHandler.inContext(ClientRequestHandler.scala:29) at com.mendix.webui.requesthandling.ClientRequestHandler.handleRequest(ClientRequestHandler.scala:171) at com.mendix.webui.requesthandling.ClientRequestHandler.$anonfun$handleAction$1(ClientRequestHandler.scala:142) at com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest(ProfileHandling.scala:14) at com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest$(ProfileHandling.scala:10) at com.mendix.webui.requesthandling.ClientRequestHandler.profileRequest(ClientRequestHandler.scala:29) at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:142) at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:102) at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40) at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:72) at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:69) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:75) at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:862) at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.service(RuntimeHandler.java:42) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:561) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597) at java.lang.Thread.run(Thread.java:748)
asked
Laurens-Jan van Borssum Waalkes
4 answers
1
Here my two cents. I would upgrade. I have seen some weird stuff when working with filedocuments in those Mendix versions. Any change there are also one on one relations involved? My advice is to upgrade to at least 7.23.2 and then check if you can reproduce the error.
Regards,
Ronald
answered
Ronald Catersels
5
It says: HasContents → true but Contents->null
Did you change one of these values on your own?
answered
Andreas Blaesius
3
What do you mean uploading a second one? Is this in a completely new process or do you want to update/overwrite an existing object?
answered
Gerrit Kiefer
1
Finally I was able to fix this issue after trying multiple things (upgrade to latest version, changed association from 1-1 to 1-* etc.) Nothing helped though.
In the last microflow the invoice will be send via email. A clone java action copied the contents of the invoice object to an attachment object (attachmentlist is used for the email process).
I replaced the clone java action with the duplicatefiledocument java action. Now everything works as it should be.