Getting rid of org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 that cannot be casted to String
Asked Answered
B

1

1

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

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.

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.

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.

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.

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?

Barbican answered 9/10, 2014 at 13:23 Comment(1)
possible duplicate of An internal error occurred during: "Loading bundle[...]"Drugstore
C
3

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.

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

[Edit by OP] to simplify life to people having the same problem I'll post the contents of the link and accept the answer

Just add the following lines to eclipse.ini

-Dorg.eclipse.swt.browser.IEVersion=10001
-Dosgi.configuration.area.default=null
-Dosgi.user.area.default=null
[email protected]
-Dosgi.instance.area.default=null
Clarethaclaretta answered 9/10, 2014 at 13:47 Comment(2)
PS: The relevant underlying Eclipse bug causing this has been fixed in Eclipse Luna SR2 (4.4.2), which according to eclipse.org/eclipse/development/plans/freeze_plan_4_4_2.php will be released end of Feb (in 1 month from today).Deicide
Confirmed: bug is fixed in Luna 4.4.2 !Cruiser

© 2022 - 2024 — McMap. All rights reserved.