• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfapplication parameters fail

Explorer ,
Dec 08, 2015 Dec 08, 2015

Copy link to clipboard

Copied

I have ColdFusion 9 running on a Windows 10 Pro computer.  I am using ColdFusion's built-in server.  Everything runs perfectly.  However, when I run it from another computer on the same network, I get an error I have never seen before.  It balks at one of CFAPPLICATIONS's parameters in the Application.cfm file.  As I mentioned, this Application.cfm file works perfectly locally.  (In fact it is the same Application.cfm file I have been using since Coldfusion 5 running on a Win 2000 Pro machine.)  Here is a bit from that file:

<CFAPPLICATION

    name             = "FredsWebApps"

    clientManagement    = "YES"

    setClientCookies    = "YES"

    sessionManagement    = "YES"

    setDomainCookies    = "NO"

>

but on the local machine I get this error:

The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Null Pointers are another name for undefined values. Resources:

Browser       Mozilla/5.0 (Windows NT 5.0; rv:10.0.12) Gecko/20100101 Firefox/10.0.12

Remote Address       192.168.1.3

Referrer      

Date/Time       08-Dec-15 10:15 AM

Stack Trace

java.lang.NullPointerException

If I modify Application.cfm to remove everything except the "name" parameter it works (but of course other things fail).  So

<CFAPPLICATION

    name             = "FredsWebApps"

>

generates no error, but even

<CFAPPLICATION

    name             = "FredsWebApps"

    sessionManagement    = "YES"

>

will generate the above error.  (I get a similar error using IE.)

I hope I haven't gone on too long, but help would certainly be appreciated.

Views

462

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 08, 2015 Dec 08, 2015

Copy link to clipboard

Copied

What version of JVM are you running ColdFusion 9 on?

-Carl V.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 08, 2015 Dec 08, 2015

Copy link to clipboard

Copied

I am embarrassed to say I don't know how to get my JVM version. In something called the Java Control Panel it lists in the popup "About" window: Version 8 update 66.  In the Coldfusion administrator it lists, under Settings Summary:

Java VM Specification Version 1.0  
Java VM Specification Vendor Sun Microsystems Inc.  
Java VM Specification Name Java Virtual Machine Specification  
Java VM Version 14.0-b16  
Java VM Vendor Sun Microsystems Inc.  
Java VM Name Java HotSpot(TM) Server VM  
Java Specification Version 1.6  
Java Specification Vendor Sun Microsystems Inc.  
Java Specification Name Java Platform API Specification  
Java Class Version 50.0  

I don't know if JVM is the same as Java, but if it is, this may help.  At Java Tester - What Version of Java Are You Running? I get a popup error box saying "Application Blocked - Click for details.  Your security settings have blocked an untrusted application from running." but I wasn't all that much worried about that message because my <CFapplication code works without error on the server PC.  I only get the error when trying to access the Web page from a different PC.  By the way, this Coldfusion version 9,0,0,251028.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 09, 2015 Dec 09, 2015

Copy link to clipboard

Copied

CF installs its own JVM which is separate from the OS JVM.  Your OS is using Java 1.8u66, but CF is using Java 1.6.

CF9 does not work well with Java 1.7u31 and later - apparently they started denying certain network accesses by default that were allowed in previous versions and called it a security update.  At least, I know for a fact that 1.7u31 and later will prevent Solr collections (and probably Verity collections) from working.  I've never found a decent fix, for that.  I can tell you that the most recent downloads of CF11 have Java 1.8, and it works just fine.

Have you applied all updates and hotfixes for CF9?  It looks (from your statement "By the way, this Coldfusion version 9,0,0,251028.") as though you do not have any updates or hotfixes.  There is 9.0.1, which still supports Verity collections; and 9.0.2, which no longer supports Verity collections, and uses Solr (Lucene) for collections.

My suggestion would be to apply (in order) all updates and hotfixes for your specific version of CF and see if that fixes anything.

HTH,

^_^

UPDATE: Och!  Carl snuck in while I was typing.  Carl FTW. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 09, 2015 Dec 09, 2015

Copy link to clipboard

Copied

OK, you are running the 1.6 version of the JVM (Java 6), probably the one that comes with ColdFusion 9.  It's very out of date and insecure, not to mention may not be fully compatible with Windows 10.  I would at least upgrade to the 1.7 (Java 7) version of the JDK, which ColdFusion 9 is compatible with.  But honestly, you should be running ColdFusion 10 or 11 as those are the only current Adobe-supported versions of ColdFusion and they are the only ones certified to run on Windows 10 (assuming you install the latest updates that include Windows 10 support).

-Carl V.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 09, 2015 Dec 09, 2015

Copy link to clipboard

Copied

Coldfusion 9.0.0 was quite buggy. As Carl and WolfShade suggest, you should consider upgrading to CF 9.0.2 or even to CF 10 or 11. In any case, if you stay on Coldfusion 9 you should install the latest hot fixes.

Be aware that your application settings may have unintended consequences. For example, if you set clientmanagement to true, and mention nothing about clientStorage, ColdFusion will store the client variables by default in the server's registry. I would also advise you to add timeouts and to use Application.cfc instead of Application.cfm. Something like this:

Application.cfc

<cfcomponent>

    <cfscript>

        this.name = "FredsWebApps";

        this.applicationTimeout = "#createTimespan(1,0,0,0)#";

        this.clientManagement = "yes";

        this.clientStorage = "cookie";

        this.sessionManagement = "yes";

        this.sessionTimeout = "#createTimeSpan(0,0,20,0)#";

        this.setClientCookies = "yes";

        this.setDomainCookies = "no";

     </cfscript>

