Cfwheels Element plugins is undefined in a CFML structure - coldfusion

I have an issue where I am receivng "Element Plugins is undefinied" error.
I am using cfwheels v1.3 on Coldfusion 10.
The thing is that it works perfectly on my local machine which is using coldfusion 11 but has the exact same codebase.
This is the error dump that I am currently getting.
The error occurred in D:/Websites/nxtgig.involveid.com/wwwroot/ngTesting/wheels/global/public.cfm: line 363
Called from D:/Websites/nxtgig.involveid.com/wwwroot/ngTesting/wheels/events/onrequestend/debug.cfm: line 130
Called from D:/Websites/nxtgig.involveid.com/wwwroot/ngTesting/wheels/global/cfml.cfm: line 117
Called from D:/Websites/nxtgig.involveid.com/wwwroot/ngTesting/wheels/events/onrequestend.cfm: line 7
361 : else
362 : {
363 : loc.returnValue = application[loc.appKey][arguments.name];
364 : }
365 : </cfscript>
You can see the error here as its located at the bottom of the page.
http://gig.nxt.link/ngtesting/index.cfm?controller=authenticate&action=login
Entire error dump
coldfusion.runtime.UndefinedElementException: Element plugins is undefined in a CFML structure referenced as part of an expression.
at coldfusion.runtime.CfJspPage.ArrayGetAt(CfJspPage.java:974)
at coldfusion.runtime.CfJspPage._arrayGetAt(CfJspPage.java:985)
at coldfusion.runtime.CfJspPage._arrayGetAt(CfJspPage.java:980)
at coldfusion.runtime.CfJspPage._arrayGetAt(CfJspPage.java:690)
at coldfusion.runtime.CfJspPage._arrayGetAt(CfJspPage.java:672)
at coldfusion.runtime.CfJspPage._arrayGetAt(CfJspPage.java:637)
at coldfusion.runtime.CfJspPage._arrayGetAt(CfJspPage.java:624)
at cfpublic2ecfm882042214$funcGET.runFunction(D:\Websites\nxtgig.involveid.com\wwwroot\ngTesting\wheels\global\public.cfm:363)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2659)
at cfdebug2ecfm1977824709.runPage(D:\Websites\nxtgig.involveid.com\wwwroot\ngTesting\wheels\events\onrequestend\debug.cfm:130)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2799)
at cfcfml2ecfm1611265968$func$INCLUDEANDOUTPUT.runFunction(D:\Websites\nxtgig.involveid.com\wwwroot\ngTesting\wheels\global\cfml.cfm:117)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:518)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2624)
at cfonrequestend2ecfm279799770$funcONREQUESTEND.runFunction(D:\Websites\nxtgig.involveid.com\wwwroot\ngTesting\wheels\events\onrequestend.cfm:7)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:108)
at coldfusion.runtime.AppEventInvoker.onRequestEnd(AppEventInvoker.java:343)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:445)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:112)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)
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:219)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:271)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:166)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:299)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:271)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:246)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at sun.reflect.GeneratedMethodAccessor5714.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:97)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:472)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:312)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:192)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:507)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
at sun.reflect.GeneratedMethodAccessor5713.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:79)
at sun.reflect.GeneratedMethodAccessor5712.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:53)
at com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:41)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:204)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

