You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (JIRA)" <ji...@apache.org> on 2016/02/02 15:20:39 UTC

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

    [ https://issues.apache.org/jira/browse/SLING-5471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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=-25200000,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=-25200000,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)