[jira] [Commented] (SLING-5471) Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() conversion

2016-02-02 Thread Radu Cotescu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128304#comment-15128304
 ] 

Radu Cotescu commented on SLING-5471:
-

After an offline chat with [~joelrich] we identified that this issue manifests 
in an AEM application. The debugging showed that these errors were logged by 
Rhino when client code (e.g. JavaScript Use objects) were performing 
comparisons between Java Calendar objects and JavaScript native objects.

> Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() 
> conversion
> 
>
> Key: SLING-5471
> URL: https://issues.apache.org/jira/browse/SLING-5471
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.10
> Environment: Mac
>Reporter: Joel Richard
> Attachments: Screen Shot 2016-02-01 at 11.14.07.png
>
>
> I often see the following error in the terminal:
> {code}
> RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
> Rhino runtime detected object 
> java.util.GregorianCalendar[time=1434664044399,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT-07:00",offset=-2520,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2015,MONTH=5,WEEK_OF_YEAR=25,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,DAY_OF_YEAR=169,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=47,SECOND=24,MILLISECOND=399,ZONE_OFFSET=-2520,DST_OFFSET=0]
>  of class java.util.GregorianCalendar where it expected String, Number, 
> Boolean or Scriptable instance. Please check your code for missing 
> Context.javaToJS() call.
> {code}
> I think it happens for if statements. Attached is a stack. Please let me know 
> if you need more information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5471) Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() conversion

2016-02-02 Thread Radu Cotescu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128459#comment-15128459
 ] 

Radu Cotescu commented on SLING-5471:
-

That's a Rhino internal and I'm afraid there's nothing more we can do at Sling 
level. In the Sightly JS Use Provider we execute client code over which we have 
no control.

> Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() 
> conversion
> 
>
> Key: SLING-5471
> URL: https://issues.apache.org/jira/browse/SLING-5471
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.10
> Environment: Mac
>Reporter: Joel Richard
> Attachments: Screen Shot 2016-02-01 at 11.14.07.png
>
>
> I often see the following error in the terminal:
> {code}
> RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
> Rhino runtime detected object 
> java.util.GregorianCalendar[time=1434664044399,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT-07:00",offset=-2520,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2015,MONTH=5,WEEK_OF_YEAR=25,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,DAY_OF_YEAR=169,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=47,SECOND=24,MILLISECOND=399,ZONE_OFFSET=-2520,DST_OFFSET=0]
>  of class java.util.GregorianCalendar where it expected String, Number, 
> Boolean or Scriptable instance. Please check your code for missing 
> Context.javaToJS() call.
> {code}
> I think it happens for if statements. Attached is a stack. Please let me know 
> if you need more information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5471) Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() conversion

2016-02-02 Thread Joel Richard (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128441#comment-15128441
 ] 

Joel Richard commented on SLING-5471:
-

[~radu.cotescu], thanks for looking into it. However, even if the comparison 
doesn't make sense, I don't think that a warning should be logged/printed on 
the terminal. Don't you think so?

> Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() 
> conversion
> 
>
> Key: SLING-5471
> URL: https://issues.apache.org/jira/browse/SLING-5471
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.10
> Environment: Mac
>Reporter: Joel Richard
> Attachments: Screen Shot 2016-02-01 at 11.14.07.png
>
>
> I often see the following error in the terminal:
> {code}
> RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
> Rhino runtime detected object 
> java.util.GregorianCalendar[time=1434664044399,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT-07:00",offset=-2520,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2015,MONTH=5,WEEK_OF_YEAR=25,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,DAY_OF_YEAR=169,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=47,SECOND=24,MILLISECOND=399,ZONE_OFFSET=-2520,DST_OFFSET=0]
>  of class java.util.GregorianCalendar where it expected String, Number, 
> Boolean or Scriptable instance. Please check your code for missing 
> Context.javaToJS() call.
> {code}
> I think it happens for if statements. Attached is a stack. Please let me know 
> if you need more information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)