idok / sass-lint-plugin

SASS Lint plugin for Intellij
https://plugins.jetbrains.com/plugin/8171
MIT License
31 stars 5 forks source link

Getting xstream error 'com.sasslint.cli.SassLint' in Webstorm 2016.2.3 #13

Open bdugan14 opened 8 years ago

bdugan14 commented 8 years ago

Whenever I start Webstorm, I'm getting an error that I'm having trouble making sense of

com.sasslint.cli.SassLint com.thoughtworks.xstream.mapper.CannotResolveClassException: com.sasslint.cli.SassLint at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47) at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1206) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190) at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061) at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1052) at com.sasslint.cli.SassLint.read(SassLint.java:25) at com.sasslint.cli.SassLintRunner.lint(SassLintRunner.java:61) at com.sasslint.cli.SassLintRunner.lint(SassLintRunner.java:47) at com.sasslint.inspection.SassLintExternalAnnotator.doAnnotate(SassLintExternalAnnotator.java:207) at com.sasslint.inspection.SassLintExternalAnnotator.doAnnotate(SassLintExternalAnnotator.java:48) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.d(ExternalToolPass.java:212) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:44) at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:160) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310) at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:260) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:274) at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:229) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:222) at com.intellij.util.Alarm$Request$1.run(Alarm.java:378) at com.intellij.util.Alarm$Request.run(Alarm.java:389) 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:227) at com.intellij.util.concurrency.BoundedTaskExecutor.runFirstTaskThenPollAndRunRest(BoundedTaskExecutor.java:178) at com.intellij.util.concurrency.BoundedTaskExecutor.access$000(BoundedTaskExecutor.java:40) at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:197) 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)

com.thoughtworks.xstream.mapper.CannotResolveClassException: com.sasslint.cli.SassLint at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30) at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47) at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1206) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190) at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061) at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1052) at com.sasslint.cli.SassLint.read(SassLint.java:25) at com.sasslint.cli.SassLintRunner.lint(SassLintRunner.java:61) at com.sasslint.cli.SassLintRunner.lint(SassLintRunner.java:47) at com.sasslint.inspection.SassLintExternalAnnotator.doAnnotate(SassLintExternalAnnotator.java:207) at com.sasslint.inspection.SassLintExternalAnnotator.doAnnotate(SassLintExternalAnnotator.java:48) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.d(ExternalToolPass.java:212) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:44) at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:160) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310) at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:260) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:274) at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:229) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:222) at com.intellij.util.Alarm$Request$1.run(Alarm.java:378) at com.intellij.util.Alarm$Request.run(Alarm.java:389) 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:227) at com.intellij.util.concurrency.BoundedTaskExecutor.runFirstTaskThenPollAndRunRest(BoundedTaskExecutor.java:178) at com.intellij.util.concurrency.BoundedTaskExecutor.access$000(BoundedTaskExecutor.java:40) at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:197) 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)

It appears the linter isn't working on my machine. My settings are as follows:

image

My sass-lint is version 1.9.1.

Have others run into this error? If this is an issue w/ my configuration of the plugin, it would be helpful to have a more descriptive error message if possible. Thanks!

bdugan14 commented 8 years ago

Was able to solve this issue thanks to a suggestion from one of my coworkers, I'll post the solution here:

When downloading/unzipping the file from the webstorm site, we receive 2 .jar files inside the 'lib' folder: one for sass-lint-plugin, and one for the xstream dependency image

I had this issue when I tried to install the plugin from WebStorm's 'Install From Disk... interface:

image

This only lets you select 1 .jar file... so I hoped that some wizardry would also pull the xstream dependency to the right place as well, but this doesn't appear to be the case.

To fix the error, I combined the two .jar files into a single .jar file, using this method: http://stackoverflow.com/questions/5080220/how-to-combine-two-jar-files

from the 'lib' directory of the 'sass-lint-plugin' folder: (version numbers may be different for different editions of this plugin)

$ mkdir tmp $ (cd tmp; jar -xf ../sass-lint-plugin.jar) $ (cd tmp; jar -xf ../xstream-1.4.7.jar) $ jar -cvf sass-lint-combined.jar -C tmp .

Then, uninstall any existing, broken instances of Sass Lint, and install the newly-combined sass-lint-combined.jar.

This worked for me!

If at all possible, it would be helpful if the .jar delivered from the JetBrains website automatically contained xstream and sass-lint-plugin bundled together. I'll take a look at it myself on Monday but... I don't know any Java so it's a bit of a longshot :)

bingalls commented 8 years ago

bdugan14- I tried your rebundling hack, and I still get errors. My stopgap is to use the scss-lint plugin. This should help all issues 11 - 15 which seem to be related.

I am using IntelliJ Ultimate 2016-3 with sass-lint plugin v1.0.5, sass-lint v1.9.1 and get a bit different warnings (which seem the same, as before your hack):

null java.lang.AssertionError at org.xmlpull.v1.XmlPullParserFactory.(XmlPullParserFactory.java:43) at org.xmlpull.v1.XmlPullParserFactory.newInstance(XmlPullParserFactory.java:221) at com.thoughtworks.xstream.io.xml.XppDriver.createParser(XppDriver.java:57) at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:54) at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1040) at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1031) at com.sasslint.cli.SassLint.read(SassLint.java:25) at com.sasslint.cli.SassLintRunner.lint(SassLintRunner.java:61) at com.sasslint.cli.SassLintRunner.lint(SassLintRunner.java:47) at com.sasslint.inspection.SassLintExternalAnnotator.doAnnotate(SassLintExternalAnnotator.java:207) at com.sasslint.inspection.SassLintExternalAnnotator.doAnnotate(SassLintExternalAnnotator.java:48) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.d(ExternalToolPass.java:212) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:44) at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:160) 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:223) at com.intellij.util.Alarm$Request$1.run(Alarm.java:387) at com.intellij.util.Alarm$Request.run(Alarm.java:398) 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:237) at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:210) 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)

bdugan14 commented 8 years ago

was the stack trace you posted above the error you encountered before making any changes/trying the rebundling hack? If so, this doesn't look like the same error I encountered.

bingalls commented 7 years ago

After the rebundling hack.