idea下载多个插件项目启动不了解决方案
今天下载mybatis plugin插件的时候
有好多个版本的plugin,然后呢,看第二个比较热门,就下载了第二个,然后重启idea发现这个插件貌似得花钱,那算了吧,咱用第一个免费的吧,就又下载了第一个,然后重启idea。然后。。。就炸了。
瞬间感觉心慌慌的,最后还是借助百度解决了。。
首先看上面那个报错信息,一看就很像jar包冲突的报错信息,先放着,我们再看看idea的日志:C:\Users\{username}\.IntelliJIdea2016.1\system\log\idea.log。在这个路径下,打开idea.log。找到刚刚的报错信息:
- 2017-07-11 17:22:48,947 [ 22053] INFO - ellij.project.impl.ProjectImpl - 23 project components initialized in 74 ms
- 2017-07-11 17:22:48,947 [ 22053] INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms
- 2017-07-11 17:23:07,331 [ 40437] INFO - roject.impl.ProjectManagerImpl - com.intellij.diagnostic.PluginException: com.seventh7.mybatis.setting.MybatisSetting cannot be cast to com.seventh7.mybatis.setting.MybatisSetting [Plugin: com.seventh7.plugin.mybatis]
- com.intellij.ide.plugins.PluginManager$StartupAbortedException: com.intellij.diagnostic.PluginException: com.seventh7.mybatis.setting.MybatisSetting cannot be cast to com.seventh7.mybatis.setting.MybatisSetting [Plugin: com.seventh7.plugin.mybatis]
- at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:249)
- at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:43)
- at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:519)
- at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:125)
- at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:109)
- at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:96)
- at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:287)
- at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:222)
- at com.intellij.openapi.project.impl.ProjectManagerImpl.d(ProjectManagerImpl.java:459)
- at com.intellij.openapi.project.impl.ProjectManagerImpl.access$100(ProjectManagerImpl.java:60)
- at com.intellij.openapi.project.impl.ProjectManagerImpl$2.compute(ProjectManagerImpl.java:406)
- at com.intellij.openapi.project.impl.ProjectManagerImpl$2.compute(ProjectManagerImpl.java:403)
- at com.intellij.openapi.progress.Task$WithResult.run(Task.java:307)
- at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:710)
- at com.intellij.openapi.progress.impl.CoreProgressManager$11.run(CoreProgressManager.java:423)
- at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:179)
- at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
- at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
- at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
- at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:164)
- at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:572)
- at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:309)
- at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
- at java.util.concurrent.FutureTask.run(FutureTask.java:266)
- 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)
- Caused by: com.intellij.diagnostic.PluginException: com.seventh7.mybatis.setting.MybatisSetting cannot be cast to com.seventh7.mybatis.setting.MybatisSetting [Plugin: com.seventh7.plugin.mybatis]
- ... 27 more
- Caused by: java.lang.ClassCastException: com.seventh7.mybatis.setting.MybatisSetting cannot be cast to com.seventh7.mybatis.setting.MybatisSetting
- at com.seventh7.mybatis.setting.MybatisSetting.getInstance(MybatisSetting.java:56)
- at com.seventh7.mybatis.ref.CmProject.initComponent(CmProject.java:59)
- at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:501)
- ... 24 more
最后一段看似和idea启动的时候那个报错差不多。应该是jar包冲突了,但是jar包叫什么名字,在什么地方呢,这是个问题,windows的文件搜索很难找。
于是,下载了一个Everything (该工具可以实现秒查电脑上任意位置的任意文件,堪称本地文件搜索神器,下载地址:http://www.voidtools.com/)。随意的搜了下mybatis,然后按时间排个序,看似找到了。
应该是这两个jar冲突了,删掉那个收费的试试。然后重启idea。完美解决~