function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
crocodilecrocodile 

Unable to refresh resource...

Hi,

Am unable to refresh any of the resources in the IDE from the server.

When am trying to refresh a page from the web, getting an Exception saying:

 

 

Unable to refresh resource 'MileaeExension.cls':
com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

 

Unable to refresh resource 'MileaeExension.cls':


com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor

 

Please assist to rectify the issue. 

 

Thanks in advance,

VNath

Best Answer chosen by Admin (Salesforce Developers) 
jwalshjwalsh

Years later, same issue. @JV100's suggestion of switch workspace to the same workspace and retry worked.

All Answers

Pradeep_NavatarPradeep_Navatar

May be you are using wrong login credentials or security token. Please post the exception here.

Martin.LehmannMartin.Lehmann

I got the same error where my installation setup was

* Windows 7

* JRE 7 32 & 64 bit

* Winter '11 Force.com IDE 64 bit

 

The workaround was to run the force.com IDE in Administrator mode which "solved" the problem.

 

JV100JV100

I had the same issue. The solution was to swicth workspace. I switched to the same thing I was using, but that did the trick. Can't explain why it worked, but it did.

goabhigogoabhigo

I tried switching workspace and run as administrator. But still I am getting this error : Fetch error. Any reason why?

Windows 7

Eclipse 3.6

Force.com IDE Winter 11

JRE 7

ethanoneethanone

