[coldbox 3.8.1] object populator, railo, cfcouchebase, NULLs...

Hey All,

I’ve been running into this issue a few times now while working on a CFCouchebase project with Coldbox 3.8.1 on Railo.

I have a model object that is getting populated via the inflateTo option of the cfcouchebase sdk… it’s using the object populator which i blelieve is the same compeonent from the coldbox core.

Issue i’m having is when the Couchebase document contains a NULL in the document… even though i’ve defaulted the value in the model, and try setting ignore nulls or set null on empty and whatnot…

Once a couchebase document has a NULL for that field, it will not populate no matter what i try. and since there is a known issue with CB and railo using Railo’s full null support… i’m really not sure what to do here… if it was only a few documents i had to fix i’d go do them manually, but i’m dealing with over 1.5mil (and growing) stats bucket… and manually fixing the nulls in the json is tedious…

Wondering if anyone has any ideas to work around this issue? Was thinking maybe i wrap the objectpopulator method that’s failing with a try/catch to let it continue trying to populate the model object, but not sure if that’s the best route here.

Seems that there should be a simple fix though, so any thoughts from the crew here are appreciated.

Thanks in advance,

Adam

PS: Here’s the stack trace:

ass java.lang.String. at data.objectpopulator_cfc$cf.udfCall(E:\RailoExpress\webapps\ROOT\cfcouchbase\data\ObjectPopulator.cfc:479):479 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:214):214 at railo.runtime.ComponentImpl._call(ComponentImpl.java:640):640 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1771):1771 at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:771):771 at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1573):1573 at data.coremarshaller_cfc$cf.udfCall(E:\RailoExpress\webapps\ROOT\cfcouchbase\data\CoreMarshaller.cfc:195):195 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:764):764 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at data.coremarshaller_cfc$cf.udfCall(E:\RailoExpress\webapps\ROOT\cfcouchbase\data\CoreMarshaller.cfc:157):157 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.ComponentImpl._call(ComponentImpl.java:639):639 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1754):1754 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at couchbaseclient_cfc$cf.udfCall5(E:\RailoExpress\webapps\ROOT\cfcouchbase\CouchbaseClient.cfc:1470):1470 at couchbaseclient_cfc$cf.udfCall(E:\RailoExpress\webapps\ROOT\cfcouchbase\CouchbaseClient.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:764):764 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at couchbaseclient_cfc$cf.udfCall1(E:\RailoExpress\webapps\ROOT\cfcouchbase\CouchbaseClient.cfc:355):355 at couchbaseclient_cfc$cf.udfCall(E:\RailoExpress\webapps\ROOT\cfcouchbase\CouchbaseClient.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:214):214 at railo.runtime.ComponentImpl._call(ComponentImpl.java:640):640 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1771):1771 at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:771):771 at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1573):1573 at coldbox.modules.xxx.model.documents.yyyservice_cfc$cf.udfCall2(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\documents\yyyService.cfc:119):119 at coldbox.modules.xxx.model.documents.yyyservice_cfc$cf.udfCall(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\documents\yyyService.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.ComponentImpl._call(ComponentImpl.java:639):639 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1754):1754 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at coldbox.modules.xxx.model.xxxdataservice_cfc$cf.udfCall1(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\xxxDataService.cfc:168):168 at coldbox.modules.xxx.model.xxxdataservice_cfc$cf.udfCall(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\xxxDataService.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:764):764 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at coldbox.modules.xxx.model.xxxdataservice_cfc$cf.udfCall1(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\xxxDataService.cfc:50):50 at coldbox.modules.xxx.model.xxxdataservice_cfc$cf.udfCall(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\xxxDataService.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.ComponentImpl._call(ComponentImpl.java:639):639 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1754):1754 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at coldbox.modules.xxx.model.xxxworldservice_cfc$cf.udfCall1(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\xxxWorldService.cfc:99):99 at coldbox.modules.xxx.model.xxxworldservice_cfc$cf.udfCall(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\xxxWorldService.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:764):764 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at coldbox.modules.xxx.model.xxxworldservice_cfc$cf.udfCall1(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\xxxWorldService.cfc:44):44 at coldbox.modules.xxx.model.xxxworldservice_cfc$cf.udfCall(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\xxxWorldService.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.ComponentImpl._call(ComponentImpl.java:639):639 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1754):1754 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at coldbox.modules.xxx.model.xxx_cfc$cf.udfCall1(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\xxx.cfc:20):20 at coldbox.modules.xxx.model.xxx_cfc$cf.udfCall(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\model\xxx.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.ComponentImpl._call(ComponentImpl.java:639):639 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1754):1754 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at coldbox.modules.xxx.handlers.api.datapoll_cfc$cf.udfCall(E:\workspace\backend\coldfusion\frameworks\coldbox\modules\xxx\handlers\api\dataPoll.cfc:18):18 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:214):214 at railo.runtime.ComponentImpl._call(ComponentImpl.java:640):640 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1767):1767 at railo.runtime.tag.Invoke.doComponent(Invoke.java:219):219 at railo.runtime.tag.Invoke.doEndTag(Invoke.java:192):192 at coldbox.system.web.controller_cfc$cf.udfCall6(E:\RailoExpress\webapps\ROOT\coldbox\system\web\Controller.cfc:764):764 at coldbox.system.web.controller_cfc$cf.udfCall(E:\RailoExpress\webapps\ROOT\coldbox\system\web\Controller.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:764):764 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at coldbox.system.web.controller_cfc$cf.udfCall5(E:\RailoExpress\webapps\ROOT\coldbox\system\web\Controller.cfc:648):648 at coldbox.system.web.controller_cfc$cf.udfCall(E:\RailoExpress\webapps\ROOT\coldbox\system\web\Controller.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:214):214 at railo.runtime.ComponentImpl._call(ComponentImpl.java:640):640 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1771):1771 at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:771):771 at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1573):1573 at coldbox.system.coldbox_cfc$cf.udfCall1(E:\RailoExpress\webapps\ROOT\coldbox\system\Coldbox.cfc:236):236 at coldbox.system.coldbox_cfc$cf.udfCall(E:\RailoExpress\webapps\ROOT\coldbox\system\Coldbox.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:764):764 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at coldbox.system.coldbox_cfc$cf.udfCall1(E:\RailoExpress\webapps\ROOT\coldbox\system\Coldbox.cfc:382):382 at coldbox.system.coldbox_cfc$cf.udfCall(E:\RailoExpress\webapps\ROOT\coldbox\system\Coldbox.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.ComponentImpl._call(ComponentImpl.java:639):639 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1754):1754 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:740):740 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1563):1563 at application_cfc$cf.udfCall(E:\RailoExpress\webapps\ROOT\Application.cfc:71):71 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:109):109 at railo.runtime.type.UDFImpl._call(UDFImpl.java:326):326 at railo.runtime.type.UDFImpl.call(UDFImpl.java:227):227 at railo.runtime.ComponentImpl._call(ComponentImpl.java:639):639 at railo.runtime.ComponentImpl._call(ComponentImpl.java:522):522 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1754):1754 at railo.runtime.listener.ModernAppListener.call(ModernAppListener.java:404):404 at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:130):130 at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:34):34 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2228):2228 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2195):2195 at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:353):353 at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29 at javax.servlet.http.HttpServlet.service(HttpServlet.java:790):790 at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738):738 at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:551):551 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143):143 at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568):568 at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221):221 at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111):1111 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478):478 at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183):183 at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045):1045 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141):141 at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199):199 at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109):109 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97):97 at org.eclipse.jetty.server.Server.handle(Server.java:462):462 at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279):279 at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232):232 at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534):534 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607):607 at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536):536 at java.lang.Thread.run(Unknown Source):-1

changing this section of the objectpopulator.cfc in cfcouchbase fixed my immediate problem… anyone see issue with this?

line 313 - objectpopulator.cfc
// Populate Bean
for(key in arguments.memento){

// shortcut to property value
if (!isNull(arguments.memento[ key ])){ // make sure not null,
propertyValue = arguments.memento[ key ];
} else { // set to empty value
propertyValue = “”;
}