Issue with Railo 4.1.x.x

37 views
Skip to first unread message

Gerald Guido

unread,
Jun 28, 2013, 2:53:10 PM6/28/13
to dat...@googlegroups.com
I am having an issue with 2.5 select queries with Railo 4.1 throwing a java.lang.NullPointerException with (Build 172) 

I isolated error and it the problem is with  StructKeyExists(arguments.advsql,"SELECT")  on line 1401. I poked around a bit and it seems to stem from arguments.advsql being empty or null (I forgot) 

I tried using isdefined("arguments.advsql.SELECT")  on lines 1401 and 1410 but it threw an error on line 1539 (second error Listed below)
 
Can't cast Null value to value of type [Array]
value is null

 

I thought I would run it past you seeing that you are steeped in the inner workings and probably figure it out much quicker than I. 

Thanx
G!

BTW Datamgr is a staple of my tool kit. Totally love it!


@@@@@@@@@@@@@@@@@@@@@@
 
First error


The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request

java.lang.NullPointerException

 
The error occurred in E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc: line 1401
Called from E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc: line 1162
Called from E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc: line 1097
Called from E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\Index.cfm: line 11

1399:  </cfif>
1400:  <cfif
1401:  StructKeyExists(arguments,"advsql") AND StructKeyExists(arguments.advsql,"SELECT")
1402:  AND (
1403:  ( isSimpleValue(arguments.advsql["SELECT"]) AND Len(Trim(arguments.advsql["SELECT"])) )

Browser   Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
Remote Address   127.0.0.1
Referrer  
Date/Time   Fri, 28 Jun 2013 18:33:45 GMT
Stack Trace (click to expand)
java.lang.NullPointerException
	at railo.runtime.java.JavaObject.<init>(JavaObject.java:56):56
	at railo.runtime.type.scope.ObjectStruct.<init>(ObjectStruct.java:32):32
	at railo.runtime.op.Caster.toStruct(Caster.java:2402):2402
	at railo.runtime.op.Caster.toStruct(Caster.java:2378):2378
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf._5(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc:1401):1401
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf.udfCall(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc):-1
	at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:106):106
	at railo.runtime.type.UDFImpl._call(UDFImpl.java:377):377
	at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:276):276
	at railo.runtime.ComponentImpl._call(ComponentImpl.java:570):570
	at railo.runtime.ComponentImpl._call(ComponentImpl.java:487):487
	at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1715):1715
	at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:735):735
	at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1465):1465
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf._4(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc:1162):1162
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf.udfCall(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc):-1
	at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:106):106
	at railo.runtime.type.UDFImpl._call(UDFImpl.java:377):377
	at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:276):276
	at railo.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:709):709
	at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:735):735
	at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1465):1465
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf._4(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc:1097):1097
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf.udfCall(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc):-1
	at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:106):106
	at railo.runtime.type.UDFImpl._call(UDFImpl.java:377):377
	at railo.runtime.type.UDFImpl.call(UDFImpl.java:283):283
	at railo.runtime.ComponentImpl._call(ComponentImpl.java:569):569
	at railo.runtime.ComponentImpl._call(ComponentImpl.java:487):487
	at railo.runtime.ComponentImpl.call(ComponentImpl.java:1698):1698
	at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:709):709
	at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1455):1455
	at datamgr_remote.index_cfm$cf.call(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\Index.cfm:11):11
	at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:784):784
	at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:765):765
	at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:190):190
	at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18
	at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2113):2113
	at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2081):2081
	at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:318):318
	at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728):728
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305):305
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222):222
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123):123
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171):171
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99):99
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118):118
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407):407
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004):1004
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589):589
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310):310
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source):-1
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1
	at java.lang.Thread.run(Unknown Source):-1








@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@




The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request

Can't cast Null value to value of type [Array]

value is null
 
The error occurred in E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc: line 1539
Called from E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc: line 1171
Called from E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc: line 1097
Called from E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\Index.cfm: line 11

