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
dy2a31dy2a31 

Problems uploading/deploying first trigger with Force.com IDE

Hi, everyone.

 

Thanks for creating such a helpful site/community.  I've used information from this forum a lot on this first attempt I'm making with apex code and triggers.

 

I wrote some prototype code in a sandbox and it worked fine.  So, now I'm trying to write a trigger and get it deployed into our production site. 

 

I downloaded the Force.com IDE and synched it up with our server.  I know that it worked because several triggers and apex classes came down to my IDE.

 

I wrote my trigger code and then I wrote an apex class that would test that trigger code.  But while doing that, I would get these annoying warnings saying "File only saved locally, not to server".

 

And I get Error messages when I save in the Force.com IDE that says "Save error:  Unable to perform save on all files:  An unexpected error has occurred.  Please try again, or check the log file for details."

 

The Force.com IDE Log Viewer have a lot of warnings and a couple of different Error messages:

 

(NullPointerException) Unable to perform save on all files. (Open log file for full message and/or stacktrace)

 

and

 

Filepath-zip mapping is null or empty for package 'unpackaged' [null] - skipping component generation (Open log file for full message and/or stacetrace)

 

When I go to the eclipse .log file, I see this:

 

!ENTRY com.salesforce.ide.core 4 0 2009-10-16 16:02:22.741
!MESSAGE ERROR [2009-10-16 16:02:22,726] (SaveToServerAction.java:saveToServer:94) - Unable to save resource(s)

!STACK 0
java.lang.NullPointerException
	at com.salesforce.ide.core.services.ProjectService.setRunTestFailureMarker(ProjectService.java:2335)
	at com.salesforce.ide.core.services.ProjectService.handleRunTestMessages(ProjectService.java:2284)
	at com.salesforce.ide.core.services.ProjectService.handleRunTestResult(ProjectService.java:2230)
	at com.salesforce.ide.core.services.ProjectService.handleDeployResult(ProjectService.java:1940)
	at com.salesforce.ide.ui.actions.SaveToServerActionController.deploy(SaveToServerActionController.java:142)
	at com.salesforce.ide.ui.actions.SaveToServerActionController.saveResourcesToServer(SaveToServerActionController.java:111)
	at com.salesforce.ide.ui.actions.SaveToServerAction$1.execute(SaveToServerAction.java:63)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:104)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:116)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

And I can't find anything about that stacktrace in this forum or in Google.

 

I've tried highlighting all the files (trigger and test code), right-clicking and selecting Force.com > Save to Server.  But that results in an error message (Unable to save resource to server. An unexpecte error has occured.  Please try again, or check the log file for details.)

 

I seem to be stuck.  Any idea's what's causing this?

 

Is it because my code's bad?  Or do I need to fix that NPE on the salesforce.com ProjectService class?  (If so, how?) Or, is my Force.com IDE misconfigured?  Or is my project misconfigured?  Or?

 

Like I said, this is my first attempt at apex development using the Force.com IDE.  So, it could be pilot error.  But I don't know what to fix.

 

Can anybody help me out?

 

Thanks.

ai2ai2
I'm having this same issue.  Did you figure it out?
dy2a31dy2a31

Hi, ai2.

 

The way it was explained to me by salesforce.com support was that I can't sync from Force.com to production.  I needed to sync from Force.com to sandbox.  Then, I can package and deploy from sandbox to production.

 

I never tested this solution myself because we hired a contractor to do the job that I was experimenting at.  But the contractor we hired said the same thing.

 

Hope that helps. 

 

(I would have found it helpful if salesforce.com provided a short walkthrough tutorial or video, perhaps "How to Write and Deploy a Hello World app with Apex Code".)