Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SYStringNode cannot be cast to ArrayNode #120

Open
longtimeago opened this issue Oct 5, 2018 · 0 comments
Open

SYStringNode cannot be cast to ArrayNode #120

longtimeago opened this issue Oct 5, 2018 · 0 comments

Comments

@longtimeago
Copy link

Good day!

Faced with this exception

annotator: org.mule.tooling.lang.raml.annotator.RamlAnnotator@4e6421a2 (class org.mule.tooling.lang.raml.annotator.RamlAnnotator)

java.lang.ClassCastException: org.raml.yagi.framework.nodes.snakeyaml.SYStringNode cannot be cast to org.raml.yagi.framework.nodes.ArrayNode
	at org.raml.v2.internal.impl.v10.grammar.AuthorizationUriRequiredField.isRequiredField(AuthorizationUriRequiredField.java:31)
	at org.raml.yagi.framework.grammar.rule.KeyValueRule.isRequired(KeyValueRule.java:197)
	at org.raml.yagi.framework.grammar.rule.ObjectRule.apply(ObjectRule.java:256)
	at org.raml.yagi.framework.grammar.rule.KeyValueRule.apply(KeyValueRule.java:171)
	at org.raml.yagi.framework.grammar.rule.ObjectRule.apply(ObjectRule.java:234)
	at org.raml.yagi.framework.grammar.rule.AnyOfRule.apply(AnyOfRule.java:110)
	at org.raml.yagi.framework.grammar.rule.KeyValueRule.apply(KeyValueRule.java:171)
	at org.raml.yagi.framework.grammar.rule.ObjectRule.apply(ObjectRule.java:234)
	at org.raml.yagi.framework.grammar.rule.AnyOfRule.apply(AnyOfRule.java:110)
	at org.raml.yagi.framework.grammar.rule.KeyValueRule.apply(KeyValueRule.java:171)
	at org.raml.yagi.framework.grammar.rule.ObjectRule.apply(ObjectRule.java:234)
	at org.raml.yagi.framework.phase.GrammarPhase.apply(GrammarPhase.java:38)
	at org.raml.v2.internal.impl.v10.Raml10Builder.runPhases(Raml10Builder.java:114)
	at org.raml.v2.internal.impl.v10.Raml10Builder.build(Raml10Builder.java:93)
	at org.raml.v2.internal.impl.RamlBuilder.build(RamlBuilder.java:117)
	at org.raml.v2.internal.impl.RamlBuilder.build(RamlBuilder.java:99)
	at org.raml.v2.internal.impl.RamlBuilder.build(RamlBuilder.java:94)
	at org.mule.tooling.lang.raml.annotator.RamlAnnotator.doAnnotate(RamlAnnotator.java:37)
	at org.mule.tooling.lang.raml.annotator.RamlAnnotator.doAnnotate(RamlAnnotator.java:18)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:179)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:38)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:155)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327)
	at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:277)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:291)
	at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:246)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:232)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:405)
	at com.intellij.util.Alarm$Request.access$700(Alarm.java:330)
	at com.intellij.util.Alarm$Request$1.run(Alarm.java:371)
	at com.intellij.util.Alarm$Request.run(Alarm.java:382)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:228)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:226)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$100(BoundedTaskExecutor.java:26)
	at com.intellij.util.concurrency.BoundedTaskExecutor$2$1.run(BoundedTaskExecutor.java:199)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:229)
	at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:193)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

when opening following raml file

#%RAML 1.0
title: Some
version: "1.0"
baseUri: https://some.com
protocols: [ HTTPS ]
IntelliJ IDEA 2018.2.4 (Ultimate Edition)
Build #IU-182.4505.22, built on September 18, 2018
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-36-generic

I suspect something is wrong with array of protocols :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant