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
jordi vosjordi vos 

test fails after creating a managed package

Hello all,


We are in the process of making an manages app for a customer of ours.
One of the last steps was making the package managed.

 What I did: reated an unmanaged package
Uploaded the package
Deployed the pacakge in another dev. org
Did all the tests to check if the app works okay
Created a namespace on my first dev. org
added the package to the namespace.

 When I tried to upload this managed pacakage, I got the following error:

 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 Salesforce Support. 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.com!

Error ID: 539275792-3950 (644874273)

 
When I tried to run all tests again on the dev. org, all of them failed. Stating that one class had to be compile again.
Looking at the class, I had no idea what was going wrong.

 The error: error: Compile Error: The left operand 'Timesheet_Line__c.Timesheet__c' cannot have more than one level of relationships at line 30 column 58

 So basicly, a query that worked properly, suddenly doesn't work anymore stating that I go to deep using relationships?

 I found on google that there can be a lot of issues with the namespace an code, but in this case, looking at the error, that doesn't seem to be the case.

 Any suggestions?

 The query to gives the error: SELECT Project_Group__c subTaskId FROM Timesheet_Line__c WHERE Timesheet_User__c =: timesheetUserId AND Timesheet_Line__c.Timesheet__c IN (SELECT Id FROM Timesheet__c WHERE Week_Commencing__c =: WeekCommencingDate) GROUP BY Project_Group__c

Regards,

 Jordi

Sridhar BonagiriSridhar Bonagiri

Hi,

 

Can you change the your query to the below one and upload the package again.

 

 

SELECT Project_Group__c subTaskId FROM Timesheet_Line__c WHERE Timesheet_User__c =: timesheetUserId AND Timesheet__c IN (SELECT Id FROM Timesheet__c WHERE Week_Commencing__c =: WeekCommencingDate) GROUP BY Project_Group__c

 


Let me know if you need any help.

 

Regards,

Sridhar Bonagiri

jordi vosjordi vos

Hello Sridhar,

 

First of all, thanks for the reply. It's always nice to see people willing to help others out.

 

I already tried the chage you supplied. I tried doing it again anyway and I get the same error when trying to save the class.

So an upload would be pointless(Since I can't save the class).

 

I also submitted a case yesterday so I keep everyone posted. So if anyone else encouters this, then at least there may be some more information..

jordi vosjordi vos

A small update:

 

I noticed that the error keeps popping up, even if I comment the whole class out!

 

Thinking it might be the or, I tries this on an different dev org.

 

Created an unmanaged package, put the code in, made it managed and tried to run the tests again.

Same error on the same class.

 

I also noticed that we have the spring 2013 on the dev orgs now. Maybe this is related?

 

It seems that the class is locked or something since the error keeps popping up. Even when the whole class is commented out. Is there anyone who noticed something similar while creating managed packages?