This code worked a while back but now just throws an error: cannot convert the value “‘’” to a boolean. I’ve updated docbox with no change. It’s a big codebase and is actively being worked on. Any help would be appreciated.
docbox = new DocBox( properties = {
projectTitle="Monolith JavaDocs",
outputDir="#expandPath( '../javadocs' )#"
});
sourcesArr = [];
sourcesArr[1] = {dir="#expandPath( '../../core' )#", mapping="core"};
sourcesArr[2] = {dir="#expandPath( '../../com' )#", mapping="com"};
docbox.generate( source = sourcesArr );
Thanks for responding. I thought it started working but as of now it still throws this error. How can i make a stack trace?
just an update. None of these helped:
- restarted CF.
- deleted output directory
Ultimately after just trying it repeatedly it still throws the error, but -at least most of - the output is generated successfully.
I should clarify that some of the files were being created before, so clearly its choking on something in my code. I just don’t know of a way to know where. Thanks!
It’s in the original error. The stack trace will tell us a lot more about what’s going on and where, because cannot convert the value “‘’” to a boolean
is not a lot of info to debug with.
Can you paste the entire error into a reply here?
sorry, i missed the catch statement at the bottom which just ouptut the message.
struct
Detail [empty string]
ErrNumber 0
Message cannot convert the value "''" to a boolean
StackTrace coldfusion.runtime.Cast$BooleanStringConversionException: cannot convert the value "''" to a boolean at coldfusion.runtime.Cast._boolean(Cast.java:366) at coldfusion.runtime.Cast._boolean(Cast.java:428) at cfclass2ecfm1936131773$funcWRITEMETHODLINK.runFunction(D:\webroot\docbox\strategy\api\resources\templates\class.cfm:597) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:629) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:559) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:522) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:469) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:444) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:316) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4899) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4879) at cfclass2ecfm1936131773._factor8(D:\webroot\docbox\strategy\api\resources\templates\class.cfm:318) at cfclass2ecfm1936131773._factor13(D:\webroot\docbox\strategy\api\resources\templates\class.cfm:1) at cfclass2ecfm1936131773.runPage(D:\webroot\docbox\strategy\api\resources\templates\class.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:256) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:749) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:578) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:5088) at cfAbstractTemplateStrategy2ecfc216412547$funcWRITETEMPLATE.runFunction(D:\webroot\docbox\strategy\AbstractTemplateStrategy.cfc:460) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:629) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:559) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:522) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:469) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:444) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:687) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4797) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4778) at cfHTMLAPIStrategy2ecfc1577713960$funcBUILDCLASSPAGES.runFunction(D:\webroot\docbox\strategy\api\HTMLAPIStrategy.cfc:147) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:629) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:559) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:522) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:469) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:444) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:316) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4899) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4879) at cfpackagePages2ecfm1974268691.runPage(D:\webroot\docbox\strategy\api\resources\templates\packagePages.cfm:26) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:256) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:749) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:578) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:5088) at cfHTMLAPIStrategy2ecfc1577713960$funcWRITEPACKAGEPAGES.runFunction(D:\webroot\docbox\strategy\api\HTMLAPIStrategy.cfc:97) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:629) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:559) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:522) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:469) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:444) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:316) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4142) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4105) at cfHTMLAPIStrategy2ecfc1577713960$funcRUN.runFunction(D:\webroot\docbox\strategy\api\HTMLAPIStrategy.cfc:81) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:629) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:559) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:522) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:469) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:444) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:316) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4142) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4105) at cfDocBox2ecfc1500551972$func_CF_ANONYMOUSCLOSURE_155.runFunction(D:\webroot\src\DocBox\DocBox.cfc:147) at coldfusion.runtime.Closure.invoke(Closure.java:171) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:522) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:469) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:444) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:316) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4899) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4879) at coldfusion.runtime.ArrayUtil.ArrayEach(ArrayUtil.java:998) at coldfusion.runtime.CFPage.ArrayEach(CFPage.java:1707) at coldfusion.runtime.CfJspPage.invokeMethodHandle(CfJspPage.java:4376) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4229) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4105) at cfDocBox2ecfc1500551972$funcGENERATE.runFunction(D:\webroot\src\DocBox\DocBox.cfc:146) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:629) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:559) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:522) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:469) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:444) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:687) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:980) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:762) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4053) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4017) at cfmonolith2ecfm398133883.runPage(D:\webroot\src\docbox\monolith.cfm:21) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:256) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:749) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:578) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:5088) at cfapplication2ecfc2145406471$funcONREQUEST.runFunction(D:\webroot\application.cfc:32) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:629) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:559) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:522) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:469) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:444) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:316) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503) at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:115) at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:308) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:569) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:162) at coldfusion.filter.IpFilter.invoke(IpFilter.java:45) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:231) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:57) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:355) at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:450) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:842)
Suppressed
array[empty]
TagContext
array
1
struct
COLUMN 0
ID CF_CAST
LINE 597
RAW_TRACE at cfclass2ecfm1936131773$funcWRITEMETHODLINK.runFunction(D:\webroot\docbox\strategy\api\resources\templates\class.cfm:597)
TEMPLATE D:\webroot\docbox\strategy\api\resources\templates\class.cfm
TYPE CFML
2
struct
COLUMN 0
ID CF_UDFMETHOD
LINE 318
RAW_TRACE at cfclass2ecfm1936131773._factor8(D:\webroot\docbox\strategy\api\resources\templates\class.cfm:318)
TEMPLATE D:\webroot\docbox\strategy\api\resources\templates\class.cfm
TYPE CFML
3
struct
COLUMN 0
ID CF_CLASS
LINE 1
RAW_TRACE at cfclass2ecfm1936131773._factor13(D:\webroot\docbox\strategy\api\resources\templates\class.cfm:1)
TEMPLATE D:\webroot\docbox\strategy\api\resources\templates\class.cfm
TYPE CFML
4
struct
COLUMN 0
ID CF_CLASS
LINE 1
RAW_TRACE at cfclass2ecfm1936131773.runPage(D:\webroot\docbox\strategy\api\resources\templates\class.cfm:1)
TEMPLATE D:\webroot\docbox\strategy\api\resources\templates\class.cfm
TYPE CFML
5
struct
COLUMN 0
ID CFINCLUDE
LINE 460
RAW_TRACE at cfAbstractTemplateStrategy2ecfc216412547$funcWRITETEMPLATE.runFunction(D:\webroot\docbox\strategy\AbstractTemplateStrategy.cfc:460)
TEMPLATE D:\webroot\docbox\strategy\AbstractTemplateStrategy.cfc
TYPE CFML
6
struct
COLUMN 0
ID CF_UDFMETHOD
LINE 147
RAW_TRACE at cfHTMLAPIStrategy2ecfc1577713960$funcBUILDCLASSPAGES.runFunction(D:\webroot\docbox\strategy\api\HTMLAPIStrategy.cfc:147)
TEMPLATE D:\webroot\docbox\strategy\api\HTMLAPIStrategy.cfc
TYPE CFML
7
struct
COLUMN 0
ID CF_UDFMETHOD
LINE 26
RAW_TRACE at cfpackagePages2ecfm1974268691.runPage(D:\webroot\docbox\strategy\api\resources\templates\packagePages.cfm:26)
TEMPLATE D:\webroot\docbox\strategy\api\resources\templates\packagePages.cfm
TYPE CFML
8
struct
COLUMN 0
ID CFINCLUDE
LINE 97
RAW_TRACE at cfHTMLAPIStrategy2ecfc1577713960$funcWRITEPACKAGEPAGES.runFunction(D:\webroot\docbox\strategy\api\HTMLAPIStrategy.cfc:97)
TEMPLATE D:\webroot\docbox\strategy\api\HTMLAPIStrategy.cfc
TYPE CFML
9
struct
COLUMN 0
ID CF_TEMPLATEPROXY
LINE 81
RAW_TRACE at cfHTMLAPIStrategy2ecfc1577713960$funcRUN.runFunction(D:\webroot\docbox\strategy\api\HTMLAPIStrategy.cfc:81)
TEMPLATE D:\webroot\docbox\strategy\api\HTMLAPIStrategy.cfc
TYPE CFML
10
struct
COLUMN 0
ID CF_TEMPLATEPROXY
LINE 147
RAW_TRACE at cfDocBox2ecfc1500551972$func_CF_ANONYMOUSCLOSURE_155.runFunction(D:\webroot\src\DocBox\DocBox.cfc:147)
TEMPLATE D:\webroot\src\DocBox\DocBox.cfc
TYPE CFML
11
struct
COLUMN 0
ID CF_CFPAGE
LINE 146
RAW_TRACE at cfDocBox2ecfc1500551972$funcGENERATE.runFunction(D:\webroot\src\DocBox\DocBox.cfc:146)
TEMPLATE D:\webroot\src\DocBox\DocBox.cfc
TYPE CFML
12
struct
COLUMN 0
ID CF_TEMPLATEPROXY
LINE 21
RAW_TRACE at cfmonolith2ecfm398133883.runPage(D:\webroot\src\docbox\monolith.cfm:21)
TEMPLATE D:\webroot\src\docbox\monolith.cfm
TYPE CFML
13
struct
COLUMN 0
ID CFINCLUDE
LINE 32
RAW_TRACE at cfapplication2ecfc2145406471$funcONREQUEST.runFunction(D:\webroot\application.cfc:32)
TEMPLATE D:\webroot\application.cfc
TYPE CFML
Type Expression
value [empty string]
Ok, so you can see the error is happening on line 597 of the class.cfm
file. We look at that code and we find this: DocBox/strategy/api/resources/templates/class.cfm at development · Ortus-Solutions/DocBox · GitHub
if(NOT param.required)
and we can tell from the surrounding code that this means one of your function arguments somehow has an empty string or perhaps two actual quotes-- not sure as the required
value which is expected to be a boolean.
So, go to this line of code in the docbox strategy, wrap it in a try/catch and dump out the metadata when it errors so you can see which CFC in your code is having the issue. Then you can go track down and fix your code.
And if there’s not enough context there, the stack trace also shows us the erroring method is called from line 318 of class.cfm
so you can move your try/catch up to there and dump out the arguments.metadata
variable.
1 Like
So, thank you for your guidance. I did wrap the contents of the arguments.func.parameters cfloop and have stopped getting the error. oddly i can’t seem to get it to log anything though. just fyi.
have a great day and thanks for your help!
Assuming you’re running this in a web server, just dump the metadata and abort in the catch.