I'm just going to condense my comments together into a better-formatted answer.
If the codebases really are identical, the configuration must be different somehow. Either something saved to a database is different or the application is being kept alive with invalid data.
Since the error is tripping on this line:
363 : loc.returnValue = application[loc.appKey][arguments.name];
We know that either loc.appkey or arguments.name is failing when one has the value of plugins. It's not loc.appkey so it must be arguments.name causing the error.
The red flag here is that it's an application variable tripping. Application variables persist from the point that the application variable is first created until either the server is restarted or the application has expired (reached applicationTimeout with no application activity. Each access to the application resets the timer).
This activity timer is tied to the application name. It's one of many reasons why it's important to give your applications unique name. On a shared server (especially), you never want to be bland with names, like "shoppingcart". Changing the application name and accessing the website starts the application again. The former application data still exists until whatever time-limit before it expires.
Since the variable is in the application scope, that's the best clue to where to trace it. Something setting an Application variable is not happening.
It may be that it's working on your local machine because hey, things happen, dev boxes get restarted, services are restarted, applications are left idle, however public servers get traffic and search engines and clients visiting to see what has changed. If timeout is set to 24 hours and a person visits at least once every 23 hours and 59 minutes, the application data will stay alive until server/service/force-restart.
I can see from some googling that cfwheels nests many includes (for justifiable reasons) so these functions aren't directly in application.cfc. You can change the application name in config/app.cfm. After some googling, I feel like this may be the best approach. Simply adding any character to the name should be enough.
But also, from googling, I've found Switching environments on CFWheels
Ways you can force this in other applications (mostly because I typed it already).
One of the first lines of your application.cfc will usually set this.name, this is your application name. You can change it if you like and the next visit will be like the first visit after a system restart.
Another way is to add this line of code to onRequestStart() like this
OnRequestStart is the first event handler that is always called in a request. OnApplicationStart is only run when needed and onSessionStart, similiarly, is only run when a session is created.
<cffunction name="onRequestStart">
<cfargument name="requestname" required=true/>
<cfset structClear(Application)>
<cfset structClear(Session)>
<cfset onApplicationStart()>
<cfset onSessionStart()>
...
</cffunction>
or, for cfscript syntax.
function onRequestStart(requestname) {
structClear(Application);
structClear(session);
onApplicationStart();
onSessionStart();
...
}
You can also contain these in if. Like this.. where the hash is a hashed password. In this case, the hash is a hash of "mike". If the url is appended with ?rextart&rexpw=mike, it will trigger. (You should choose your own hash string.)
<cffunction name="onRequestStart">
<cfargument name="requestname" required=true/>
<cfif isDefined("url.rextart") and isDefined("url.rexpw")
and hash(url.rexpw) is "18126E7BD3F84B3F3E4DF094DEF5B7DE">
<cfset structClear(Application)>
<cfset structClear(Session)>
<cfset onApplicationStart()>
</cfif>
</cffunction>
I hope that all of this is a help to you.

Related

What are the steps to use java object/class in ColdFusion...? [duplicate]

I'm trying to get a list of datasources off my server (Yes I am the server owner...this is not a hack).
I think I confused the issue by giving two examples - so I'm editing the post with ONE example and the stack trace.
Code
// Create Data Source Object
admin = new cfide.adminapi.Administrator();
admin.login("admin","[password]");
dbserv = createobject("java","coldfusion.server.ServiceFactory").getDatasourceService();
dblist = dbserv.getDatasources();
writedump(dblist);
Error Message
The error occurred in C:\wwwroot\[path]\[file].cfm: line 6
4 :
5 : dbserv = createobject("java","coldfusion.server.ServiceFactory").getDatasourceService();
6 : dblist = dbserv.getDatasources();
7 : writedump(dblist);
8 : </cfscript>
Stack Trace:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0
Remote Address 127.0.0.1
Referrer
Date/Time 17-May-12 09:08 AM
Stack Trace
at cf[file]2ecfm302094979.runPage(C:\wwwroot\[path]\[file].cfm:6)
coldfusion.security.SecurityManager$UnauthenticatedCredentialsException
at coldfusion.security.SecurityManager.authenticateAdmin(SecurityManager.java:1958)
at coldfusion.sql.Executive.getDatasources(Executive.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at coldfusion.runtime.StructBean.invoke(StructBean.java:508)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2393)
at cf[file]2ecfm302094979.runPage(C:\wwwroot\[path]\[file].cfm:6)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:381)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
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:200)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Debugging Information
ColdFusion Server Developer 9,0,1,274733
Template [path]/[file].cfm
Time Stamp 17-May-12 09:08 AM
Locale English (US)
User Agent Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0
Remote IP 127.0.0.1
Host Name 127.0.0.1
Execution Time
top level (16ms) C:\wwwroot\[path]\[file].cfm
ยท arrowtop level (0ms) CFC[ C:\wwwroot\CFIDE\adminapi\administrator.cfc | login(admin, [password]) ] from C:\wwwroot\CFIDE\adminapi\administrator.cfc # line 3
(46 ms) STARTUP, PARSING, COMPILING, LOADING, & SHUTDOWN
(62 ms) TOTAL EXECUTION TIME
red = over 250 ms execution time
Exceptions
09:08:11.011 - coldfusion.security.SecurityManager$UnauthenticatedCredentialsException - in C:\wwwroot\[path]\[file].cfm : line 6
dbserv = createobject("java","coldfusion.server.ServiceFactory").getDatasourceService();
dblist = dbserv.getDatasources();
writedump(dblist);
This works in ColdFusion. If you are getting securitycredential exception then you need to login as admin like
admin = new cfide.adminapi.Administrator();
admin.login("password","admin");
The following code will not work
dbserv2 = createobject("java","coldfusion.server.DataSourceService");
dblist2 = dbserv2.getDatasources();
And it is rightfully throwing method not found. Mainly because DataSourceService is a java Interface and doesn't have this method implemented. It is implemented by Executive class.
If you dump your dbserv2 variable you will see that it is not an object, it is a Java Interface, which cannot be instantiated.
To do what you want you need to request the datasource service from the service factory.
<cfscript>
dbserv2 = createobject("java","coldfusion.server.ServiceFactory").getDataSourceService();
dblist2 = dbserv2.getDatasources();
</cfscript>
For others who may happen upon this post, another way to do what was wanted, without needing to authenticate with the CF Admin password is to use the getNames() function of the DataSourceService instead of getDatasources. It returns an array of all the datasource names registered on the server.
<cfscript>
dbserv3 = createobject("java","coldfusion.server.ServiceFactory").getDataSourceService();
dblist3 = dbserv3.getNames();
</cfscript>
This works on CF11

