+ Start a Discussion
New to SF1New to SF1 

Cannot create a new project on the Force IDE

HI.

 

I am following the Warehouse app Tutorial.

I am at Tutorial #7.

Just finished down-loading the Force.com IDE but don't know how to create a project.

The instruction are saying to select FILe->New but under File the only options I am getting are: Exit, Open File and Convert Line delimiters to...

 

Help will be much appreciated!

 

New to SF

Best Answer chosen by Admin (Salesforce Developers) 
RovRov

This error could be due to problems related to stale plugin cache information.

 

There are few solutions you can try based on previous posts -  Try #1 first, if doesn't work then #2, else #3

1. Find the eclipse.ini file and, add the following line to the eclipse.ini file, near the top:  

-clean

2. Arranging the forceide.ini file

The following solution is taken from (http://boards.developerforce.com/t5/General-Development/Unable-to-fetch-and-save-Force-com-Components-to-Project/td-p/333601/page/2)

'Try arranging the forceide.ini file.  I moved the MaxPermSize, and PermSize args up by 4 lines and it's worked ever since. (Didn't have to downgrade Java)'

forceide.ini contents:

#utf8 (do not remove)
-startup
../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
../Common/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.0.200.v20090519
-install
C:\Users\fourq\AppData\Local\salesforce.com\Force.com IDE
-configuration
C:\Users\fourq\AppData\Local\salesforce.com\Force.com IDE\configuration
-vmargs
-XX:MaxPermSize=512M
-XX:PermSize=128M
-Dfile.encoding=UTF-8
-Xms256m
-Xmx1024m

3. Downgrading

The following solution is taken from (http://boards.developerforce.com/t5/General-Development/Unable-to-refresh-resource/td-p/205678)

- 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

 

Please post how you go.

 

 

All Answers

RovRov

Can you please provide this information, mey help to figure out why you can't create a new project.

 

Are the other options greyed out?

Are you in the Force.com perspective?

What version of eclipse have you installed? (Find it in: Help>About)

Did you install the Standalone Application or the or the eclipse plugin? 

New to SF1New to SF1

Thanks much for the prompt response!

I initially installed the stand alone version but now - trying to bypass the problem - I went the Eclipse route.

I installed The Java Runtime and Ecplise 3.6.

Now I did manage to get to the "Create a force.com project. I passed the first screen (where I entered my Organization settings)  but I got stuck on the next screen ("Choose initial project content").

I selected the "Apex and VisualForce" option but I am getting a error message:

 

"Fetch Error

Unable to Fetch and Save Force.com components to project:

 

com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName

cannot be cast to com.sun.xml.internal.bind.v2.runtime.reflect.Accessor"

 

It asks me if to abort or continue. (while the name of the new project already appears under the Package explorer).

Selecting "continue" it seems as if all is OK. I created a new trigger. But writing any logic inside the trigger and trying to do a save I am getting 2 errors (the text was copied from the tutorial so it must be OK) the message is:

 

"Save error" Unable to perform save on all files: com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName

cannot be cast to com.sun.xml.internal.bind.v2.runtime.reflect.Accessor"

 

The same error as I got before selecting "continue"

 

Any assistance will be appreciated.

 

RovRov

This error could be due to problems related to stale plugin cache information.

 

There are few solutions you can try based on previous posts -  Try #1 first, if doesn't work then #2, else #3

1. Find the eclipse.ini file and, add the following line to the eclipse.ini file, near the top:  

-clean

2. Arranging the forceide.ini file

The following solution is taken from (http://boards.developerforce.com/t5/General-Development/Unable-to-fetch-and-save-Force-com-Components-to-Project/td-p/333601/page/2)

'Try arranging the forceide.ini file.  I moved the MaxPermSize, and PermSize args up by 4 lines and it's worked ever since. (Didn't have to downgrade Java)'

forceide.ini contents:

#utf8 (do not remove)
-startup
../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
../Common/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.0.200.v20090519
-install
C:\Users\fourq\AppData\Local\salesforce.com\Force.com IDE
-configuration
C:\Users\fourq\AppData\Local\salesforce.com\Force.com IDE\configuration
-vmargs
-XX:MaxPermSize=512M
-XX:PermSize=128M
-Dfile.encoding=UTF-8
-Xms256m
-Xmx1024m

3. Downgrading

The following solution is taken from (http://boards.developerforce.com/t5/General-Development/Unable-to-refresh-resource/td-p/205678)

- 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

 

Please post how you go.

 

 

This was selected as the best answer
New to SF1New to SF1

Thanks for that!

 

Unfortunately the two first steps didn't work.

 

I'll try to unistall everything and start over again.

 

Regards

New to SF1New to SF1

 

 

 

I am back to trying to install the Force.com IDE and still cannot create a new project as under the file menu I don't get the "new" option.

Maybe the following info may assist: 

In the Force.com IDE Log viewer I am getting the following message:

"Org.xml.SAXParserException: The entity name must immediately follow the ‘&’ in the entry reference"

I don’t know it this is related but while doing the installation I got a message-box headed Forceide, the first line said: “JVM terminated. exit code =-1”

 

Any help would be much appreciated!

frasuyetfrasuyet

No need to use the File menu. Instead, in the Package Explorer, right click and you'll be able to create a new Force.com Project like you would using Eclipse.

 

A bit odd, had to source the answer from Twitter.

JWT_FusionRMJWT_FusionRM

I had the same problem and tried the three steps suggested by rov above. I was lazy and just installed the latest update of JDK 1.6 Release 31 and tried re-installing the Force.com IDE. I still had the same problem/error message when I tried to create a new project with my Sandbox Org. When I went back and re-read the instructions for the third step, I noticed that it clearly stated that I needed to install JDK 1.6 Release 27, NOT Release 31.

 

So I went back to the Java SE downloads page, http://www.oracle.com/technetwork/java/javase/downloads/index.html (this link should open in a new browser), and selected the Previous Releases link just underneath the "Java SE Downloads" bold header. On the "Oracle Java Archive" page, I selected the Java SE 6 link, and then on the "Java SE 6 Downloads" page, I specifically selected the Java SE Development Kit 6u27 link and downloaded JDK 1.6.0_27 for my hardware (Windows 64-bit). Before I installed JDK 1.6.0_27, I wiped clean the JDK1.6.0_31 and JDK1.7 installations as well as the Force.com IDE installation that previously did not work. I created an AUTOEXEC.bat file in the root directory with JDK1.6.0_27 in the PATH:

 

SET JAVA_HOME=C:\Program Files\Java\jdk1.6.0_27
PATH=.;"%JAVA_HOME%\bin"

 

And just to be safe, I also set up the JAVA_HOME and PATH environment variables in the Windows 7 Control Panel by opening up the Control Panel and:

  1. selecting the "System and Security" link
  2. then the "System" link
  3. then the "Advanced system settings" link
  4. then pressing the "Environment Variables..." button under the "Advanced" tab in the System Properties dialog window that appeared

(As you will see below, I do not think that setting up the environment variables in the Control Panel worked for me.)

 

After all of the above, I again downloaded the Force.com IDE app from developer.force.com.  I tried running the Force.com installer again (by double-clicking on the *.exe file) and received an error message about a missing file for JDK1.7. Since I was tired of messing around with Windows 7 and my lack of understanding of how to properly set up my Java environment in Windows 7, I decided to try a command-line solution which finally worked:

  1. I opened a DOS / command-line window and navigated to my root (C:\) directory
  2. I manually executed AUTOEXEC.BAT to properly set up my Java environment
  3. I then navigated to the directory in which I had placed the downloaded "Force.com IDE Installer.exe" file and executed the installer from the command line
  4. the normal installation wizard appeared and I accepted all of the default values for the installation

Finally I was able to create a new Force.com project, point it to my Sandbox Org, and the Force.com IDE was successfully able to download all of the metadata from my Org (and I no longer received the above error message)!

 

So the two lessons I learned were that I need to specifically use JDK 1.6.0_27 on my Windows 7 machine and that I needed to manually set up my AUTOEXEC.BAT file and run the installation executable from the command line to get the Java environment properly set up. I am by no means a Windows expert (my prior development background is in Solaris / Unix) so I'm sure I did something wrong with my Windows 7 Java environment setup such that I could not just double-click the Force.com IDE installer. If anyone has any comments about a better way to set up the Java environment than running the installation from the command line, please post a reply to make this easier for the next person who is trying to solve this same problem.

ddddavoddddavo

Running win7 64bit.

 

Tried solution strategy #1, but applied it to 'forceide.ini' rather thatn 'eclipse.ini' which does not exist on my system.  Didn't help.

 

Tried solution stratgegy #2, it didn't help.

 

I have the 32 and 64 bit versions of JRE7 installed, both are needed.  I have the 64 bit version of JDK1.7, that's needed.  I can't believe these have to be uninstalled.  So...I installed the 64-bit version of JDK1.6 update 27, and then I reinstalled the Force IDE...and it seems to run just fine now.

 

ToddSmToddSm

All i need to do is temporarily turn off two triggers and then turn them back on.  I am having the same problem outlined here and getting the following error message:

 

Com.salesforce.ide.api.metadata.types.Metadata$jaxbAccessorF_fullName cannot be cast to com.sunxml.internalbind.v2.runtime.reflect.Accessor

 

Any advice?

 

Thanks

sadhasivamsadhasivam

Awesome 

 

Step 1 Worked fine for me..

 

Thanks

 

forcetoreckonforcetoreckon

Hi,

 

For me the issue is size, as if I select individual component then I do not face issue while creating the project, however if I increase the size mentioned in one of the solution then, I get an error saying ' Virtual machine cannot be started', my assumption is, that might happen because of the limited RAM available on my notebook e.g.. 2 gig. Because of the limited RAM I cannot increase the allowed memory usage in configuration file and because of that I cannot create a project.

 

But I can say for sure the problem is with the amount of memory required to download files and create project is the whole issue with this error.

 

Cheers

tonantetonante

Thanks #1 worked for me.  I had just set up a refresh on my development en vironment and I was able to create a project with classes that I need but I had forgotten a few others that I needed to work on so every time I tried to go  and Add those I got that  error too.  Now when I put -clean option  near the top of the eclipse.ini file it works once I closed and restarted Force.com IDE on the workspace.   I knew that it wasn;t the jre version because I already had

access to the test Sandbox environment in another Force.com workspace and that was working nicely without any errors.

 

Thanks much.

Randall ToepferRandall Toepfer

I have Ubuntu 12.10, Eclipse Indigo 3.6, and Java 1.7.0_21.  I received the reflection error message in the first post.  Changed the eclipse.ini file to include the clean option and moved the memory configuration variables to the top of the file.  Eclipse works now.

DownstairsBDownstairsB

#2 worked for me, except I had to move the two memory arguments to the top of the file.  Moving them up a few lines wasn't enough.

sijuthomaspsijuthomasp

Option 2, did work for me. Thanks much for the information.

mauro_offermannmauro_offermann

If you use force.com ide as eclipse plug in, try this:

 

1º Instal jdk 1.6.0u27

2º Go to eclipse.ini file and add the -vm flag to start eclipse with specific jdk version, as following:

 

...
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.6.0_27\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5

...

 

replace the C:\Program Files\Java\jdk1.6.0_27\bin\javaw.exe for your jdk path

3º Start eclipse

This solution starts eclipse with a specific version of java regardless of the version of java to run on your machine.