Strange Bean creation exception when using jQuery UI with ColdSpring

14 views
Skip to first unread message

ColdWarrior

unread,
Sep 20, 2009, 2:35:27 PM9/20/09
to ColdSpring-Users
I have a site that has been running flawlessly for some time now, but
after making some minor changes to the user interface today I am
beginning to randomly see a couple of strange ColdFusion errors from
ColdSpring. (Sometimes it works fine and there are no problems, but it
is hit or miss) I have made NO programmatic changes to the site, ONLY
HTML / JavaScript changes. When I revert the changes back I stop
seeing the error. (I am 100% certain that I am not accidentally
changing anything that has to do with ColdFusion code, I am only
switching between using ExtJS tabs and jQuery tabs for some content,
these are simple HTML changes).

The site is running Coldbox / ColdSpring / Transfer and I have not
experienced this erratic behavior until today. I will try to explain
as best I can... (the error is coming from ColdSpring)

The basic layout is simple, it is just a page with a box that contains
two tabs.

So:

[header]

[tab1] [tab2]

[footer]

Each of the tabs loads a different page in an iFrame, so:

tab1 = index.cfm?event=users.created
tab2 = index.cfm?event=users.received

I have been using ExtJS for the tabs, which works perfectly. When I
load the main page, both iFrames load fine. I can click on either tab
and the page is properly loaded into the iFrame within the tab with no
errors.

However, when I switch to using jQuery UI tabs, I get the following
error intermittently on the pages that are in the the iFrames.
(usually on the first visit after I reinitialize my application)

Oops! Exception Encountered
Application Execution Exception
Error Type: coldspring.beanCreationException : [N/A]
Error Messages: Bean creation exception during init() of
model.users.userService
source file [C:\Program Files (x86)\Apache Software Foundation\Tomcat
6.0\sites\mysite\ROOT\config\definitions
\model.users.userService.saveuser.aop.transfer] is not a file:
Tag Context:
ID: ??
LINE: 893
Template: C:\Program Files (x86)\Apache Software Foundation\Tomcat
6.0\sites\mysite\ROOT\coldspring\beans\DefaultXmlBeanFactory.cfc

The pages that load in each tab both use my model.users.userService
object, although I'm not sure why using jQuery tabs causes the
ColdFusion page to sometimes throw an error, while using ExtJS does
not. I do not always get the error, it seems to be spontaneous and
only to appear after I reinitialize my application and try to visit
one of the tabs that contains an iFrame page. After I get the error
and reload the iFrame, I do not receive the error again until I
reinitialize my application. Sometimes I do not get the error at all,
even after a reinitialization.

I thought that perhaps the pages in the iFrames were trying to load
before the application was done initializing, but after disabling
autoload on the iFrames and telling jQuery only to load the page AFTER
I click the tabs, I am sure that the application is initialized by the
time I click the tab. So, if I reinit my application, then wait, and
then click a tab, I still get this error. The odd thing is that if I
reinitialize my application and then visit the same page that is being
loaded into the iFrame in another browser window instead, I never get
the error.

When I switch back to ExtJS for the tabs I cannot reproduce the error.

So, I am VERY confused. Once the error said:

can't create file C:\Program Files (x86)\Apache Software Foundation
\Tomcat 6.0\sites\mysite\ROOT\config\definitions
\model.users.userService.saveuser.aop.transfer, file already exists
Tag Context:

But most often it is the "is not a file" error.

So, to reiterate:

1.) The error only happens when using jQuery UI tabs, not ExtJS tabs.

2.) There are NO changes to the ColdFusion code at all. I am
essentially changing a piece of JavaScript that determines how the
content on the page looks, not how it is generated.

Does anyone have any brilliant suggestions? :)

Gavin Baumanis

unread,
Sep 20, 2009, 8:53:10 PM9/20/09
to ColdSpring-Users
HI,

About the only thing "CS" I can think of is to take onboard what was
mentioned in a previous thread... and perhaps get some more details
out of the error message?
Just to ensure that you're not getting a generic response masking what
is actually happening.

Though a file not found error pretty much always means a file is not
found!
Any chance you have your paths (jQuery) configured incorrectly... I
know it's so simple - it seems silly to ask... but it's tripped me up
before today.... and I would have sworn it was correct!!

Also, what versions of software are you using?

CF / CS / jQuery / Java / etc.

We're successfully using jQuery and ColdSpring with CF9 and (the built-
in) hibernate.
We're using tabs and drag/drop - lots of JSON too. So at least froma
reassuring point of view - it can and does work.

Though we're not using an iFrame... so I don't know if there is a
peculiar difference jQuery has with playing nicely with iFrames.
Oh and we're using Fusebox, not ColdBox.... but really I can't see the
controller being the issue here.


Gavin.

Mark Mandel

unread,
Sep 20, 2009, 9:20:33 PM9/20/09
to coldspri...@googlegroups.com
Sounds like you are applying Transfer AOP to your Service on every request (either that, or on every request you are recreating ColdSpring, which is recreating you model).

What are you ColdBox Settings?

Sounds like 2 requests are coming in at the same time, the AOP code is firing, and either writing the AOP file before the other one gets there, or taking it away before the other one finishes.