ColdFusion looking for files in web service import statements on local machine instead of web server

I am trying to create a web service object in CF10. I have verified that it works as intended in SoapUI. However, when I run it in CF, I get an error that it cannot find an XSD imported in an import statement in the WSDL. Here is the createObject call in CF and the import statements within the WSDL:
<cfset var ws = createObject("webservice", "https://XXXXXX.XXXX.net/billingandcollectionmgmt/billing/PaymentManagement_1.wsdl")
<xsd:import schemaLocation="PaymentManagement_1.xsd4.xsd" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
<xsd:import schemaLocation="PaymentManagement_1.xsd2.xsd" namespace="http://www.XXXXX.com/schemas/XXXXBilling/billingandcollectionmgmt/billing/PaymentManagement_1"/>
The error I'm getting is because it's looking in my local CF install's /bin location to find the files, instead of on the web server in the same directory as WSDL itself. I have verified that the XSDs are indeed located in that directory by accessing them with the URL I provided above. I.e, the file https://XXXXXX.XXXX.net/billingandcollectionmgmt/billing/PaymentManagement_1.xsd4.xsd does exist.
Here is the stack trace:
javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'PaymentManagement_1.xsd4.xsd'.: java.io.FileNotFoundException: This file was not found: file:/C:/ColdFusion10/cfusion/bin/PaymentManagement_1.xsd4.xsd
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at coldfusion.xml.rpc.XmlRpcServiceImpl.getServiceInfoGenerator(XmlRpcServiceImpl.java:468)
at coldfusion.xml.rpc.XmlRpcServiceImpl.generateServiceInfo(XmlRpcServiceImpl.java:372)
at coldfusion.xml.rpc.XmlRpcServiceImpl.registerWebService(XmlRpcServiceImpl.java:317)
at coldfusion.xml.rpc.XmlRpcServiceImpl.getWebServiceProxy(XmlRpcServiceImpl.java:679)
at coldfusion.xml.rpc.WebServiceProxyFactory.getProxy(WebServiceProxyFactory.java:22)
at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:65)
at coldfusion.runtime.CFPage.createObjectProxy(CFPage.java:5747)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:5710)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:5644)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:5619)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:5566)
at cfXXXXPayments2ecfc1210176705$funcDELETEPAYMENT.runFunction(C:\ColdFusion10\cfusion\wwwroot\XXXXPayments.cfc:74)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2659)
at cfXXXXPayments2ecfc1210176705$funcDELETEPAYMENTS.runFunction(C:\ColdFusion10\cfusion\wwwroot\XXXXPayments.cfc:64)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2432)
at cftestPending2ecfm428388279.runPage(C:\ColdFusion10\cfusion\wwwroot\testPending.cfm:3)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.IpFilter.invoke(IpFilter.java:64)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:443)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:112)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
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:204)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.FileNotFoundException: This file was not found: file:/C:/ColdFusion10/cfusion/bin/PaymentManagement_1.xsd4.xsd
at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)
... 74 more
The question is, does anyone know why ColdFusion might be looking for the file on my local machine instead of on the web server where the files are actually located?
Using Miguel's advice, I changed my code to use cfhttp and the code snippet in his previous answer. Replacing the <soapenv:Envelope> </soapenv:Envelope> with the content from my SoapUI request solved my problem.

Markdown processing in Coldfusion 9 with tables extension support

I'm attempting to get Markdown with the tables extension working on Coldfusion 9. There are a few other similar questions regarding CF and Markdown here on stackoverflow but none of them deal with extensions.
So far I have tried;
markdownj via javaloader.cfc
pegdown via javaloader.cfc
showdownjs via orangepips nice cfc
(I would link all these but don't have the rep for more than 2)
All of which work fine for basic Markdown but none of which have tables support out of the box.
Both pegdown and showdown.js support the tables extension. Markdownj however doesn't look to support it at present but I thought it worth a try.
I think that my problem is in getting the syntax correct for loading the extension in either pegdown or showdown. Both work quite differently, one being pure Java and the other being interpreted Javascript.
For pegdown
My code here is very simple and just uses javaloader to load both pegdown and it's required parboiled library. This part appears works fine with no errors but when I try to use the pegdown class I get a fairly generic error;
An exception occurred while instantiating a Java object. The class must not be an interface or an abstract class. Error: ''.
The code for calling pegdown;
<cfscript>
jClass = [
"#getDirectoryFromPath(getCurrentTemplatePath())#/pegdown/pegdown-1.2.1.jar"
, "#getDirectoryFromPath(getCurrentTemplatePath())#/pegdown/parboiled-core-1.1.3.jar"
];
javaloader = createObject('component','components.javaloader.JavaLoader').init(jClass, true);
variables.pegdown = javaloader.create("org.pegdown.PegDownProcessor");
</cfscript>
<cfdump var="#variables.pegdown#" />
For showdownjs:
I've tried adding the extension file (extensions/table.js) to the var for evaluation and adding the extensions var to the converter options as per the documentation but it doesn't work. I'm guessing that showdown.js isn't expecting to be running inside the underlying Java scriptEngineManager as the main showdown.js script can't "see" the tables extension, failing at line 246 with;
The script had an error: sun.org.mozilla.javascript.internal.JavaScriptException: Extension 'undefined' could not be loaded. It was either not found or is not a valid extension. (#246) in at line number 246
My code for showdown.js is based on Orangepips answer in the linked question above.
<cfcomponent output="false" accessors="true">
<cffunction name="init" output="false" access="public" returntype="Showdown" hint="Constructor">
<cfset variables.manager = createObject("java", "javax.script.ScriptEngineManager").init()>
<cfset variables.engine = manager.getEngineByName("javascript")>
<cfreturn this/>
</cffunction>
<cffunction name="toHTML" output="false" access="public" returntype="any" hint="">
<cfargument name="markdownText" type="string" required="true"/>
<cfset var local = structNew()/>
<cfset var bindings = variables.engine.createBindings()>
<cfset var result = "">
<cfset var showdownJS = "" />
<cftry>
<cfset bindings.put("markdownText", arguments.markdownText)>
<cfset variables.engine.setBindings(bindings, createObject("java", "javax.script.ScriptContext").ENGINE_SCOPE)>
<cfset showdownJS &= fileRead('#getDirectoryFromPath(getCurrentTemplatePath())#/showdown.js')>
<cfset showdownJS &= fileRead('#getDirectoryFromPath(getCurrentTemplatePath())#/extensions/table.js')>
<cfset showdownJS &= showdownAdapterJS()>
<cfset result = engine.eval(showdownJS)>
<cfcatch type="javax.script.ScriptException">
<cfset result = "The script had an error: " & cfcatch.Message>
</cfcatch>
</cftry>
<cfreturn result>
</cffunction>
<cffunction name="showdownAdapterJS" output="false" access="private" returntype="string" hint="">
<cfset var local = structNew()/>
<cfsavecontent variable="local.javascript">
<cfoutput>#chr(13)##chr(10)#
var __converter = new Showdown.converter({extensions:['table']});
__converter.makeHtml(markdownText);</cfoutput>
</cfsavecontent>
<cfreturn local.javascript>
</cffunction>
</cfcomponent>
I'm open to any ideas and don't have any particular preference for one solution over another.
stacktrace
java.lang.ClassNotFoundException: org.parboiled.BaseParser at
coldfusion.bootstrap.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:235) at
java.lang.ClassLoader.loadClass(Unknown Source) at
com.compoundtheory.classloader.NetworkClassLoader.loadClass(NetworkClassLoader.java:463) at
java.lang.ClassLoader.loadClass(Unknown Source) at
java.lang.ClassLoader.loadClassInternal(Unknown Source) at
java.lang.ClassLoader.defineClass1(Native Method) at
java.lang.ClassLoader.defineClass(Unknown Source) at
java.lang.ClassLoader.defineClass(Unknown Source) at
com.compoundtheory.classloader.NetworkClassLoader.loadClass(NetworkClassLoader.java:450) at
java.lang.ClassLoader.loadClass(Unknown Source) at
java.lang.ClassLoader.loadClassInternal(Unknown Source) at
java.lang.Class.getDeclaredFields0(Native Method) at
java.lang.Class.privateGetDeclaredFields(Unknown Source) at
java.lang.Class.privateGetPublicFields(Unknown Source) at
java.lang.Class.getFields(Unknown Source) at
coldfusion.runtime.java.ObjectHandler.Initialize(ObjectHandler.java:35) at
coldfusion.runtime.java.ObjectHandler.<init>(ObjectHandler.java:30) at
coldfusion.runtime.java.ReflectionCache$1.fetch(ReflectionCache.java:29) at
coldfusion.util.SoftCache.get_statsOff(SoftCache.java:133) at
coldfusion.util.SoftCache.get(SoftCache.java:81) at
coldfusion.runtime.java.ReflectionCache.get(ReflectionCache.java:36) at
coldfusion.runtime.java.JavaProxy.<init>(JavaProxy.java:35) at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at
java.lang.reflect.Constructor.newInstance(Unknown Source) at
coldfusion.runtime.java.JavaProxy.CreateObject(JavaProxy.java:166) at
coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:80) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) at
cfJavaLoader2ecfc535209679$funcCREATEJAVAPROXY.runFunction(/srv/vhosts/myproject/httpdocs/components/javaloader/JavaLoader.cfc:329) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at
coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582) at
cfJavaLoader2ecfc535209679$funcCREATE.runFunction(/srv/vhosts/myproject/httpdocs/components/javaloader/JavaLoader.cfc:87) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) at
cfpegdown2ecfm1473046932.runPage(/srv/vhosts/myproject/httpdocs/_temp/markdown/pegdown.cfm:22) at
coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at
cfApplication2ecfc294205112$funcONREQUEST.runFunction(/srv/vhosts/myproject/httpdocs/Application.cfc:377) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) at
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) at
coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88) at
coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:280) at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:356) at
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at
coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at
coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at
coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at
coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) 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:200) at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at
jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at
com.intergral.fusionreactor.filter.FusionReactorCoreFilter.doRequestNoFilter(FusionReactorCoreFilter.java:712) at
com.intergral.fusionreactor.filter.FusionReactorCoreFilter.doFusionRequest(FusionReactorCoreFilter.java:341) at
com.intergral.fusionreactor.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:246) at
com.intergral.fusionreactor.filter.FusionReactorFilter.doFilter(FusionReactorFilter.java:121) at
jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at
jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at
jrun.servlet.FilterChain.service(FilterChain.java:101) at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at
jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Update
This is now working thanks to barnyr.
The problem stems from my lack of understanding of Java and the some additional dependancies for PegDown and Parboiled.
Parboiled needs both the java and core .jars of Pegdown.
Pegdown expects to find the ASM library
I used version 4.1 and included the -all- version. The recommendation is to only include the necessary asm jars but for now this is enough for me to take this further.
Working code for CF9 (Running on JRUN/Linux)
<!--- Load some demo markdown content --->
<cfset markdownString = fileRead("#getDirectoryFromPath(getCurrentTemplatePath())#/demo.txt")>
<!--- Directory containing all the necessary jar files. --->
<cfset jarDir = "#getDirectoryFromPath(getCurrentTemplatePath())#pegdown" />
<!--- Array of necessary classes --->
<cfset jClass = [
"#jarDir#/parboiled-java-1.1.3.jar"
, "#jarDir#/asm-all-4.1.jar"
, "#jarDir#/parboiled-core-1.1.3.jar"
, "#jarDir#/pegdown-1.2.1.jar"
] />
<cfset javaloader = createObject('component','components.javaloader.JavaLoader').init(jClass, false) />
<!--- Hex values for different extensions can be found in org.pegdown.Extensions.java (0x20 is for tables support) --->
<cfset variables.pegdown = javaloader.create("org.pegdown.PegDownProcessor").init(javaCast("int", InputBaseN("0x20", 16))) />
<!--- Output the HTML conversion --->
<cfoutput>#variables.pegdown.markdownToHtml(markdownString)#</cfoutput>
You're getting the error because of the way that PegDown's dependency - parboiled is distributed.
It's a scala project and it produces more than one JAR. The parboiled core jar you have appears to have just the core algorithms and the Scala language API.
To use the Java API, you'll also need to get hold of the parboiled-java library which provides the bindings (including the BaseParser class mentioned in the exception above). The GitHub repo only has the 1.1.4 files, but there's a copy of the 1.1.3 jar here: http://mirrors.ibiblio.org/maven2/org/parboiled/parboiled-java/1.1.3/parboiled-java-1.1.3.jar
If you download that and add it to the array of jar files you're handing to JavaLoader you should be OK.

