My Company has been stuck on CF9 for a while now due to some Informix database issues caused by the switch to Tomcat instead of JRun in CF10. We finally have gotten a work around for the problem from IBM and I am working on getting stuff migrated to CF2016. There are quite a few issues to work through because of the large version change, but I've ran into two problems that I simply cannot find a way to resolve myself and neither comes up with many results on the web.
First off the less important issue, but something I'd still like to figure out. If I'm using the built in tomcat server, and navigating to a local CF2016 server at port 8600, I get dropped connection issues or something. The error I'm seeing is:
GET http://localhost:8600/emr/ net::ERR_INCOMPLETE_CHUNKED_ENCODING
I cannot find any reason for this to be happening... I've completely blown away the entire server configuration reconfigured it from scratch multiple times and continue to see this error through the tomcat port. I originally was using a CF2016 deploy bundled and installed with Coldfusion Builder 2016, but am currently using a configured copy of CF2016 Express. Both exhibit this behavior. Anyone have any ideas what could possibly cause this and how I can resolve it? This is the less important problem because I've worked around it by setting up Apache and running the connector configuration to access the site through apache on port 80. But, I'd still like to resolve this issue.
Second, this is the more important problem. In our application we have some CFCs have init functions and return a reference to themselves. For example, we have a ClientSearch.cfc, the path to this CFC is emr/com/client/ClientSearch.cfc. So the init function looks like this:
<cffunction name="init" access="remote" returntype="emr.com.client.ClientSearch"> <cfargument name="userid" type="string" required="no" default="#session.userCfc.getLogonID()#" hint="user to run queries as"> <cfargument name="password" type="string" required="no" default="#session.userCfc.getPassword()#" hint="db password for user running queries">
<cfset variables.userId = Trim( arguments.userid )>
<cfset variables.password = Trim( arguments.password )>
<cfset variables.loginID = Trim( session.userCfc.getLogonID() )>
Pretty basic function just setting a few initiization arguments and returning itself. The problem is, sometimes instead of returning type emr.com.client.ClientSearch, it returns type ClientSearch. And I can't figure out why. When it starts to do this I fix it by making a temporary page to call CreateObject( "component", "emr.com.client.ClientSearch" ).init(), and then modify the CFC to set access="public" on this function. Run the temporary page, then change the CFC back to access="remote" and everything runs fine for a while. At some point it will randomly decide to revert to it's problematic state of returning a type of simply ClientSearch. So when this happens I of course get the error:
The value returned from the init function is not of type emr.com.client.ClientSearch.
If the component name is specified as a return type, it is possible that either a definition file for the component cannot be found or is not accessible.
This is very problematic for us if these CFC cannot be relied upon to return the correct types... And again I can't find anything similar when searching on google and can't think of any inclination on why this would be happening.
Thanks for any help you can provide.