Timesheet Add Lines error

J

John Ralphson

I've got one project that I can't add lines to a timesheet for. Onscreen I
get a "An unexpected error has occurred." However, the following three lines
are written to the log file:

03/09/2007 16:10:33.71 w3wp.exe (0x1254)
0x14B8 Project Server Project Server - General
0 Exception Exception occurred in method TimeSheet.PrepareTimesheetLine
System.ArgumentException: These columns don't currently have unique values.
at System.Data.ConstraintCollection.AddUniqueConstraint(UniqueConstraint
constraint) at System.Data.ConstraintCollection.Add(Constraint
constraint, Boolean addUniqueWhenAddingForeign) at
System.Data.DataTable.set_PrimaryKey(DataColumn[] value) at
Microsoft.Office.Project.Server.DataAccessLayer.Generated.TimesheetDalBase.ReadCustomFieldByProjUID(Guid
resUID, Guid projUID, Guid periodUID) at
Microsoft.Office.Project.Server.BusinessLayer.TimeSheet.PreloadActualsAndCustomFields(TimesheetDataSet
dsTS, Guid projectUID, DataSet dsPeriod, Dictionary`2 assignment2tlMap)
at
Microsoft.Office.Project.Server.BusinessLayer.TimeSheet.PrepareTimesh... 04858c3d-a3ff-4e50-9ec4-86df3c683e06

03/09/2007 16:10:33.71* w3wp.exe (0x1254)
0x14B8 Project Server Project Server - General
0 Exception ...eetLine(Guid tsUID, TimesheetDataSet& dsDelta, Guid[]
tlsNeedFill) at
Microsoft.Office.Project.Server.WebService.TimeSheet.PrepareTimesheetLine(Guid
tsUID, TimesheetDataSet& dsDelta, Guid[]
tlsNeedFill) 04858c3d-a3ff-4e50-9ec4-86df3c683e06

03/09/2007 16:10:33.85 w3wp.exe (0x0824)
0x0A30 Project Server Project Server - General
8mqg Exception System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: ProjectServerError(s)
LastError=GeneralUnhandledException Instructions: Pass this into
PSClientError constructor to access all error information at
Microsoft.Office.Project.Server.WebService.TimeSheet.PrepareTimesheetLine(Guid
tsUID, TimesheetDataSet& dsDelta, Guid[] tlsNeedFill) at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
Microsoft.Office.Project.Server.WebServiceProxy.PSIProxyBase.InvokePSI(String
serviceName, String methodName, Object[] parameters)

Any help would be appreciated.
 
J

John Ralphson

My apologies. I foolishly didn't realize that this was the
microsoft.public.project.server newsgroup and double posted.
 
C

c5solutions

We are getting the same error here on several projects... but i think it is a task dependent problem, not project dependent.
I haven't yet figured out what causes the problem, but I found out that as Administrator you can create a surrogate timesheet which does work on the second attempt...
This timesheet you can print and you can then try adding the lines subsequently to an empty timesheet to figure out which task exactly causes the problem...

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
J

James Fraser

We are getting the same error here on several projects... but i think it is a task dependent problem, not project dependent.

If you are getting the problem that involves the
ReadCustomFieldByProjUID(Guid
resUID, Guid projUID, Guid periodUID) error in the log, then I have
some information:

We worked at length with Microsoft Support to help them reproduce this
issue. We came up with a list of steps that would reproduce the
problem on a clean database, and it's now in Microsoft's hands.

It does seem to be related to specific "corrupt" assignments, and the
problem could not be recreated unless Project Server is installed with
the recommended limited security accounts. If you install with
everything using the Administrator account, you won't encounter this
specific error, or at least be able to reproduce it with the procedure
we discovered.

One fix that seems to prevent new assignments from getting
problematic:
The SSP Application Pool Security account was installed with
db_datareader, db_datawriter, ProjectServerRole, and Public
permissions on the four Project Server databases and db_ddladmin on
the reporting database. These permissions were created automatically
by the Project Server installation and setup.

Granting this account the SQL Server db_owner role to these four
databases seems to have eliminated the error for _new_ assignments.

I was not able to fix the already "corrupt" assignments short of
removing them in Project Professional and reassigning them.


Jamie Fraser
 
M

Mike

If you are getting the problem that involves the
ReadCustomFieldByProjUID(Guid
resUID, Guid projUID, Guid periodUID) error in the log, then I have
some information:

We worked at length with Microsoft Support to help them reproduce this
issue. We came up with a list of steps that would reproduce the
problem on a clean database, and it's now in Microsoft's hands.

It does seem to be related to specific "corrupt" assignments, and the
problem could not be recreated unless Project Server is installed with
the recommended limited security accounts. If you install with
everything using the Administrator account, you won't encounter this
specific error, or at least be able to reproduce it with the procedure
we discovered.

One fix that seems to prevent new assignments from getting
problematic:
The SSP Application Pool Security account was installed with
db_datareader, db_datawriter, ProjectServerRole, and Public
permissions on the four Project Server databases and db_ddladmin on
the reporting database. These permissions were created automatically
by the Project Server installation and setup.

Granting this account the SQL Server db_owner role to these four
databases seems to have eliminated the error for _new_ assignments.

I was not able to fix the already "corrupt" assignments short of
removing them in Project Professional and reassigning them.

Jamie Fraser

Jamie

Can you confirm the automatic permissions you see when you crete a new
Project Web Application. I have seen one several references to read/
write permissions associated with Content databases and also a
reference to read/write for the account running Analysis Services.
However I have done a number of installations and the automatic
permissioning (on my systems) for the project server databases are:
SSPAdmin - public/projectserverRole
FarmAdmin - dbo

The only acception ia that on reporting database SSPAdmin has
db_ddladmin, i.e I do not have explict datareader/datawriter
permissions set.

Thanks

Mike
 
J

James Fraser

Jamie

Can you confirm the automatic permissions you see when you crete a new
Project Web Application. I have seen one several references to read/
write permissions associated with Content databases and also a
reference to read/write for the account running Analysis Services.
However I have done a number of installations and the automatic
permissioning (on my systems) for the project server databases are:
SSPAdmin - public/projectserverRole
FarmAdmin - dbo

The only acception ia that on reporting database SSPAdmin has
db_ddladmin, i.e I do not have explict datareader/datawriter
permissions set.

Interesting.

I just looked into the permissions for two instances that I had handy.
Project Server was installed on a dedicated new box, and using an
existing SQL 2000 SP4 server. The permissions on the Project Server
databases are similar to what you describe above with the SSP Account
only set to public and ProjectServerRole. and the Farm Admin account
set to dbo.
But my notes from installing another instance similarly, where we ran
into problems with timesheets and "corrupt" assignments, are what I
wrote my earlier post from. I can go back to the two instances
(matching test and production) but I wouldn't trust whatever I found
there as an indicator of anything, since I've went through a lot of
trouble shooting and changing settings.

Long story short, from what I can verify you seem right about the
initial permissions on installation. That said, if you are running
into problems with timesheets, granting the SSP account dbo
permissions to the databases seemed to resolve it in some reproducible
cases.

One case that we were able to reproduce successfully involved entering
time to a task in a timesheet, then that task moves to a different
date range, then trying to import the original timesheet. There are
many more requirements than just this for the full reproduction, but I
think all 28 steps might be a bit boring...


Jamie Fraser
 
J

John Ralphson

Thanks for responding. I think you're correct in that not every task within
the project is affected, but this problem only occurred within that
particular project. Other projects seemed to work fine.

In the end, through Project Professional 2007, I republished the project
under a different name, and haven't had any problems with the new copy.
 
M

Mike

Interesting.

I just looked into the permissions for two instances that I had handy.
Project Server was installed on a dedicated new box, and using an
existing SQL 2000 SP4 server. The permissions on the Project Server
databases are similar to what you describe above with the SSP Account
only set to public and ProjectServerRole. and the Farm Admin account
set to dbo.
But my notes from installing another instance similarly, where we ran
into problems with timesheets and "corrupt" assignments, are what I
wrote my earlier post from. I can go back to the two instances
(matching test and production) but I wouldn't trust whatever I found
there as an indicator of anything, since I've went through a lot of
trouble shooting and changing settings.

Long story short, from what I can verify you seem right about the
initial permissions on installation. That said, if you are running
into problems with timesheets, granting the SSP account dbo
permissions to the databases seemed to resolve it in some reproducible
cases.

One case that we were able to reproduce successfully involved entering
time to a task in a timesheet, then that task moves to a different
date range, then trying to import the original timesheet. There are
many more requirements than just this for the full reproduction, but I
think all 28 steps might be a bit boring...

Jamie Fraser- Hide quoted text -

- Show quoted text -

Hi Jamie

The concern is of course you investigate and resolve in one
environment, then move to the next and behaviour is different!

regards

Mike
 
C

c5solutions

James Fraser said:
Granting this account the SQL Server db_owner role to these four
databases seems to have eliminated the error for _new_ assignments.

Thank you very much for this tip... I was actually thinking this would
resolve the issue for me too. Just until I realized, when I wanted to grant
these rights, that I had already done so. Pretty disappointing...

You mentioned that this problem only occurs when you do not "install with
everything using the Administrator account", so I wonder if it is possible to
change an existing installation to this situation? What do you mean by
installing everything using the admin account? Our installation here is on
two different servers, one sql server 2005 and another one with project
server 2007.

Since we are really using our installation here I keep getting complaints
about this error and would try anything to fix it.
 
S

Sharry Heberer [MSFT]

Do you still need an anwer to this question? If so, can you please indicate
whether this timesheet is being created/edited via PWA or via the Timesheet
PSI?

Thanks!

--
This posting is provided "AS IS" with no warranties, and confers no rights.

Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

John Ralphson said:
I've got one project that I can't add lines to a timesheet for. Onscreen
I
get a "An unexpected error has occurred." However, the following three
lines
are written to the log file:

03/09/2007 16:10:33.71 w3wp.exe (0x1254)
0x14B8 Project Server Project Server - General
0 Exception Exception occurred in method TimeSheet.PrepareTimesheetLine
System.ArgumentException: These columns don't currently have unique
values.
at System.Data.ConstraintCollection.AddUniqueConstraint(UniqueConstraint
constraint) at System.Data.ConstraintCollection.Add(Constraint
constraint, Boolean addUniqueWhenAddingForeign) at
System.Data.DataTable.set_PrimaryKey(DataColumn[] value) at
Microsoft.Office.Project.Server.DataAccessLayer.Generated.TimesheetDalBase.ReadCustomFieldByProjUID(Guid
resUID, Guid projUID, Guid periodUID) at
Microsoft.Office.Project.Server.BusinessLayer.TimeSheet.PreloadActualsAndCustomFields(TimesheetDataSet
dsTS, Guid projectUID, DataSet dsPeriod, Dictionary`2 assignment2tlMap)
at
Microsoft.Office.Project.Server.BusinessLayer.TimeSheet.PrepareTimesh...
04858c3d-a3ff-4e50-9ec4-86df3c683e06

