java.lang.ArrayIndexOutOfBounds resolved by restart

Running Lucee 4.5.2.018-final-1446623531000 on Tomcat 8 in Windows 10

Rest requests resulted in java.lang.ArrayIndexOutOfBounds on this line:

    var p = new components.pricing();

First line of components/pricing.cfc:

component extends=“application” {

Application.cfc as follows:
component {

this.Name = “Lucee”;
this.sessionManagement=“Yes”;
this.sessiontimeout=CreateTimeSpan(30,0,0,0);

function onRequestStart(string req){
if (listContainsNoCase(arguments.req, “rest”, “/”)){
var response = getPageContext().getResponse();
response.setHeader(“Access-Control-Allow-Origin”,“*”);
response.setContentType(“application/json”);
} else {
if (cgi.server_port_secure neq “1” && cgi.server_name neq “localhost”){
var new_url = ReplaceNoCase(cgi.request_url, “http://”, “https://”);
location(new_url, false);
}
}
}

}

Issue resolved by restarting the tomcat service.

Is this a known issue?

Why would you extend the Application.cfc in a component like that?? The pricing component isn’t part of the application lifecycle.

Regards

Mark Drew> On 1 Feb 2016, at 17:00, Travis Peters <@Travis_Peters> wrote:

Running Lucee 4.5.2.018-final-1446623531000 on Tomcat 8 in Windows 10

Rest requests resulted in java.lang.ArrayIndexOutOfBounds on this line:

    var p = new components.pricing();

First line of components/pricing.cfc:

component extends=“application” {

Application.cfc as follows:
component {

this.Name = “Lucee”;
this.sessionManagement=“Yes”;
this.sessiontimeout=CreateTimeSpan(30,0,0,0);

function onRequestStart(string req){
if (listContainsNoCase(arguments.req, “rest”, “/”)){
var response = getPageContext().getResponse();
response.setHeader(“Access-Control-Allow-Origin”,“*”);
response.setContentType(“application/json”);
} else {
if (cgi.server_port_secure neq “1” && cgi.server_name neq “localhost”){
var new_url = ReplaceNoCase(cgi.request_url, “http://”, “https://”);
location(new_url, false);
}
}
}

}

Issue resolved by restarting the tomcat service.

Is this a known issue?


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/253c1475-ff32-4efb-9dbd-a08b41833375%40googlegroups.com https://groups.google.com/d/msgid/lucee/253c1475-ff32-4efb-9dbd-a08b41833375%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

As an addendum, I don’t get the error, I just get a new component that extends Application with all the settings etc.

If you get the error, try grabbing the stack trace as that will give us a clue to the error. Also, I had to remove the check for SSL as I am not running SSL in my commandBox test.

Regards

Mark Drew> On 1 Feb 2016, at 17:02, Mark Drew <@Mark_Drew> wrote:

Why would you extend the Application.cfc in a component like that?? The pricing

On 1 Feb 2016, at 17:00, Travis Peters <@Travis_Peters> wrote:

Running Lucee 4.5.2.018-final-1446623531000 on Tomcat 8 in Windows 10

Rest requests resulted in java.lang.ArrayIndexOutOfBounds on this line:

    var p = new components.pricing();

First line of components/pricing.cfc:

component extends=“application” {

Application.cfc as follows:
component {

this.Name = “Lucee”;
this.sessionManagement=“Yes”;
this.sessiontimeout=CreateTimeSpan(30,0,0,0);

function onRequestStart(string req){
if (listContainsNoCase(arguments.req, “rest”, “/”)){
var response = getPageContext().getResponse();
response.setHeader(“Access-Control-Allow-Origin”,“*”);
response.setContentType(“application/json”);
} else {
if (cgi.server_port_secure neq “1” && cgi.server_name neq “localhost”){
var new_url = ReplaceNoCase(cgi.request_url, “http://”, “https://”);
location(new_url, false);
}
}
}

}

Issue resolved by restarting the tomcat service.

Is this a known issue?


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/253c1475-ff32-4efb-9dbd-a08b41833375%40googlegroups.com https://groups.google.com/d/msgid/lucee/253c1475-ff32-4efb-9dbd-a08b41833375%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.