摆脱无法转换为 String 的 org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 [英] Getting rid of org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 that cannot be casted to String

查看:32
本文介绍了摆脱无法转换为 String 的 org.eclipse.osgi.internal.framework.EquinoxConfiguration$1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚遇到了 Apache Ivy 错误 java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String (link) 执行 Ant 任务时ivy:config

I have just run into the Apache Ivy bug java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String (link) when performing Ant task ivy:config

今天早上我尝试将 LibraryFolder ClasspathContainer 插件安装到我的 Eclipse (STS 3.6.1) 中:安装它每次尝试执行 ivy:retrieve 时都会导致上述错误.

This morning I tried to install LibraryFolder ClasspathContainer plugin into my Eclipse (STS 3.6.1): installing it caused the above error every time I tried to perform ivy:retrieve.

更糟糕的是,我尝试从 Eclipse Marketplace 安装 IvyDE 插件,但 Eclipse 开始崩溃,出现大量错误,包括 JVM 崩溃.卸载这两个插件都没有解决.我尝试使用新的工作区和空白的 Eclipse 安装,但最终我不得不安装我以前的 Eclipse 插件.

Even worse, I tried to install IvyDE plugin from Eclipse Marketplace and Eclipse started to crash at a multitude of errors, including JVM crash. Uninstalling both plugins didn't fix. I tried with a new workspace and a blank Eclipse installation, but I eventually had to install my previous Eclipse plugins.

我花了一整个上午试图修复这个烂摊子,但我不得不恢复以前未提交的工作区和 Eclipse 安装,所以现在除了上述错误之外,我让一切正常.Ivy 一直工作到今天早上.

I spent the entire morning trying to fix the mess but I had to restore the previous uncommitted workspace and Eclipse installation, so now I get everything working except for the above error. Ivy worked fine until this morning.

我的每个 Ant 任务都在与 Eclipse 相同的 JRE 中运行(C:\Program Files\Java\jdk1.7.0_60\jre\bin\server\jvm.dll 根据 sts.ini) 因为我经常使用 eclipse.refreshLocal 任务.虽然我可以通过删除/注释 eclipse.refreshLocal 任务在标准 JRE 中运行 Ant-Ivy 任务来解决该问题,但我想知道是否有解决方法消除错误,可能是通过删除工作区元数据中的密钥文件.

Every Ant task of mine runs in the same JRE as Eclipse (C:\Program Files\Java\jdk1.7.0_60\jre\bin\server\jvm.dll as per sts.ini) because I use a lot the eclipse.refreshLocal task. While I can workaround the problem by removing/commenting eclipse.refreshLocal task and run Ant-Ivy tasks in a standard JRE, I'm asking if there is a workaround to get rid of the error, perhaps by deleting a key file in the workspace's metadata.

正如我所读到的,一个 Ivy 方法被传递了一个对象,从它的名字猜测,它是 Eclipse 配置的一部分.在我等待错误修复的同时,我的问题是如何更多地调查这个 org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 参数的性质?

As I can read, an Ivy method is passed an object that, guessing from its name, is part of Eclipse configuration. While I'll be waiting for a bugfix, my question is how do I investigate more about the nature of this org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 parameter?

推荐答案

这看起来与 为 libgdx 构建新 Gradle 项目模型时出错 - 其中包括适用于 Gradle IDE 的解决方法,所以也许它对你有用.

This looks related to Error at building model of new Gradle project for libgdx - which includes a workaround that works for Gradle IDE, so maybe it will work for you.

相关的 Eclipse 错误是 https://bugs.eclipse.org/bugs/show_bug.cgi?id=445122

The relevant Eclipse bug is https://bugs.eclipse.org/bugs/show_bug.cgi?id=445122

[由 OP 编辑​​] 为有同样问题的人简化生活,我将发布链接内容并接受答案

to simplify life to people having the same problem I'll post the contents of the link and accept the answer

只需将以下几行添加到 eclipse.ini

Just add the following lines to eclipse.ini

-Dorg.eclipse.swt.browser.IEVersion=10001
-Dosgi.configuration.area.default=null
-Dosgi.user.area.default=null
-Dosgi.user.area=@user.home
-Dosgi.instance.area.default=null

这篇关于摆脱无法转换为 String 的 org.eclipse.osgi.internal.framework.EquinoxConfiguration$1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