</cfcomponent>

I hope this helps.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 09, 2015 Dec 09, 2015

Copy link to clipboard

Copied

I want to thank everybody for their well thought out replies. It has been a rather hard issue for me to solve. This morning, after making a few changes to the server PC, and after rebooting, the code on the server was no longer working!  It gave me the same message as on the remote machines, something like "The system has attempted to use an undefined value..."  The error comes immediately in Application.cfm in the second line of the <CFAPPLICATION tag.  The details were in my original post. 

Of course I couldn't remember what changes I had done to the server PC so I could undo them.

Then I started playing around making more changes.  I reinstalled IIS (which I had uninstalled, reasoning I didn't need it if CF had its own server) and a number of other "Windows Features," changed CF's built-in server from 80 back to its default of 8500, rebooted the machine and, I kid you not, it started working!  The server PC's CF code was now working perfectly.  Nervously I went over to another PC and tried accessing the server PC and it worked!  I have no idea why.  And, as all programmers, we hate that feeling.  Will a Windows update, or a Java update, or some change I might make to the Firewall in the future start it to fail all over again?

(I don't know if any of you are old enough to remember the wonderful world of DOS and its config files.  Where everything that was critical to your code's operation was right in front of you.  You could just walk through the code, line by line, and nail down any problems.  And nothing ever, ever changed in the background. Now a reboot gives me the willies.)

Of course, an expert in JVM could probably look at the its error dump and track down the problem.  I was involved in moving CF 5 code from an old Windows 2000 Pro machine to a new Dell box.  That's how I get involved with CF 9.  It was the closest version to CF 5 that I could still find.  (By the way, a couple of people have wondered why I didn't install CF 10 or CF 11.  I tried to install each of these a couple of times.  There was never an install error message, but handler mappings never got added to IIS so, of course, none of my CF code ran.  It was only when I tried CF 9 and its built-in server that I made any progress at all.)

There was one other little thing that might be of interest to the users of this forum. On the remote PC I had a bookmark to my code on the server PC.  That bookmark failed, but when I typed the URL in directly it worked!  Both URLs were the same!  Then I looked closer.  One URL referenced "Home.cfm" and the other referenced "home.cfm"  They weren't the same. One had a captial H and the other had a lower case h.  Except on Unix systems I never new URLs could be case sensitive. It just blew me away.  Upon digging in to this a bit, many people on this forum have pointed out that CF's built-in server is TomCat, which was built on Unix!  So CF's built-in server needs the file names to be case aware, whereas external web servers, like IIS do not.  (Imagine in my miles of code how many file names I have.  And now I have to check those for proper case.  Well that's a problem for another day.)

I am not sure if I am supposed to mark this topic as Answered.  Again, thanks to all who stepped forward to help me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 10, 2015 Dec 10, 2015

Copy link to clipboard

Copied

I believe that the "built-in" webserver for CF Server is for development, not production; although I cannot swear to it.  If you are deploying anything in a live production environment, I highly recommend using either IIS (boo) or Apache (YAY!).

As far as DOS goes, I cut my computer teeth on a 1984 IBM PC XT (8086) with 64K RAM, a 16 color monitor, 2MB hard drive, one floppy, one micro-floppy, and DOS 3.31.  My dad still uses it for printing shipping labels on a dot-matrix tractor-feed printer. 

As far as your CF10/11 woes, did you run wsconfig after the install?  That _should_ have created your mappings.  Just tell it where your IIS/Apache is, pretty much.

Case sensitivity in filenames:  I hate to sound trite, but I consider it good form if you _always_ make sure you are using proper case in everything, including filenames, variables (even though CF pushes it to all caps), etc.

HTH,

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 10, 2015 Dec 10, 2015

Copy link to clipboard

Copied

fredp60157821‌, I'll mark the question as "Assumed Answered", since none of the comments on the thread seemed to have directly solved your problem.

It sounds like you did a whole bunch of stuff on your server, then found your application was suddenly working.  Next time, it would be beneficial to do one thing at a time and check your application after each step - that way you can truly identify what the problem was, and document it not only for yourself, but others as well.

Glad you are up and running!

-Carl V. - Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 10, 2015 Dec 10, 2015

Copy link to clipboard

Copied

LATEST
fredp60157821 wrote:

There was one other little thing that might be of interest to the users of this forum. On the remote PC I had a bookmark to my code on the server PC.  That bookmark failed, but when I typed the URL in directly it worked!  Both URLs were the same!  Then I looked closer.  One URL referenced "Home.cfm" and the other referenced "home.cfm"  They weren't the same. One had a captial H and the other had a lower case h.  Except on Unix systems I never new URLs could be case sensitive. It just blew me away.  Upon digging in to this a bit, many people on this forum have pointed out that CF's built-in server is TomCat, which was built on Unix!  So CF's built-in server needs the file names to be case aware, whereas external web servers, like IIS do not.  (Imagine in my miles of code how many file names I have.  And now I have to check those for proper case.  Well that's a problem for another day.)

Tomcat was brought into ColdFusion from CF10. So this excerpt cannot apply to ColdFusion 9, whose built-in server is JRun. Nevertheless, it made me wonder whether the problems you encountered were caused by remnants of a previous CF10 or CF11 installation.

Anyway that is all purely academic now. The important thing is that you solved the problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation