I’m migrating an app from ACF to Lucee 5 on Windows. I was hitting some
errors where some application variables I was trying to reference where not
being defined. I tracked it down and it seems that onApplicationStart() was
not firing. I simplified the function to
public boolean function onApplicationStart()
{
writeLog (text=“Application #this.name# started!!!”, file=“application”,
type=“Debug”, application=“no”);
return true;
}
When I restart the Lucee server and make the first request I don’t get an
entry in the log file. I’m looking in the correct log and I can see other
log statements written there.
If I hit a page that calls applicationStop(), then on the next request
onApplicationStart() is called and I see the log entry. But why would it
not be called on the very first request?
i just did a testcase based on your input , i have the test make a little
bit clearer.
component {
this.name=createUUID();
public boolean function onApplicationStart() {
throw “start”;
return true;
}
}
to be sure i have a new application context with every request i change the
name (red) with every request and then i throw an exception (blue), because
writing to the log can have a delay (for performance reasons).
this works as expected for me.
to be honest it is unlikely that the onApplicationStart does not work in
that way, this would break every second application out there.
i will add a testcase that checks if onApplicationStart and
onApplicationStart get invoked correctly.
MichaOn Wed, Aug 10, 2016 at 6:40 PM, Phil Cruz <@Phil_Cruz> wrote:
I’m migrating an app from ACF to Lucee 5 on Windows. I was hitting some
errors where some application variables I was trying to reference where not
being defined. I tracked it down and it seems that onApplicationStart() was
not firing. I simplified the function to
public boolean function onApplicationStart()
{
writeLog (text=“Application #this.name# started!!!”, file=“application”,
type=“Debug”, application=“no”);
return true;
}
When I restart the Lucee server and make the first request I don’t get an
entry in the log file. I’m looking in the correct log and I can see other
log statements written there.
If I hit a page that calls applicationStop(), then on the next request
onApplicationStart() is called and I see the log entry. But why would it
not be called on the very first request?
–
Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit https://ti.to/cfcamp/cfcamp-
2016/discount/Lucee@cfcamp
Can you please post your application.cfc here if possible? I have a suspicion…
GertSent from somewhere on the road
Am 10.08.2016 um 19:33 schrieb Phil Cruz <@Phil_Cruz>:
Yes, when I create a simple test app I get the expected behavior.
I’m only seeing this in my app that I’m converting from ACF. For now, I’m doing this
public boolean function onRequestStart()
{
//Lucee 5 is not firing onApplicationStart on first request so we need to check if the application has been initialized
if (not isDefined(‘application.beanFactory’))
{
applicationStop();
return true;
}
}
which works but is not ideal of course.
Any ideas how I can debug/troubleshoot why it’s not firing?
-Phil
On Wednesday, August 10, 2016 at 10:26:51 AM UTC-7, Micha wrote:
i just did a testcase based on your input , i have the test make a little bit clearer.
component {
this.name=createUUID();
public boolean function onApplicationStart() {
throw “start”;
return true;
}
}
to be sure i have a new application context with every request i change the name (red) with every request and then i throw an exception (blue), because writing to the log can have a delay (for performance reasons).
this works as expected for me.
to be honest it is unlikely that the onApplicationStart does not work in that way, this would break every second application out there.
i will add a testcase that checks if onApplicationStart and onApplicationStart get invoked correctly.
Micha
On Wed, Aug 10, 2016 at 6:40 PM, Phil Cruz ph...@philcruz.com wrote:
I’m migrating an app from ACF to Lucee 5 on Windows. I was hitting some errors where some application variables I was trying to reference where not being defined. I tracked it down and it seems that onApplicationStart() was not firing. I simplified the function to
public boolean function onApplicationStart()
{
writeLog (text=“Application #this.name# started!!!”, file=“application”, type=“Debug”, application=“no”);
return true;
}
When I restart the Lucee server and make the first request I don’t get an entry in the log file. I’m looking in the correct log and I can see other log statements written there.
If I hit a page that calls applicationStop(), then on the next request onApplicationStart() is called and I see the log entry. But why would it not be called on the very first request?
–
Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016
–
Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016
MichaOn Wed, Aug 10, 2016 at 7:46 PM, Michael Offner <@Michael_Offner> wrote:
I assume that the application context already exists and because of that
it is not fired. Have you more than one application.cfc file with the same
name inside your application?
There is one known difference to ACF when it comes to search the
application.cfc.
let say you have the following mappings
virtual: /susi/sorglos
physical: /Users/urs/mappings/sorglos
virtual: /susi/
physical: /Users/urs/mappings/susi
and the webroot is at:
physical: /Users/urs/webroot
When you now call /susi/sorglos/index.cfm in your browser. ACF will search
the application.cfc in the following order in the following locations:
/Users/urs/mappings/sorglos
/Users/urs/mappings
/Users/urs
/Users
/
so ACF simply goes up from the first location up to the root of the server.
Lucee on the other side will do this:
/Users/urs/mappings/sorglos
/Users/urs/mappings/susi
/Users/urs/webroot
So lucee follows the logic of the mappings.
This is the onl difference to ACF i’m aware of
Micha
On Wed, Aug 10, 2016 at 7:33 PM, Phil Cruz <@Phil_Cruz> wrote:
Yes, when I create a simple test app I get the expected behavior.
I’m only seeing this in my app that I’m converting from ACF. For now, I’m
doing this
public boolean function onRequestStart()
{
//Lucee 5 is not firing onApplicationStart on first request so we need
to check if the application has been initialized
if (not isDefined(‘application.beanFactory’))
{
applicationStop();
return true;
}
}
which works but is not ideal of course.
Any ideas how I can debug/troubleshoot why it’s not firing?
-Phil
On Wednesday, August 10, 2016 at 10:26:51 AM UTC-7, Micha wrote:
i just did a testcase based on your input , i have the test make a
little bit clearer.
component {
this.name=createUUID();
public boolean function onApplicationStart() {
throw “start”;
return true;
}
}
to be sure i have a new application context with every request i change
the name (red) with every request and then i throw an exception (blue),
because writing to the log can have a delay (for performance reasons).
this works as expected for me.
to be honest it is unlikely that the onApplicationStart does not work in
that way, this would break every second application out there.
i will add a testcase that checks if onApplicationStart and
onApplicationStart get invoked correctly.
I’m migrating an app from ACF to Lucee 5 on Windows. I was hitting some
errors where some application variables I was trying to reference where not
being defined. I tracked it down and it seems that onApplicationStart() was
not firing. I simplified the function to
public boolean function onApplicationStart()
{
writeLog (text=“Application #this.name# started!!!”, file=
“application”, type=“Debug”, application=“no”);
return true;
}
When I restart the Lucee server and make the first request I don’t get
an entry in the log file. I’m looking in the correct log and I can see
other log statements written there.
If I hit a page that calls applicationStop(), then on the next request
onApplicationStart() is called and I see the log entry. But why would it
not be called on the very first request?
–
Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit https://ti.to/cfcamp/cfcamp-20
16/discount/Lucee@cfcamp
–
Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit https://ti.to/cfcamp/cfcamp-20
16/discount/Lucee@cfcamp
Yes, when I create a simple test app I get the expected behavior.
I’m only seeing this in my app that I’m converting from ACF. For now, I’m
doing this
public boolean function onRequestStart()
{
//Lucee 5 is not firing onApplicationStart on first request so we need to
check if the application has been initialized
if (not isDefined(‘application.beanFactory’))
{
applicationStop();
return true;
}
}
which works but is not ideal of course.
Any ideas how I can debug/troubleshoot why it’s not firing?
-PhilOn Wednesday, August 10, 2016 at 10:26:51 AM UTC-7, Micha wrote:
i just did a testcase based on your input , i have the test make a little
bit clearer.
component {
this.name=createUUID();
public boolean function onApplicationStart() {
throw “start”;
return true;
}
}
to be sure i have a new application context with every request i change
the name (red) with every request and then i throw an exception (blue),
because writing to the log can have a delay (for performance reasons).
this works as expected for me.
to be honest it is unlikely that the onApplicationStart does not work in
that way, this would break every second application out there.
i will add a testcase that checks if onApplicationStart and
onApplicationStart get invoked correctly.
Micha
On Wed, Aug 10, 2016 at 6:40 PM, Phil Cruz <ph...@philcruz.com <javascript:>> wrote:
I’m migrating an app from ACF to Lucee 5 on Windows. I was hitting some
errors where some application variables I was trying to reference where not
being defined. I tracked it down and it seems that onApplicationStart() was
not firing. I simplified the function to
public boolean function onApplicationStart()
{
writeLog (text=“Application #this.name# started!!!”, file=“application”,
type=“Debug”, application=“no”);
return true;
}
When I restart the Lucee server and make the first request I don’t get an
entry in the log file. I’m looking in the correct log and I can see other
log statements written there.
If I hit a page that calls applicationStop(), then on the next request
onApplicationStart() is called and I see the log entry. But why would it
not be called on the very first request?
–
Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead
of 210€. Visit CFCamp 2016
I assume that the application context already exists and because of that it
is not fired. Have you more than one application.cfc file with the same
name inside your application?
There is one known difference to ACF when it comes to search the
application.cfc.
let say you have the following mappings----------------------------------------------------
virtual: /susi/sorglos
physical: /Users/urs/mappings/sorglos
virtual: /susi/
physical: /Users/urs/mappings/susi
and the webroot is at:
physical: /Users/urs/webroot
When you now call /susi/sorglos/index.cfm in your browser. ACF will search
the application.cfc in the following order in the following locations:
/Users/urs/mappings/sorglos
/Users/urs/mappings
/Users/urs
/Users
/
so ACF simply goes up from the first location up to the root of the server.
Lucee on the other side will do this:
/Users/urs/mappings/sorglos
/Users/urs/mappings/susi
/Users/urs/webroot
So lucee follows the logic of the mappings.
This is the onl difference to ACF i’m aware of
Micha
On Wed, Aug 10, 2016 at 7:33 PM, Phil Cruz <@Phil_Cruz> wrote:
Yes, when I create a simple test app I get the expected behavior.
I’m only seeing this in my app that I’m converting from ACF. For now, I’m
doing this
public boolean function onRequestStart()
{
//Lucee 5 is not firing onApplicationStart on first request so we need
to check if the application has been initialized
if (not isDefined(‘application.beanFactory’))
{
applicationStop();
return true;
}
}
which works but is not ideal of course.
Any ideas how I can debug/troubleshoot why it’s not firing?
-Phil
On Wednesday, August 10, 2016 at 10:26:51 AM UTC-7, Micha wrote:
i just did a testcase based on your input , i have the test make a little
bit clearer.
component {
this.name=createUUID();
public boolean function onApplicationStart() {
throw “start”;
return true;
}
}
to be sure i have a new application context with every request i change
the name (red) with every request and then i throw an exception (blue),
because writing to the log can have a delay (for performance reasons).
this works as expected for me.
to be honest it is unlikely that the onApplicationStart does not work in
that way, this would break every second application out there.
i will add a testcase that checks if onApplicationStart and
onApplicationStart get invoked correctly.
I’m migrating an app from ACF to Lucee 5 on Windows. I was hitting some
errors where some application variables I was trying to reference where not
being defined. I tracked it down and it seems that onApplicationStart() was
not firing. I simplified the function to
public boolean function onApplicationStart()
{
writeLog (text=“Application #this.name# started!!!”, file=“application”
, type=“Debug”, application=“no”);
return true;
}
When I restart the Lucee server and make the first request I don’t get
an entry in the log file. I’m looking in the correct log and I can see
other log statements written there.
If I hit a page that calls applicationStop(), then on the next request
onApplicationStart() is called and I see the log entry. But why would it
not be called on the very first request?
–
Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit https://ti.to/cfcamp/cfcamp-20
16/discount/Lucee@cfcamp
–
Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit https://ti.to/cfcamp/cfcamp-
2016/discount/Lucee@cfcamp
On Wed, Aug 10, 2016 at 11:29 PM, Phil Cruz <ph...@philcruz.com <javascript:>> wrote:
I found the issue! If this.ormenabled = true; the event does not fire. If
this.ormenabled =false it does fire. I stripped down my Application.cfc to
the bare minimum removing everything until I got the event to fire Here is
the code
Yes, when I create a simple test app I get the expected behavior.
I’m only seeing this in my app that I’m converting from ACF. For now,
I’m doing this
public boolean function onRequestStart()
{
//Lucee 5 is not firing onApplicationStart on first request so we need
to check if the application has been initialized
if (not isDefined(‘application.beanFactory’))
{
applicationStop();
return true;
}
}
which works but is not ideal of course.
Any ideas how I can debug/troubleshoot why it’s not firing?
-Phil
On Wednesday, August 10, 2016 at 10:26:51 AM UTC-7, Micha wrote:
i just did a testcase based on your input , i have the test make a
little bit clearer.
component {
this.name=createUUID();
public boolean function onApplicationStart() {
throw “start”;
return true;
}
}
to be sure i have a new application context with every request i change
the name (red) with every request and then i throw an exception (blue),
because writing to the log can have a delay (for performance reasons).
this works as expected for me.
to be honest it is unlikely that the onApplicationStart does not work
in that way, this would break every second application out there.
i will add a testcase that checks if onApplicationStart and
onApplicationStart get invoked correctly.
I’m migrating an app from ACF to Lucee 5 on Windows. I was hitting
some errors where some application variables I was trying to reference
where not being defined. I tracked it down and it seems that
onApplicationStart() was not firing. I simplified the function to
public boolean function onApplicationStart()
{
writeLog (text=“Application #this.name# started!!!”, file=
“application”, type=“Debug”, application=“no”);
return true;
}
When I restart the Lucee server and make the first request I don’t get
an entry in the log file. I’m looking in the correct log and I can see
other log statements written there.
If I hit a page that calls applicationStop(), then on the next request
onApplicationStart() is called and I see the log entry. But why would it
not be called on the very first request?
–
Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit CFCamp 2016
–
Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit CFCamp 2016
–
Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead
of 210€. Visit CFCamp 2016
Thx MichaOn Wed, Aug 10, 2016 at 11:29 PM, Phil Cruz <@Phil_Cruz> wrote:
I found the issue! If this.ormenabled = true; the event does not fire. If
this.ormenabled =false it does fire. I stripped down my Application.cfc to
the bare minimum removing everything until I got the event to fire Here is
the code
Yes, when I create a simple test app I get the expected behavior.
I’m only seeing this in my app that I’m converting from ACF. For now, I’m
doing this
public boolean function onRequestStart()
{
//Lucee 5 is not firing onApplicationStart on first request so we need
to check if the application has been initialized
if (not isDefined(‘application.beanFactory’))
{
applicationStop();
return true;
}
}
which works but is not ideal of course.
Any ideas how I can debug/troubleshoot why it’s not firing?
-Phil
On Wednesday, August 10, 2016 at 10:26:51 AM UTC-7, Micha wrote:
i just did a testcase based on your input , i have the test make a
little bit clearer.
component {
this.name=createUUID();
public boolean function onApplicationStart() {
throw “start”;
return true;
}
}
to be sure i have a new application context with every request i change
the name (red) with every request and then i throw an exception (blue),
because writing to the log can have a delay (for performance reasons).
this works as expected for me.
to be honest it is unlikely that the onApplicationStart does not work in
that way, this would break every second application out there.
i will add a testcase that checks if onApplicationStart and
onApplicationStart get invoked correctly.
I’m migrating an app from ACF to Lucee 5 on Windows. I was hitting some
errors where some application variables I was trying to reference where not
being defined. I tracked it down and it seems that onApplicationStart() was
not firing. I simplified the function to
public boolean function onApplicationStart()
{
writeLog (text=“Application #this.name# started!!!”, file=
“application”, type=“Debug”, application=“no”);
return true;
}
When I restart the Lucee server and make the first request I don’t get
an entry in the log file. I’m looking in the correct log and I can see
other log statements written there.
If I hit a page that calls applicationStop(), then on the next request
onApplicationStart() is called and I see the log entry. But why would it
not be called on the very first request?
–
Get 10% off of the regular price for this years CFCamp in Munich,
Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp.
189€ instead of 210€. Visit https://ti.to/cfcamp/cfcamp-20
16/discount/Lucee@cfcamp
–
Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit https://ti.to/cfcamp/cfcamp-20
16/discount/Lucee@cfcamp
–
Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit https://ti.to/cfcamp/cfcamp-
2016/discount/Lucee@cfcamp