I'm having the same problem on two different computers. Both are Win 7. I've tried both Helios and Indigo Eclipse versions. It only happens on some orgs. It happens when I create a new project and when I try to refresh an existing one (that previously didn't download properly).

 

Exact error is:

"com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.internal.bind.v2.runtime.reflect.Accessor"

 

Does anyone have a clue what this means or how to fix?

ethanoneethanone

Just to follow up....

 

I found a comment about adding "-clean" to eclipse.ini.  I just tried it and it fixed the problem. 

 

Here is a link:

http://www.myeclipseide.com/PNphpBB2-viewtopic-t-10280.html

 

Alvy PAlvy P

Okay I got to the bottom of it. Solution: 

- Use JRE v6 update 27 - 64bit (downgraded from JRE 7)

- Use JDK v6 update 27 - 64 bit (downgraded from JDK 7)

- Re-installed Eclipse SDK 3.6.2

 

In short, downgrading solved the problem.

Always ThinkinAlways Thinkin

I too was getting the error:

 

com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.internal.bind.v2.runtime.reflect.Accessor

 

when I tried to create a new project. This started after I upgraded to JDK 7. I found that I could continue past it and get a project created, edit files but I could not deploy changes to other orgs (can't reproduce that error anymore now that things are fixed).

 

I tried the -clean solution, uninstalling and reinstalling the JDK/JRE and the Force.com IDE Plug-in. 

 

The solution that finally worked was downgrading as Alvy P referenced. I only installed the Java SE Development Kit 6 Update 27 which includes the JRE. Don't forget to update your Environmental Variables after downgrading!

jwalshjwalsh

Years later, same issue. @JV100's suggestion of switch workspace to the same workspace and retry worked.

This was selected as the best answer
chris_centrachris_centra

fyi - just had the same issue.  probably no coincidence that i had just upgraded my jre at the request of GoToMeeting.  I switched the workspace to the same workspace and it seems fine now...

NicolaiNicolai

Same here today - I first tried "-clean", no help.

 

Then did a "Switch workspace" to the same workspace, and now my Eclipse fetched all the needed data.

 

Environment:

 

Windows 7 Enterprise, 64 bit

Eclipse Indigo (3.7) for JAVA Developers 1.4.2.20120213-0813

Force.com IDE 24.0.0.201202291629

Java(TM) SE Runtime Environment (build 1.7.0_04-b22)

jdk1.7.0_04

 

-Nicolai

 

 

Jayant DasJayant Das

Just wanted to share my experience on this issue. I too was struggling with the same issue and being new to SFDC, I arrived to this post for resolution. I was using Eclipse Helios and JRE 7. Well tried everything viz., clean option, downgrading, but nothing helped. Finally with some hit and try was able to resolve this.

 

When the error occurred, the two options were either to Abort or Continue creating a blank project. I was initially Aborting the operation, but once proceeded by Continue option. A blank force.com project was created with the credentials that I used. Then did the following, which resolved the issue --

 

* Right clicked on the project and navigated to Properties --> Force.com --> Project Contents.

* Clicked on Add/Remove metadata components and it fetched all all the components

* Continued from there and was able to refresh the project successfully.

 

Hope this helps who have tried their luck with -clean option and downgrading and still are struggling to resolve the same. Currently I am still on Helios and JRE7 with no changes.

Jerun JoseJerun Jose

Downgrading Java did the trick here.

switching workspaces and -clean did not have any effect.

 

Did not try the continue and refetch mechanism though.

 

Thanks for the help guys

AnshulVermaAnshulVerma

Faced same problem today

 

OS:- Windows 7 (64 bit)

Eclipse:- Helios

 

What worked for me:- 

1. Created project

2. Got error

3. Clicked "Continue"

4. Siwtched workspace to same workspace

5. Refresh project

dhammadhamma

I put '-clean' as the second line after '-startup' in the eclipse.ini and it solved the problem for me.

 

 

s@g.ax801s@g.ax801

Solved My Problem.

JonOsmentJonOsment

Yea it seems this problem is linked to having a JRE/JDK that is too high of a version. To change it in eclipse go to window, preferences java and then compiler. Check to make sure it is version 1.6 and that your JRE is version 6 as well. Then apply, and restart eclipse. 

 

Make sure you mark the first person who mentioned this as the answerer!

 

 

Ek0nomikEk0nomik

I was having this issue too.  I closed Eclipse and then re-opened it running it as an administrator.  That took care of the problem for me.

salesforce19salesforce19

I first downgrading to Java 1.6.27 and then added -clean. It worked for me

balu nutalapatibalu nutalapati

switch workspace to the same workspace and retry

laura.mckevitt@bakertilly.comlaura.mckevitt@bakertilly.com

Excellent post - helped me a lot!

 

Someone should mark ethanone response as the solution.

 

tomoktomok

The problem occurs based on Java 1.7

Go to Eclipse installed dir and edit eclipse.ini

 

Specify the previous vesion of Java and reboot the eclipse.

This is my setting for your reference.

-----------------

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256m
-vm
C:\Program Files\Java\jdk1.6.0_19\bin\javaw.exe
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-javaagent:dropins/MergeDoc/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar

TigerPowerTigerPower

Thanks for the suggestion. Switching workspace worked for me.

 

dbrenner23dbrenner23

It's magic:  @JV100's "switch workspace to the same workspace and retry" worked for me too! Thanks!

ScotroScotro

+1 for switching workspace to the one I'm already using.  Works like a charm :)

fgwarb_devfgwarb_dev

-clean worked for me after trying the workspace thing

FromCRMWonderlandFromCRMWonderland
switched workspace to the same workspace.... it worked for me
Enrico Maria BalattiEnrico Maria Balatti

switched workspace to the same workspace.... it worked for me worked also for. Thank You

SlachtermanSlachterman

Encountered same problem with Eclipse running on JRE7. Switching to JRE6 did not resolve at first. Switch workspace to itself and voila.

Shivanath DevnarayananShivanath Devnarayanan
Admin mode work around ..Worked for me perfectly
SN_ChicagoSN_Chicago

Thank you! This worked for me. I really didn't want to downgrade my JDK so I am very happy this worked.

pk_Tunnpk_Tunn

Yes, Switching to the same workspace worked. But this is not good. I want to be able to use multiple workspaces without downgrading either the JRE or Eclipse

ctriouctriou

Switching workspaces worked like a charm, I was using Java 6 Update 26

FrankJSalinasFrankJSalinas

Thanks! The -clean fixed the refresh error :-)

nwallacenwallace

Switch workspace worked for me.  Thanks!

curtiskcurtisk

Almost the same setup, actually running on Eclipse Indigo AND Java 7 update 13 (because downgrading to 2 year old Java, considering all the bugs/exploits lately is NOT a solution)

 

  • When connecting to salesforce when establishing a new "Force.com Project" got the same error as everyone else
  • Continued past it
  • Did the "switch workspace" back to itself, Eclipse restarts
  • Right clicked on My Project in Eclipse then went to
  • Force.com > Refresh from Server

 

So far so good! Made changes to controller code and pushed back up to server no problem...

Superdome 2Superdome 2

I do NOTHING workaround.

 

No "-clean", no "switch workspace"

 

And, just update to the latest plug-in. And it works all fine.

 

For the reference:

 

OS: Windows 7 32-bit

JRE: Java 1.7.0_15 (Jre 7 Update 15)

Eclipse IDE for Java Developers (Version: Helios Service Release 2)(Build id: 20110301-1815)

Salesforce.com plugin updated to v27

 

sornasorna

for sometime, adding -clean to eclipse.ini worked for me but it again started throwing the same exception. now switching workspace works... I switched the workspace to a new workspace then again switched it back to the old one and the issue seems to be fixed....

VineetzVineetz

Thanks a ton!

Vinnie BVinnie B

I read the message boards on this and was loathe to downgrade Java.  I tried adding the project components as suggested (below) and this worked like a charm.  THANKS!!

 

* Right clicked on the project and navigated to Properties --> Force.com --> Project Contents.

* Clicked on Add/Remove metadata components and it fetched all all the components

* Continued from there and was able to refresh the project successfully.

grangran

My problem got solved too. It was just that in Win 7, Eclipse has to run in Admin mode

 

joheyjohey

-clean followed by switching the workspace to itself worked for me:

JRE 1.7 32 bit (1.7.0_25)

Eclipse  Indigo Service Release 2(20120216-1857)

freshly downloaded Eclipse plugin for force.com support

Alex WeinleAlex Weinle
Prepare for dissappointment v28 is broken ;)
joheyjohey