Error in getting the tenant status

I have an instance of Stratos 1.5.1 running. After stratos sits over night without having been interacted with I get the following message on login to Identity Server
And I have added the autoReconnect to true both in the url call and in the property tag of user-mgt.xml
If anybody has an idea why the autoReconnect is not working that would be great. Thanks.
[2012-04-09 07:48:04,801] ERROR {org.wso2.carbon.user.core.tenant.TenantManager} - Error in getting the tenant status with tenant id: 2.
[2012-04-09 07:48:04,802] ERROR {org.wso2.carbon.identity.sso.saml.processors.AuthnRequestProcessor} - Error processing the authentication request
org.wso2.carbon.user.core.UserStoreException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 331,971,492 milliseconds ago. The last packet sent successfully to the server was 331,971,492 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
at org.wso2.carbon.user.core.tenant.JDBCTenantManager.isTenantActive(JDBCTenantManager.java:444)
at org.wso2.carbon.identity.sso.saml.processors.AuthnRequestProcessor.process(AuthnRequestProcessor.java:91)
at org.wso2.carbon.identity.sso.saml.SAMLSSOService.authenticate(SAMLSSOService.java:78)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:199)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.wso2.carbon.server.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:154)
at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:245)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:396)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:356)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1534)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
I followed instructions at
http://www.lahiru.org/2010/07/keep-live-connection-in-wso2-products.html
to correct this problem.
What this says to do is keep the mysql connection available. This required that i add these attributes
wait_timeout=259200
interactive_timeout=259200
and values to the /etc/my.conf file. I restarted and then waited 24 hours to verify and tried logging in again and this time it worked.

Why does a ColdFusion Implicit Setter end up making Networking Calls?

I have an implicit setter within the init() method of a CFC. I have observed (using Fusion Reactor, and, through error messages) that the simple call to setActive(false) ends up doing networking. I have no idea why ColdFusion would be doing so much work while setting this value using the implicit setters introduced with ColdFusion 9.
I am running the latest ColdFusion 9.01 with all the hotfix updates applied.
Do you know why ColdFusion would be going through all this trouble?
Thanks.
The Init Method of my CFC
/* Constructor
#user_id A valid User_ID. If provided, the User will self-populate.
*/
public shared.models.objects.User function init (numeric user_id = -1) {
super.init(argumentCollection=arguments);
// Prepare structs required for 'adding' methods
clearRoles();
setActive(false); // <--- THIS IS THE LINE
setUser_ID(user_id);
settings = {};
defaultLanguage = new shared.models.objects.Language();
setLanguages( [defaultLanguage] );
setLanguage( defaultLanguage );
if (user_id == -1) {
// Construct a 'blank' User
// addRole('Contributor');
setRequirePasswordChange(false);
} else {
// Attempt to populate a user
populate();
}
return this;
}
The stack trace showing the networking
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at jrun.servlet.jrpp.ProxyEndpoint.readFully(ProxyEndpoint.java:581)
at jrun.servlet.jrpp.ProxyEndpoint.readFully(ProxyEndpoint.java:573)
at jrun.servlet.jrpp.ProxyEndpoint.readInt(ProxyEndpoint.java:591)
at jrun.servlet.jrpp.ProxyEndpoint.readString(ProxyEndpoint.java:620)
at jrun.servlet.jrpp.ProxyEndpoint.getHeader(ProxyEndpoint.java:762)
at javax.servlet.http.HttpServletRequestWrapper.getHeader(HttpServletRequestWrapper.java:124)
at javax.servlet.http.HttpServletRequestWrapper.getHeader(HttpServletRequestWrapper.java:124)
at javax.servlet.http.HttpServletRequestWrapper.getHeader(HttpServletRequestWrapper.java:124)
at com.intergral.fusionreactor.filter.surrogate.e.getHeader(FusionReactorServletRequestProxy.java:248)
at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221)
at coldfusion.runtime.CgiScope.containsName(CgiScope.java:301)
at coldfusion.runtime.CgiScope.search(CgiScope.java:334)
at coldfusion.runtime.NeoPageContext.searchScopes(NeoPageContext.java:766)
at coldfusion.runtime.NeoPageContext.findAttribute(NeoPageContext.java:638)
at coldfusion.runtime.CfJspPage._get(CfJspPage.java:296)
at coldfusion.runtime.CfJspPage._get(CfJspPage.java:283)
at coldfusion.runtime.CfJspPage._get(CfJspPage.java:271)
at cfUser2ecfc1728567179$funcINIT.runFunction(C:\web\project\projecttv\shared\models\objects\User.cfc:131)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:389)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2723)
at cfBuilder2ecfc1779563022$funcBUILDCFC.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\ioc\Builder.cfc:111)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfInjector2ecfc1868990138$funcBUILDINSTANCE.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\ioc\Injector.cfc:288)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfNoScope2ecfc139649912$funcGETFROMSCOPE.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\ioc\scopes\NoScope.cfc:31)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfInjector2ecfc1868990138$funcGETINSTANCE.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\ioc\Injector.cfc:262)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
at cfRequest2ecfc135332213$funcENSUREREQUIREDOBJECTSEXIST.runFunction(C:\web\project\projecttv\atvcms\interceptors\Request.cfc:76)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2547)
at cfRequest2ecfc135332213$funcPREPROCESS.runFunction(C:\web\project\projecttv\atvcms\interceptors\Request.cfc:26)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:389)
at cfInterceptorState2ecfc1253590739$funcINVOKER.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\web\context\InterceptorState.cfc:139)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582)
at cfInterceptorState2ecfc1253590739$funcPROCESS.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\web\context\InterceptorState.cfc:86)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfInterceptorService2ecfc1842875288$funcPROCESSSTATE.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\web\services\InterceptorService.cfc:131)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfColdbox2ecfc1041943003$funcPROCESSCOLDBOXREQUEST.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\Coldbox.cfc:208)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfApplication2ecfc83985088$funcONREQUESTSTART.runFunction(C:\web\project\projecttv\atvcms\Application.cfc:149)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88)
at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:258)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:349)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
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:200)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at com.intergral.fusionreactor.filter.FusionReactorFilter.c(FusionReactorFilter.java:428)
at com.intergral.fusionreactor.filter.FusionReactorFilter.d(FusionReactorFilter.java:262)
at com.intergral.fusionreactor.filter.FusionReactorFilter.doFilter(FusionReactorFilter.java:171)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
I am encountering the same problem. I believe I can add something to this but ultimately I think there is a CF defect here which I'll try to elaborate on.
First notice in the stack trace this:
at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221)
at coldfusion.runtime.CgiScope.containsName(CgiScope.java:301)
at coldfusion.runtime.CgiScope.search(CgiScope.java:334)
at coldfusion.runtime.NeoPageContext.searchScopes(NeoPageContext.java:766)
at coldfusion.runtime.NeoPageContext.findAttribute(NeoPageContext.java:638)
When ColdFusion tries to resolve an unscoped variable, it will work its way up through the scope order of precedence testing each scope. If it gets all the way to CGI scope, the CF server attempts to ask the webserver connector for the CGI info in the Request's Header. In turn, the connector attempts to read from the connector handle that's holding on the TCP connection back to the browser. The network connection you are seeing in this posts original message may be the connector attempting to gather some of the CGI properties from the browser over TCP.
If the browser connection is no longer active, say the user closed the browser, clicked elsewhere, or there is a network interruption, then that TCP connection may be "stale". In that case, you will see a stack trace in the logs like this with the main message being "**error Error while reading header "
03/06 13:45:52 error Error while reading header <headername>
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
...
at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221)
at coldfusion.runtime.CgiScope.containsName(CgiScope.java:301)
at coldfusion.runtime.CgiScope.search(CgiScope.java:334)
ColdFusion will do a scope look up when using code like isdefined('myUnscopedVar') for example. If it gets all the way to CGI, then it will ask the connector for the header called myUnscopedVar. If the browser connection is gone, then the logs will show " error Error while reading header myUnscopedVar "
The way to avoid that is to use structKeyExists in all places you would use isDefined.
More details found in these related blog entries:
http://corfield.org/blog/index.cfm/do/blog.entry/entry/isDefined_vs_structKeyExists
http://www.coldfusionmuse.com/index.cfm/2009/8/6/examining.isDefined
http://www.mail-archive.com/cf-talk#houseoffusion.com/msg196119.html
If you search for the error message "error Error while reading header" you will actually get a lot of false positives in the search results because ColdFusion's CFSAVECONTENT tag is implemented as a CF custom tag stored in WEB-INF, and it does something similar that has the same effect of isDefined("anUnscopedVar") in the way it captures the generated content. The built-in CF Exception handler makes use of cfsavecontent when trying to pretty up exceptions for display, so it traps the underlying application exception, tries to pretty it up, but hits the "error Error while reading header" issue, and instead of seeing the original application exception, you get this header error which masks the true issue.
error Error while reading header S_UNABLE
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
...
at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221)
at coldfusion.runtime.CgiScope.containsName(CgiScope.java:301)
at coldfusion.runtime.CgiScope.search(CgiScope.java:334)
...
at cfsavecontent2ecfm1472308084.runPage(E:\cf9_final\cfusion\wwwroot\WEB-INF\cftags\savecontent.cfm:11)
...
at cfexception_en2exml1502993924.runPage(D:\JRun4\servers\cfusion\cfusion.ear\cfusion.war\WEB-INF\exception\exception_en.xml:52)
...
at cfdetail2ecfm1809038875.runPage(D:\JRun4\servers\cfusion\cfusion.ear\cfusion.war\WEB-INF\exception\detail.cfm:35)
...
at cfApplicationException2ecfm797577125.runPage(D:\JRun4\servers\cfusion\cfusion.ear\cfusion.war\WEB-INF\exception\coldfusion\runtime\ApplicationException.cfm:2)
Again the conclusion there is that if the browser connection has been dropped, then
your code may show the "reading header" error when doing a CGI lookup either by intention or because of using isDefined on an unscoped variable name.
So that's just some related background information. This issue intersects with the ORM issue in this thread.
I have found that in ColdFusion 9.01, sometimes calls to implicit setters causes ColdFusion to try to resolve the setter method as though it were a property, and it will look into the CGI scope to try to find it.
I have the following entity shown here (partly):
component persistent="true" table="myTable" output="false" extends="myBaseClass" {
property name="myProperty" column="myProperty" type="date" ormtype="timestamp";
Notice that it extends myBaseClass, which is shown (partly) here:
component {
public void function doSomething(){
if (hasProperty('myProperty'))
setMyProperty(now());
}
On some occasions when a template is requested which uses the entity, the template request appears to hang in the browser indefinitely with address bar spinning. Later when viewing the logs, I would find a related entry for the request showing the "error while reading header".
03/06 13:45:52 error Error while reading header SETMYPROPRTY
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
...
at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221)
at coldfusion.runtime.CgiScope.containsName(CgiScope.java:301)
at coldfusion.runtime.CgiScope.search(CgiScope.java:334)
...
at cfmybaseclass2ecfc1915167844$funcDOSOMETHING.runFunction(X:\MyApp\myBaseClass.cfc:8)
...
at coldfusion.orm.hibernate.HibernateEventHandler.onFlushDirty(HibernateEventHandler.java:130)
...
at coldfusion.orm.hibernate.HibernatePersistenceManager.onCommit(HibernatePersistenceManager.java:950)
...
at cfsomecomp2ecfc1707726523$funcRUN.runFunction(X:\MyApp\SomeComp.cfc:131)
This stack trace tells me that ColdFusion was trying to resolve an implicit setter and tried to find it in the CGI scope by asking the connector for an HTTP request header of the same name.
To me, trying to resolve an implicit getter by searching the CGI scope for the Request Header seems like a ColdFusion defect.
Opinions?