• Home
  • About George
  • Contact Me
Blue Orange Green Pink Purple

Archive for the ‘ColdFusion’ Category

You can use the search form below to go through the content and find a specific post or page:

May 07

Limit on CFC Size?

So a few months ago I wrote a post about a java.lang.StackOverflowError I had experienced with Model-Glue and ColdSpring.   You can read about it here and here.  We it reared it’s ugly head again today.  I’m not sure exactly what is happening and maybe someone with a better knowledge of ColdSpring can help me out here.  I solved the problem by moving my new function into a different Service.cfc.  Why this worked?  I don’t know, but it seems that it has something to do with the size of the file.  It’s only running about 1500 lines in the service, but I have another service with more functions that runs 3000 lines of code.  But moving it out, definitely solves the ColdSpring compile error and allows me to move forward with development.

Any thoughts out there?

Apr 18

OO Form Processing

Read a few interesting posts recently about Object Oriented Form work. Going to have to try this out myself. Here are some examples if you’re interested:

http://www.halhelms.com/blog/index.cfm/2009/4/8/Form-Processing–the-OO-Way–the-Movie

http://www.bennadel.com/blog/1557-Object-Oriented-Form-Helpers-And-Reusing-Form-Validation-On-The-Client.htm

Apr 07

Web Service Run Around

I was recently tasked by my bosses to make some changes to a web service that existed on one of our clients sites. I’m not an ASP.NET guy – but it turned out to be what it was currently written in so I wanted to give it a shot and figured it would save me time on actually getting it done. That should have been my first clue that I was way off!

So I started off by having to upgrade the .NET library – the old app was written on version 1 something of .NET and the free Visual Web Developer forced it into an upgrade in order for me to even look at the code. I had tried using Eclipse first but that just have any way to compile out the ASP code. So after upgrading, we went through some hoops getting the server upgraded and also one crash of the IIS Server by not setting the DefaultAppPool properly. Like I said – not an ASP.NET guy!

So after that’s all compartmentalized, we start running into 401 – User Not Authorized problems. Turns out we had the server set to accept client certificates and were unable to connect through with them. Got that changed over and both the old service and the new seemed to be accepting the login scheme I copied over without a problem. When I went to run my new functionality though I just couldn’t get it to work. So I changed the name of my .asmx file from the default Service1 to NewService and went through the associated hoops trying to get everything running and compiling again. That was fun in and of itself. After uploading it, I could no longer connect when pointing to NewService. It seems that even though Service1 was in a different directory and application for ASP.NET when I was calling them – the SOAP URLs were pointing to the right places – that my calls to the app that now had NewService had been calling the Old Service1 instead.

So again I ran into the 401 Unauthorized problems. Started digging some more and there were a couple of things that I was able to finally find after much reading on the Internet. It seems that most suggest using anonymous browsing for the web service application directory. We couldn’t do that because of security requirements on the project, so we had it set to Integrated Windows Authentication under the Directory Security tab. However ColdFusion wasn’t able to talk to it then. Once I added Basic Authentication and gave it the proper domain, I was then able to connect like a champ and hit the newly created service!

So don’t forget to make sure your IIS Settings are what they should be, and then add to that the name changes. Now I just need to figure out how to create a test environment for this so that I can compile and make changes without taking down the service for the clients while they are working!

Apr 01

CFDocument Style Fixes

Okay – so I had spent a good bit of time working on a few pages that I rendered as both HTML and PDF and they worked like champs, made it through one round with the client even.  Came back the next season – this week – to prep them for the next go round, add the changed fields, clean up some other code, and wouldn’t you know it but the HTML rendered fine and the PDFs didn’t.  This threw me for a total loop.  I wasn’t sure what had happened.  I found this post – cfdocument post by rip – and thought that may be the solution, but it wasn’t working either.  I got the pages to be XHTML strict even!

Then a co-worker suggested we just copy all the CSS into the pages.  Wouldn’t you know it but putting the CSS in a style tag on the page itself rendered the items as they should be.  So to preserve reusability I snapped them inbetween the style tags with a cfinclude.  That’s my suggestion for anyone else having trouble with this kind of thing. And make sure you have the media type with print in there too for your style declaration!

Mar 11

java.lang.StackOverflowError – Solution!

Okay, so this turned out to be a twofold thing. One – I had a circular reference in my ColdSpring file. BeanA needed BeanB and BeanB needed BeanA. The problem was that even though I saw this and had tried to fix it, it wouldn’t solve the problem. I still kept getting the StackOverflowError showing. Then I happened across this post which basically had a thing about the circular references and that you should use a setter injection instead of constructor injection in order to fix the problem. I hadn’t thought of using setter injection for anything other than the things autowired by ModelGlue such as my services in my controllers or the beanfactory so this was a new way of thinking of it for me. The beauty of it though was that it worked! My code now compiled.

My thanks go out to Dan Wilson for getting me pointed in the right direction on the google group for Model-Glue!

Mar 11

java.lang.StackOverflowError

I’ve been working on building a fairly large Model-Glue application and it’s been up and running for going on 4 months. Yesterday I was working on some of the planned enhancements when I ran into a 500 ROOT CAUSE: java.lang.StackOverflowError problem. I’ve tracked it down to one instance of adding one referenced bean onto one of my service instances. I can comment out the bean and everything compiles. I can change it to one of my DAO beans and it works, I change it to another of my service beans and it causes the StackOverflowError again.

I have moved some of the ColdSpring.xml out to includes to reduce the file size and that has had no effect. I updated to 1.2 and had no change either. I’ve seen some minor changes in the rest of the error stack when I change up the service I’m including, but it’s more often than not this as the next couple lines:

at coldfusion.runtime.LocalScope.bindInternal(LocalScope.java:373)
at coldfusion.runtime.LocalScope.bindInternal(LocalScope.java:387)
at cfAbstractBeanFactory2ecfc1246833417$funcRESOLVEBEANNAME.runFunction(coldspringbeansAbstractBeanFactory.cfc:193)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471)

followed by a repeating of the above with several other calls to the cfAbstractBeanFactory instance. I know I’m not providing much, but I’m absolutely stumped as to what can be causing the problem. The bean I am adding that causes the error is also used as a ref bean on another bean without causing the problem. Any ideas that I could poke around at would be much appreciated!

Feb 25

ColdFusion Server Monitor

So last week we had a site running amok on one of our CF8 servers so we decided to use the ColdFusion Server Monitor to see if we could figure it out. Well starting the thing pegged the server’s processors to 100% and we couldn’t get anything done, so we rebooted the machine. After reboot – since it was the middle of the day and all – we noticed that several sites were not coming back up. So we started looking around on the Internet for ways we could fix it. The sites that weren’t coming back up were all Model-Glue run so we thought it might be something in that. Producing the CFLoop error when the application was trying to compile for the first time.

Well after some digging, I came across several posts by people mentioning how Sean Corfield had talked about the JRE version included with CF8 was experiencing a bug in the way it compiled components – something that any Model-Glue application is going to do extensively at startup as it tries to build the entire library for ColdSpring. You can read about it here - ColdFusion 8 And Java 6.  So we changed out the JRE version overnight to the newest release of Java 6 Update 12.  We were still having problems with the sites compiling though, so we switched to 11.  Still no joy.

So we were getting a little concerned – it was going on a full day now since we had the sites go down.  So we said – well let’s try that Server Monitor again and see if we can tell what’s happening with it.  So we fired it up expecting the worst and saw that all of it’s options were still running.  Basically, restarting the server hadn’t set the Server Monitor back to an Off position.  Once we turned all the options off and saved it, the two down sites started again.   Unbelievable!

So the side note is, having found the article by Corfield, we have a more responsive version of ColdFusion 8 with Java 6 running on our server.  I think I can notice a difference, not sure if the clients can or not, but I know it made for a happy day once everything came back on line.

« Newer Posts

Web Development By George

  • About
    About me. Edit this in the options panel.
  • Photo Stream
  • Categories
    • ColdFusion
    • coldspring
    • Databases
    • Design
    • Flash
    • Flex
    • Internet
    • JavaScript
    • jQuery
    • Model-Glue
    • Personal
    • Subversion
    • Uncategorized
    • YUI
  • Recent Articles
    • Radios and JQuery and IE8
    • Coldfusion, Flex, and SSL
    • Leaving it to the Experts
    • CFAjaxProxy Problems or RTFM
    • I love the Internet
    • Interesting ColdFusion Survey
  • Archives
    • November 2011
    • May 2011
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • November 2009
    • October 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
  • Search




Add to Technorati Favorites

  • Home
  • About George
  • Contact Me

© Copyright Web Development By George. All rights reserved.
Designed by FTL Wordpress Themes brought to you by Smashing Magazine

Back to Top