Good to know at least...

Sangam RavindharSangam Ravindhar

It worked for me adding -Clean at the top of the eclipse.ini file. Thank you

GeigerJTGeigerJT

Downgrading Java worked for me.

 

I had this issues begin when I upgraded to JRE 7. So I downloaded and installed JRE 6 (http://www.oracle.com/technetwork/java/javase/downloads/jre6-downloads-1637595.html) then had to go in and uninstall JRE 7 from the control panel. 

 

To check the version of Java that was running I went to the command prompt and typed in 'java -version' and it kicked out the following:

 

java version "1.7.0_05" ..... before I removed version 7

 

java version "1.6.0_34" .... after in uninstalled version 7 from the control panel

 

After firing up eclipse it worked perfectly!

 

Windows 7, 64 bit

Vinnie BVinnie B

I don't think downgrading is necessary.

 

I was just setting up for Force.com IDE on another machine and got this message there.  When I first saw this I didn't want to do the downgrade for a number of reasons.  After a while, the problem seemed to have gone away.

 

On the second machine I saw this and again didn't want to do the downgrade.  I read somewhere about starting the app as Administrator.  I did this but eventually was led to believe simply restarting the app works.  No need to run as Administrator.

 

Indeed, on two straight machines the problem went away after restarting.

Deepak22.ax1820Deepak22.ax1820

Thanks Martin..It has resolved my IDE issue.

Dinesh1617Dinesh1617

This thing really worked. 

pradsy90pradsy90

Years later... 09/2013... Same issue can be resolved by switching workspaces.

pjaenick.ax736pjaenick.ax736

"The solution that finally worked was downgrading as Alvy P referenced. I only installed the Java SE Development Kit 6 Update 27 which includes the JRE. Don't forget to update your Environmental Variables after downgrading!"

 

Luke C's advice worked for me !

 

(Now, what other applications did I just break by downgrading my Java, hmm...)

 

Thanks,

Pete

Kuldeep SinghKuldeep Singh

-clean command after addition to eclipse.ini file, error resolved :)

 

Add -clean command at the end of eclipse.ini file, it worked.

Pradip YadavPradip Yadav

This issue is specific becuase of jre version used for Eclipse. 

 

Use jre v1.6 to run Force.com project.  If you already have jre on your sytem follow below steps:

1) Package Explorer and right Click

2) Select Properties

3)  Project Facets  : (if form is not availble then Click on link Convert to Facet form)

      3.1) Select Runtime tab

      3.2) Click on New -->  Basic --> J2EE Runtime Library  and click on  Next Button

      3.3) Browse to your jre bin of version 1.6 and Click on Apply button and then Ok

4) Restart the Eclipse

 

Post your feedback if it really helps your!!!

 

Yathiraj BhatYathiraj Bhat
switching workspace worked for me thanks admin
Andray GaustAndray Gaust
I want to use that type of string in my website Deck Cleaning Rome Ga (https://goldenboysstain.com/) to keep my lients data up to date and whenever clients monthly subcription is over it remove automatically from database.