• JVN
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies

Hello,

 

I want to comment something about the Testing Best Practices Webinar that you can see here:

 

http://www.youtube.com/watch?v=nMEg7e-BOTA

 

The Unit Tests showed in "23:37", "26:01" and "30:10" will fail if you run them across Salesforce interface (not by means of Eclipse Plugin). The exception will be "MIXED_DML_OPERATION". The reason is because they insert an User and Account/Opportunity in the same method (setup and non-setup objects).

 

The workaround for this exception is explained in many blogs and besides in Salesfore documentantion (for example, see http://www.iowntech.com/?p=188).

 

My question is: why the MIXED_DML_OPERATION exception is thrown when the test is runned across Salesforce interface and is not thrown when it is runned across eclipse plugin?

The main problem for us is when we are developing and running tests with eclipse, and then make an Outbound Change Set in order to deploy it to production. We spot this exception in a very bad moment :)

 

 

Thanks in advance,

across

  • April 05, 2011
  • Like
  • 0

Hello,


I can't save my code with Eclipse's plug-in. Here is the StackTrace from Log:

 

ERROR [2010-09-30 12:42:36,914] (MetadataOperationsRetryAspect.java:metadataOperationsRetry:24) - ForceRemoteException occurred while attempting to perform a metadata operation
 WARN [2010-09-30 12:42:36,916] (BaseRetryAspect.java:isExceptionRetryable:198) - General evaluation deemed exception not retry-able:
 AxisFault: (0)null
ERROR [2010-09-30 12:42:36,917] (PackageDeployService.java:deployWork:291) - Unable to retrieve components: AxisFault: (0)null
ERROR [2010-09-30 12:42:36,918] (BuilderController.java:handleException:143) - Unable to perform save on all files.
com.salesforce.ide.core.services.DeployException: (0)null
    at com.salesforce.ide.core.services.PackageDeployService.deployWork(PackageDeployService.java:292)
    at com.salesforce.ide.core.services.PackageDeployService.deploy(PackageDeployService.java:143)
    at com.salesforce.ide.core.services.PackageDeployService.deploy(PackageDeployService.java:116)
    at com.salesforce.ide.core.project.BuilderController.handleSaves(BuilderController.java:120)
    at com.salesforce.ide.core.project.BuilderController.build(BuilderController.java:96)
    at com.salesforce.ide.core.project.BuilderController.build(BuilderController.java:76)
    at com.salesforce.ide.core.project.OnlineBuilder.incrementalBuild(OnlineBuilder.java:79)
    at com.salesforce.ide.core.project.OnlineBuilder.build(OnlineBuilder.java:49)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: (0)null
    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
    at org.apache.axis.client.Call.invoke(Call.java:2553)
    at org.apache.axis.client.Call.invoke(Call.java:2248)
    at org.apache.axis.client.Call.invoke(Call.java:2171)
    at org.apache.axis.client.Call.invoke(Call.java:1691)
    at com.sforce.soap._2006._04.metadata.MetadataBindingStub.deploy(MetadataBindingStub.java:1918)
    at com.salesforce.ide.core.remote.MetadataStubExt.deploy(MetadataStubExt.java:535)
    at com.salesforce.ide.core.remote.MetadataStubExt$$FastClassByCGLIB$$9404e285.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
    at com.salesforce.ide.core.internal.aspects.MetadataOperationsRetryAspect.metadataOperationsRetry(MetadataOperationsRetryAspect.java:22)
    at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
    at com.salesforce.ide.core.remote.MetadataStubExt$$EnhancerByCGLIB$$2da28778.deploy(<generated>)
    at com.salesforce.ide.core.services.PackageDeployService.deployWork(PackageDeployService.java:275)
    ... 19 more

 

Edit: This is the StackTrace when I try to refresh a class also from the plug-in:

 

ERROR [2010-09-30 13:14:14,944] (MetadataOperationsRetryAspect.java:metadataOperationsRetry:24) - ForceRemoteException occurred while attempting to perform a metadata operation
 WARN [2010-09-30 13:14:14,947] (BaseRetryAspect.java:isExceptionRetryable:198) - General evaluation deemed exception not retry-able:
 AxisFault: (0)null
ERROR [2010-09-30 13:14:14,949] (PackageRetrieveService.java:retrieveWork:1065) - Unable to retrieve components: AxisFault: (0)null
ERROR [2010-09-30 13:14:14,971] (RefreshResourceAction.java:fetchRemoteComponents:92) - Unable to refresh resource(s)
AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode:
 faultString: (0)null
 faultActor:
 faultNode:
 faultDetail:
    {}string: return code:  0


(0)null
    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
    at org.apache.axis.client.Call.invoke(Call.java:2553)
    at org.apache.axis.client.Call.invoke(Call.java:2248)
    at org.apache.axis.client.Call.invoke(Call.java:2171)
    at org.apache.axis.client.Call.invoke(Call.java:1691)
    at com.sforce.soap._2006._04.metadata.MetadataBindingStub.checkStatus(MetadataBindingStub.java:1825)
    at com.salesforce.ide.core.remote.MetadataStubExt.checkStatus(MetadataStubExt.java:288)
    at com.salesforce.ide.core.remote.MetadataStubExt$$FastClassByCGLIB$$9404e285.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
    at com.salesforce.ide.core.internal.aspects.MetadataOperationsRetryAspect.metadataOperationsRetry(MetadataOperationsRetryAspect.java:22)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
    at com.salesforce.ide.core.remote.MetadataStubExt$$EnhancerByCGLIB$$11f60700.checkStatus(<generated>)
    at com.salesforce.ide.core.services.BasePackageService.waitForResult(BasePackageService.java:126)
    at com.salesforce.ide.core.services.PackageRetrieveService.getRetrieveResult(PackageRetrieveService.java:941)
    at com.salesforce.ide.core.services.PackageRetrieveService.retrieveWork(PackageRetrieveService.java:1053)
    at com.salesforce.ide.core.services.PackageRetrieveService.retrieveSelective(PackageRetrieveService.java:608)
    at com.salesforce.ide.core.services.PackageRetrieveService.retrieveSelective(PackageRetrieveService.java:525)
    at com.salesforce.ide.core.services.PackageRetrieveService.retrieveSelective(PackageRetrieveService.java:506)
    at com.salesforce.ide.ui.actions.RefreshResourceActionController.handleSourceComponentFileRefresh(RefreshResourceActionController.java:441)
    at com.salesforce.ide.ui.actions.RefreshResourceActionController.refreshResources(RefreshResourceActionController.java:164)
    at com.salesforce.ide.ui.actions.RefreshResourceAction$1.execute(RefreshResourceAction.java:63)
    at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
    at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

 

Anyone know the reason?

 

 

Thanks in advance,

  • September 30, 2010
  • Like
  • 0

Hello,

 

We have a problem when displaying error messages in a certain page. Let me explain you, take this environment:

 

1) Create a Case.

2) Click the "Send An Email" button in "Activity History" section.

3) Fill all required fields and send the email.

 

When the email is sent, internally it  creates a task for the current Case. We have a trigger (before insert and update on Task) that makes some validations and adds an error message if necessary. When it happens, the error message don't appear correctly but a "An internal server error has occurred" page instead.

 

 

 - This is the code we use to add an error message in the trigger:

Trigger.new[0].addError('My message error.');

 

 - This is your error page:

An internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using Salesforce!

Error ID: 1144007776-73 (257953934)



Click here to return to the previous page.

 

 So, what you recommend to do to solve this matter?

 

 

 

Thanks in advance,

 

 

 

 

Message Edited by JVN on 02-17-2009 08:28 AM
  • February 17, 2009
  • Like
  • 0

Trouble with change sets:

 

1. Create change set in Full Copy sb, moving to Prod.

2. Upload set.

3. Set deploy fails because of missing field (in this case I forgot to add Record Types).

4. Go back to Sandbox, clone Change Set, Add Record Types.

5. Click Upload...get an error message:

 

Validation Errors While Saving Record(s) There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Package member already exists". 

 

Uhhh...what? Why?

 

I deleted the old failed change set in production in case there was some channel conflict or something weird but that doens't help. Nothing I do resolves the issue. I'm forced to completely recreate the change set and hope for the best the second time around.

 

Anyone else see this?

 

By the way:

Using Chrome - when trying to 'remove' a component.. the removal happens except the FIRST component in the list of components is removed! not the component I was trying to remove!... logged in with Firefox and the removal mechanism works as expected. Argh. Bugs. : (

Hello,

 

We have a problem when displaying error messages in a certain page. Let me explain you, take this environment:

 

1) Create a Case.

2) Click the "Send An Email" button in "Activity History" section.

3) Fill all required fields and send the email.

 

When the email is sent, internally it  creates a task for the current Case. We have a trigger (before insert and update on Task) that makes some validations and adds an error message if necessary. When it happens, the error message don't appear correctly but a "An internal server error has occurred" page instead.

 

 

 - This is the code we use to add an error message in the trigger:

Trigger.new[0].addError('My message error.');

 

 - This is your error page:

An internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using Salesforce!

Error ID: 1144007776-73 (257953934)



Click here to return to the previous page.

 

 So, what you recommend to do to solve this matter?

 

 

 

Thanks in advance,

 

 

 

 

Message Edited by JVN on 02-17-2009 08:28 AM
  • February 17, 2009
  • Like
  • 0