Mark
--
E: mark....@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

Gavin Baumanis

unread,
Sep 20, 2009, 9:51:49 PM9/20/09
to ColdSpring-Users
Ahaa... the use of ColdBox probably should have alerted me to the AOP
aspect...
But only ever having used CS for Dependency Injection... I overlooked
it!

Gavin.


On Sep 21, 11:20 am, Mark Mandel <mark.man...@gmail.com> wrote:
> Sounds like you are applying Transfer AOP to your Service on every request
> (either that, or on every request you are recreating ColdSpring, which is
> recreating you model).
>
> What are you ColdBox Settings?
>
> Sounds like 2 requests are coming in at the same time, the AOP code is
> firing, and either writing the AOP file before the other one gets there, or
> taking it away before the other one finishes.
>
> Mark
>
> On Mon, Sep 21, 2009 at 10:53 AM, Gavin Baumanis <b...@palcare.com.au>wrote:
>
>
>
>
>
> > HI,
>
> > About the only thing "CS" I can think of is to take onboard what was
> > mentioned in a previous thread... and perhaps get some more details
> > out of the error message?
> > Just to ensure that you're not getting a generic response masking what
> > is actually happening.
>
> > Though a file not found error pretty much always means a file is not
> > found!
> > Any chance you have your paths (jQuery) configured incorrectly... I
> > know it's so simple - it seems silly to ask... but it's tripped me up
> > before today.... and I would have sworn it was correct!!
>
> > Also, what versions of software are you using?
>
> > CF / CS / jQuery / Java / etc.
>
> > We're successfully using jQuery and ColdSpring with CF9 and (the built-
> > in) hibernate.
> > We're using tabs and drag/drop - lots of JSON too. So at least froma
> > reassuring point of view - it can and does work.
>
> > Though we're not using an iFrame... so I don't know if there is a
> > peculiar difference jQuery has with playing nicely with iFrames.
> > Oh and we're using Fusebox, not ColdBox.... but really I can't see the
> > controller being the issue here.
>
> > Gavin.
>
> --
> E: mark.man...@gmail.com

whostheJBoss

unread,
Sep 20, 2009, 9:53:50 PM9/20/09
to ColdSpring-Users
Thanks for the response!

I'm sure it's not generic. The error is coming from the ColdFusion
page, it's telling me that an object cannot be found. (A generated
object). When I switch the exact code back to ExtJS everything works
fine.

The other thing is that it works most of the time, I just get the
error intermittently. When it works fine, the whole site works, so
it's not a mapping issue because it works half of the time.

whostheJBoss

unread,
Sep 20, 2009, 9:59:54 PM9/20/09
to ColdSpring-Users
Thanks Mark, this may be the issue! :)

I guess ExtJS is more tactful about the way it loads tabs, so there
are no simultaneous requests.

I assume you mean this ColdBox setting?

<Framework type="coldspring" reload="true" objectCaching="true">/
config/coldspring.xml.cfm</Framework>

Should it be this instead?

<Framework type="coldspring" reload="false" objectCaching="true">/
config/coldspring.xml.cfm</Framework>

I have made the change and haven't experienced the error yet. I will
let you know if the circumstance changes.

Funny, I was thinking of posting this to the transfer-dev list :)

On Sep 20, 6:20 pm, Mark Mandel <mark.man...@gmail.com> wrote:
> Sounds like you are applying Transfer AOP to your Service on every request
> (either that, or on every request you are recreating ColdSpring, which is
> recreating you model).
>
> What are you ColdBox Settings?
>
> Sounds like 2 requests are coming in at the same time, the AOP code is
> firing, and either writing the AOP file before the other one gets there, or
> taking it away before the other one finishes.
>
> Mark
>
> On Mon, Sep 21, 2009 at 10:53 AM, Gavin Baumanis <b...@palcare.com.au>wrote:
>
>
>
>
>
>
>
> > HI,
>
> > About the only thing "CS" I can think of is to take onboard what was
> > mentioned in a previous thread... and perhaps get some more details
> > out of the error message?
> > Just to ensure that you're not getting a generic response masking what
> > is actually happening.
>
> > Though a file not found error pretty much always means a file is not
> > found!
> > Any chance you have your paths (jQuery) configured incorrectly... I
> > know it's so simple - it seems silly to ask... but it's tripped me up
> > before today.... and I would have sworn it was correct!!
>
> > Also, what versions of software are you using?
>
> > CF / CS / jQuery / Java / etc.
>
> > We're successfully using jQuery and ColdSpring with CF9 and (the built-
> > in) hibernate.
> > We're using tabs and drag/drop - lots of JSON too. So at least froma
> > reassuring point of view - it can and does work.
>
> > Though we're not using an iFrame... so I don't know if there is a
> > peculiar difference jQuery has with playing nicely with iFrames.
> > Oh and we're using Fusebox, not ColdBox.... but really I can't see the
> > controller being the issue here.
>
> > Gavin.
>
> --
> E: mark.man...@gmail.com

whostheJBoss

unread,
Sep 20, 2009, 10:04:48 PM9/20/09
to ColdSpring-Users
Grr, Google Groups keeps switching me back and forth with different
nicknames!
Reply all
Reply to author
Forward
0 new messages