Modify

Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#10423 closed defect (othersoftware)

ClassCastException when validating `opening_hours=*SH off*` with Java 8

Reported by: josm@… Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: java8 javabug nashorn javascript opening_hours github 8u40 Cc:

Description (last modified by Don-vip)

Revision: 7347
Repository Root: http://josm.openstreetmap.de/svn
Last Changed Author: Don-vip
Last Changed Date: 2014-07-29 00:32:15 +0200 (Tue, 29 Jul 2014)
Build-Date: 2014-07-28 22:35:35
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 7347

Identification: JOSM/1.5 (7347 pl) Windows 8.1 64-Bit
Memory Usage: 134 MB / 1780 MB (32 MB allocated, but free)
Java version: 1.8.0_11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
VM arguments: [-Djosm.home=.josm/]
Dataset consistency test: No problems found

Plugin: PicLayer (30436)
Plugin: alignways (30416)
Plugin: buildings_tools (30485)
Plugin: editgpx (30416)
Plugin: measurement (30416)
Plugin: reverter (30521)
Plugin: turnrestrictions (30454)
Plugin: wikipedia (30449)

java.lang.ClassCastException: Cannot cast jdk.nashorn.internal.scripts.JO12 to jdk.nashorn.internal.scripts.JO16
	at sun.invoke.util.ValueConversions.newClassCastException(Unknown Source)
	at sun.invoke.util.ValueConversions.castReference(Unknown Source)
	at jdk.nashorn.internal.scripts.Script$\^eval\_$4._L1754$_L1755$parseHoliday$_L3177$_L3177(<eval>:3214)
	at jdk.nashorn.internal.scripts.Script$\^eval\_$6._L1754$_L1755$_L3967(<eval>:3987)
	at jdk.nashorn.internal.scripts.Script$\^eval\_$5._L1754$_L1755$_L4184$_L4185(<eval>:4190)
	at jdk.nashorn.internal.scripts.Script$\^eval\_$3._L1754$_L1755$_L4184(<eval>:4185)
	at jdk.nashorn.internal.scripts.Script$\^eval\_$5._L1754$_L1755$_L4297(<eval>:4298)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:498)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:206)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:378)
	at jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:179)
	at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:508)
	at jdk.nashorn.api.scripting.NashornScriptEngine.invokeMethod(NashornScriptEngine.java:238)
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.checkOpeningHourSyntax(OpeningHourTest.java:209)
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.checkOpeningHourSyntax(OpeningHourTest.java:180)
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.check(OpeningHourTest.java:250)
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.check(OpeningHourTest.java:257)
	at org.openstreetmap.josm.data.validation.Test$TagTest.visit(Test.java:118)
	at org.openstreetmap.josm.data.osm.Node.accept(Node.java:206)
	at org.openstreetmap.josm.data.validation.Test.visit(Test.java:200)
	at org.openstreetmap.josm.actions.upload.ValidateUploadHook.checkUpload(ValidateUploadHook.java:61)
	at org.openstreetmap.josm.actions.UploadAction.checkPreUploadConditions(UploadAction.java:199)
	at org.openstreetmap.josm.actions.UploadAction.uploadData(UploadAction.java:222)
	at org.openstreetmap.josm.actions.UploadAction.actionPerformed(UploadAction.java:279)
	at javax.swing.SwingUtilities.notifyAction(Unknown Source)
	at javax.swing.JComponent.processKeyBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
	at javax.swing.JComponent.processKeyBindings(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$400(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Change History (12)

comment:1 by anonymous, 11 years ago

Happens when I set opening_hours to "SH off"

comment:2 by Don-vip, 11 years ago

Component: CoreCore validator
Description: modified (diff)
Summary: ExceptionClassCastException: jdk.nashorn.internal.scripts.JO12 to jdk.nashorn.internal.scripts.JO16

comment:3 by Don-vip, 11 years ago

Owner: changed from team to josm@…
Status: newneedinfo

Looks like a Java bug, can you please try with latest Java (8u20)?

comment:4 by Don-vip, 11 years ago

Keywords: java8 javabug nashorn javascript opening_hours added
Owner: changed from josm@… to team
Status: needinfonew

Reproduced with 8u20 when validating opening_hours=SH off but does not occur with 7u67.

comment:6 by josm@…, 11 years ago

Thanks for the investigation, actually it happens if "SH off" is present anywhere in the "opening_hours" tag.

comment:7 by Don-vip, 11 years ago

Summary: ClassCastException: jdk.nashorn.internal.scripts.JO12 to jdk.nashorn.internal.scripts.JO16ClassCastException when validating `opening_hours=*SH off*` with Java 8

comment:8 by Don-vip, 11 years ago

I have submitted a bug report to Oracle. If it gets accepted, it will be available at this url:
https://bugs.openjdk.java.net/browse/JI-9014633
Wait and see...

comment:9 by Don-vip, 11 years ago

Keywords: 8u40 added
Resolution: othersoftware
Status: newclosed

Issue has been fixed today by Oracle and will be available in next update (8u40).

comment:10 by Don-vip, 10 years ago

Ticket #11116 has been marked as a duplicate of this ticket.

comment:11 by Don-vip, 10 years ago

Ticket #11782 has been marked as a duplicate of this ticket.

comment:12 by Don-vip, 9 years ago

Ticket #12883 has been marked as a duplicate of this ticket.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.