03/09/2007 16:10:33.71* w3wp.exe (0x1254)
0x14B8 Project Server Project Server - General
0 Exception ...eetLine(Guid tsUID, TimesheetDataSet& dsDelta, Guid[]
tlsNeedFill) at
Microsoft.Office.Project.Server.WebService.TimeSheet.PrepareTimesheetLine(Guid
tsUID, TimesheetDataSet& dsDelta, Guid[]
tlsNeedFill) 04858c3d-a3ff-4e50-9ec4-86df3c683e06

03/09/2007 16:10:33.85 w3wp.exe (0x0824)
0x0A30 Project Server Project Server - General
8mqg Exception System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: ProjectServerError(s)
LastError=GeneralUnhandledException Instructions: Pass this into
PSClientError constructor to access all error information at
Microsoft.Office.Project.Server.WebService.TimeSheet.PrepareTimesheetLine(Guid
tsUID, TimesheetDataSet& dsDelta, Guid[] tlsNeedFill) at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
Microsoft.Office.Project.Server.WebServiceProxy.PSIProxyBase.InvokePSI(String
serviceName, String methodName, Object[] parameters)

Any help would be appreciated.
 
C

c5solutions

I still need an answer, we still have the problem...
here the timesheets are created via PWA...
What does PSI stand for anyway?