1537:  </cfloop>
1538:  <!--- Filter by filters --->
1539:  <cfif StructKeyExists(arguments,"filters") AND ArrayLen(arguments.filters)>
1540:  <cfloop index="ii" from="1" to="#ArrayLen(arguments.filters)#" step="1">
1541:  <!--- Make sure this is a valid filter (has a field and a value <which either has length or equality operator>) --->

Browser   Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
Remote Address   127.0.0.1
Referrer  
Date/Time   Fri, 28 Jun 2013 18:42:00 GMT
Stack Trace (click to expand)
Can't cast Null value to value of type [Array]
	at railo.runtime.op.Caster.toArray(Caster.java:2180):2180
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf._5(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc:1539):1539
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf.udfCall(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc):-1
	at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:106):106
	at railo.runtime.type.UDFImpl._call(UDFImpl.java:377):377
	at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:276):276
	at railo.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:709):709
	at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:735):735
	at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1465):1465
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf._4(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc:1171):1171
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf.udfCall(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc):-1
	at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:106):106
	at railo.runtime.type.UDFImpl._call(UDFImpl.java:377):377
	at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:276):276
	at railo.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:709):709
	at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:735):735
	at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1465):1465
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf._4(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc:1097):1097
	at datamgr_remote.com.datamgr_remote._datamgr_cfc$cf.udfCall(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\com\DataMGR_Remote\_DataMgr.cfc):-1
	at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:106):106
	at railo.runtime.type.UDFImpl._call(UDFImpl.java:377):377
	at railo.runtime.type.UDFImpl.call(UDFImpl.java:283):283
	at railo.runtime.ComponentImpl._call(ComponentImpl.java:569):569
	at railo.runtime.ComponentImpl._call(ComponentImpl.java:487):487
	at railo.runtime.ComponentImpl.call(ComponentImpl.java:1698):1698
	at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:709):709
	at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1455):1455
	at datamgr_remote.index_cfm$cf.call(E:\webservers\UniServer_861_Railo_4\www\DataMGR_Remote\Index.cfm:11):11
	at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:784):784
	at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:765):765
	at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:190):190
	at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18
	at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2113):2113
	at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2081):2081
	at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:318):318
	at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728):728
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305):305
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222):222
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123):123
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171):171
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99):99
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118):118
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407):407
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004):1004
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589):589
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310):310
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source):-1
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1
	at java.lang.Thread.run(Unknown Source):-1










Steve Bryant

unread,
Jul 7, 2013, 4:32:24 PM7/7/13
to dat...@googlegroups.com
Heya G!

Sorry about the late reply. I don't have Railo running at the moment, but would you mind trying this?...

Change this:

StructKeyExists(arguments,"advsql") AND StructKeyExists(arguments.advsql,"SELECT")

to this:
StructKeyExists(arguments,"advsql") AND isStruct(arguments.advsql) AND StructKeyExists(arguments.advsql,"SELECT")

I have noticed that Railo handles some variable existence and type-checking a bit different than ColdFusion does with ArgumentCollections.

I would guess that you are passing an Arguments scope into the "advsql" argument (either directly or indirectly). This seems to work differently on ACF and Railo.

Let me know how that works for you.

Thanks,

Steve












--
You received this message because you are subscribed to the Google Groups "DataMgr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datamgr+u...@googlegroups.com.
To post to this group, send email to dat...@googlegroups.com.
Visit this group at http://groups.google.com/group/datamgr.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gerald Guido

unread,
Jul 7, 2013, 8:51:03 PM7/7/13
to dat...@googlegroups.com
Thanx Steve.

This is weird. I just ran the exact same code on my machine at home and it worked fine. I replicated the error on two machines at work and now the exact same code works.

I know right? Go figure. I will try it again on my machines at work and will let you know what I come up with.

As always, many thanx!

G!

Gerald Guido

unread,
Jul 26, 2013, 2:11:08 PM7/26/13
to dat...@googlegroups.com
Thanx Steve,

Adding isStruct(arguments.advsql)  did the trick. w00t!!

Attached is my fix.

 Thanx
G$


On Sun, Jul 7, 2013 at 4:32 PM, Steve Bryant <sebt...@gmail.com> wrote:
_DataMgr.cfc
Reply all
Reply to author
Forward
0 new messages