Eclipse fails to load editors (sometimes)

Put your problem here if it does not fit any of the other categories.

Eclipse fails to load editors (sometimes)

Postby Anm » Wed Oct 15, 2008 12:07 pm

I occassionally get this error in Eclipse when trying to open any file that would load a custom Android editor:
Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml.


When it happens, it effect the duration that Eclipse is launched. I can't tell why it happens only some of the time. I'm not touching any of the SDK or Eclipse installed files. Only personal projects.

A more detailed message:
Code: Select all
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.android.ide.eclipse.editors (585).
   at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:125)
   ... <snipped>
Caused by: org.osgi.framework.BundleException: Exception in com.android.ide.eclipse.editors.EditorsPlugin.start() of bundle com.android.ide.eclipse.editors.
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1028)
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
   at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
   at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
   at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
   at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
   ... 57 more
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
   at java.lang.ClassLoader.defineClass1(Native Method)
       ... <snipped to Eclipse classes>
   at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor.loadAndParseRClass(Unknown Source)
   at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor.projectOpenedWithWorkspace(Unknown Source)
   at com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.addProjectListener(Unknown Source)
   at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMonitor.setupMonitor(Unknown Source)
   at com.android.ide.eclipse.editors.resources.manager.ResourceManager.setup(Unknown Source)
   at com.android.ide.eclipse.editors.EditorsPlugin.start(Unknown Source)
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
   ... 62 more


I'm running on a Mac Intel Core Duo (not a 64-bit Core 2 Duo, and hence no Java 6). I would say that's the problem, except the editors load >50% of the time. If the Eclipse plugin classes were compiled/distributed in Java 6 class files, they should never have run.
Anm
Freshman
Freshman
 
Posts: 7
Joined: Wed Oct 15, 2008 8:21 am

Top

Postby atrus123 » Thu Oct 16, 2008 9:53 pm

I have this same problem as well from time to time, but I've never found a solution (so I'm writing more to commiserate).

I'm running Ganymede+SDK on Gentoo.
atrus123
Developer
Developer
 
Posts: 26
Joined: Thu Oct 09, 2008 2:16 am
Location: Annapolis, MD

Postby oba » Wed Dec 03, 2008 1:20 pm

i had this problem also - since last night.

i removed and reinstalled the android eclipse plugin.
i installed the SDK kit on another location.
and it did not solve the problem.

then i found the problem :
one of my projects (in the workspace/workset ) was configured to use java 1.6. this will not work probably becuase the editor was compiled against the 1.5 java lib.

how to solve:
go over all the projects and make sure all of them are set to use the 1.5 like in my pic.
restart the eclipse and your done.
Attachments
Picture 1.png
Picture 1.png (96.95 KiB) Viewed 15803 times
oba
Freshman
Freshman
 
Posts: 5
Joined: Wed Dec 03, 2008 8:55 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google Feedfetcher and 17 guests