Sharry Heberer said:
Do you still need an anwer to this question? If so, can you please indicate
whether this timesheet is being created/edited via PWA or via the Timesheet
PSI?

Thanks!

--
This posting is provided "AS IS" with no warranties, and confers no rights.

Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

John Ralphson said:
I've got one project that I can't add lines to a timesheet for. Onscreen
I
get a "An unexpected error has occurred." However, the following three
lines
are written to the log file:

03/09/2007 16:10:33.71 w3wp.exe (0x1254)
0x14B8 Project Server Project Server - General
0 Exception Exception occurred in method TimeSheet.PrepareTimesheetLine
System.ArgumentException: These columns don't currently have unique
values.
at System.Data.ConstraintCollection.AddUniqueConstraint(UniqueConstraint
constraint) at System.Data.ConstraintCollection.Add(Constraint
constraint, Boolean addUniqueWhenAddingForeign) at
System.Data.DataTable.set_PrimaryKey(DataColumn[] value) at
Microsoft.Office.Project.Server.DataAccessLayer.Generated.TimesheetDalBase.ReadCustomFieldByProjUID(Guid
resUID, Guid projUID, Guid periodUID) at
Microsoft.Office.Project.Server.BusinessLayer.TimeSheet.PreloadActualsAndCustomFields(TimesheetDataSet
dsTS, Guid projectUID, DataSet dsPeriod, Dictionary`2 assignment2tlMap)
at
Microsoft.Office.Project.Server.BusinessLayer.TimeSheet.PrepareTimesh...
04858c3d-a3ff-4e50-9ec4-86df3c683e06

03/09/2007 16:10:33.71* w3wp.exe (0x1254)
0x14B8 Project Server Project Server - General
0 Exception ...eetLine(Guid tsUID, TimesheetDataSet& dsDelta, Guid[]
tlsNeedFill) at
Microsoft.Office.Project.Server.WebService.TimeSheet.PrepareTimesheetLine(Guid
tsUID, TimesheetDataSet& dsDelta, Guid[]
tlsNeedFill) 04858c3d-a3ff-4e50-9ec4-86df3c683e06

03/09/2007 16:10:33.85 w3wp.exe (0x0824)
0x0A30 Project Server Project Server - General
8mqg Exception System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: ProjectServerError(s)
LastError=GeneralUnhandledException Instructions: Pass this into
PSClientError constructor to access all error information at
Microsoft.Office.Project.Server.WebService.TimeSheet.PrepareTimesheetLine(Guid
tsUID, TimesheetDataSet& dsDelta, Guid[] tlsNeedFill) at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
Microsoft.Office.Project.Server.WebServiceProxy.PSIProxyBase.InvokePSI(String
serviceName, String methodName, Object[] parameters)

Any help would be appreciated.
 
S

Sharry Heberer [MSFT]

PSI = Project Server Interface. Basically a collection of web services to
write custom code to interact with Project Server.

I thought if you were using the PSI that maybe you had a mistake in the code
somewhere that you were using a Guid twice and were getting into a
PrimaryKey constraint situation. But you are using PWA, so that doesn't
apply.

Unfortunately I don't have the expertise to help with Timesheets created via
PWA. There appears to be a problem with a custom field. Sorry I can't be
of more help.

Good luck,
Sharry

--
This posting is provided "AS IS" with no warranties, and confers no rights.

Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

c5solutions said:
I still need an answer, we still have the problem...
here the timesheets are created via PWA...
What does PSI stand for anyway?

Sharry Heberer said:
Do you still need an anwer to this question? If so, can you please
indicate
whether this timesheet is being created/edited via PWA or via the
Timesheet
PSI?

Thanks!

--
This posting is provided "AS IS" with no warranties, and confers no
rights.

Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

John Ralphson said:
I've got one project that I can't add lines to a timesheet for.
Onscreen
I
get a "An unexpected error has occurred." However, the following three
lines
are written to the log file:

03/09/2007 16:10:33.71 w3wp.exe (0x1254)
0x14B8 Project Server Project Server - General
0 Exception Exception occurred in method TimeSheet.PrepareTimesheetLine
System.ArgumentException: These columns don't currently have unique
values.
at
System.Data.ConstraintCollection.AddUniqueConstraint(UniqueConstraint
constraint) at System.Data.ConstraintCollection.Add(Constraint
constraint, Boolean addUniqueWhenAddingForeign) at
System.Data.DataTable.set_PrimaryKey(DataColumn[] value) at
Microsoft.Office.Project.Server.DataAccessLayer.Generated.TimesheetDalBase.ReadCustomFieldByProjUID(Guid
resUID, Guid projUID, Guid periodUID) at
Microsoft.Office.Project.Server.BusinessLayer.TimeSheet.PreloadActualsAndCustomFields(TimesheetDataSet
dsTS, Guid projectUID, DataSet dsPeriod, Dictionary`2 assignment2tlMap)
at
Microsoft.Office.Project.Server.BusinessLayer.TimeSheet.PrepareTimesh...
04858c3d-a3ff-4e50-9ec4-86df3c683e06

03/09/2007 16:10:33.71* w3wp.exe (0x1254)
0x14B8 Project Server Project Server - General
0 Exception ...eetLine(Guid tsUID, TimesheetDataSet& dsDelta, Guid[]
tlsNeedFill) at
Microsoft.Office.Project.Server.WebService.TimeSheet.PrepareTimesheetLine(Guid
tsUID, TimesheetDataSet& dsDelta, Guid[]
tlsNeedFill) 04858c3d-a3ff-4e50-9ec4-86df3c683e06

03/09/2007 16:10:33.85 w3wp.exe (0x0824)
0x0A30 Project Server Project Server - General
8mqg Exception System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: ProjectServerError(s)
LastError=GeneralUnhandledException Instructions: Pass this into
PSClientError constructor to access all error information at
Microsoft.Office.Project.Server.WebService.TimeSheet.PrepareTimesheetLine(Guid
tsUID, TimesheetDataSet& dsDelta, Guid[] tlsNeedFill) at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
Microsoft.Office.Project.Server.WebServiceProxy.PSIProxyBase.InvokePSI(String
serviceName, String methodName, Object[] parameters)

Any help would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top