Error while updating

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Error while updating

Tushar Abhyankar
Hi Everybody,

 

            I am encountering an exception when trying to update the party  

 

[file:/C:/dev/ofbizapps/ofbiz/applications/party/script/org/ofbiz/party/cont
act/PartyContactMechServices.xml#updatePartyContactMech]]: ; [ERROR: Cannot
update specified contact info because it does not correspond to the
specified party.]

 

Although the partyId corresponds to the contactMechId also the userloginId
corresponds to the partyId.

Has anyone encountered this error before?

 

Regards,

--Tushar.

Reply | Threaded
Open this post in threaded view
|

Re: Error while updating

Scott Gray
Hi Tushar

My first bet would be that the contactMech has expired (thruDate set to
before now).  For example you will get this error if you expire a
contact mech then click on Show Old in the party manager and then try
and edit the contact mech that you just expired.

Regards
Scott

Tushar Abhyankar wrote:

> Hi Everybody,
>
>  
>
>             I am encountering an exception when trying to update the party  
>
>  
>
> [file:/C:/dev/ofbizapps/ofbiz/applications/party/script/org/ofbiz/party/cont
> act/PartyContactMechServices.xml#updatePartyContactMech]]: ; [ERROR: Cannot
> update specified contact info because it does not correspond to the
> specified party.]
>
>  
>
> Although the partyId corresponds to the contactMechId also the userloginId
> corresponds to the partyId.
>
> Has anyone encountered this error before?
>
>  
>
> Regards,
>
> --Tushar.
>
>
>  

Reply | Threaded
Open this post in threaded view
|

RE: Error while updating

Tushar Abhyankar
Hi Scott,
Thanks for the reply. I verified and found that thru_date in
partyContactMech table was "null" and I am still getting the error. I
updated it to a later date manually and still get the same exception.

Regards,
--Tushar.

-----Original Message-----
From: Scott Gray [mailto:[hidden email]]
Sent: Tuesday, October 03, 2006 1:08 PM
To: [hidden email]
Subject: Re: Error while updating

Hi Tushar

My first bet would be that the contactMech has expired (thruDate set to
before now).  For example you will get this error if you expire a
contact mech then click on Show Old in the party manager and then try
and edit the contact mech that you just expired.

Regards
Scott

Tushar Abhyankar wrote:
> Hi Everybody,
>
>  
>
>             I am encountering an exception when trying to update the party

>
>  
>
>
[file:/C:/dev/ofbizapps/ofbiz/applications/party/script/org/ofbiz/party/cont
> act/PartyContactMechServices.xml#updatePartyContactMech]]: ; [ERROR:
Cannot

> update specified contact info because it does not correspond to the
> specified party.]
>
>  
>
> Although the partyId corresponds to the contactMechId also the userloginId
> corresponds to the partyId.
>
> Has anyone encountered this error before?
>
>  
>
> Regards,
>
> --Tushar.
>
>
>  


Reply | Threaded
Open this post in threaded view
|

Re: Error while updating

Scott Gray
How are you updating the contact mech?  Are you using the existing UI or
are you calling the service through some code of your own?


Tushar Abhyankar wrote:

> Hi Scott,
> Thanks for the reply. I verified and found that thru_date in
> partyContactMech table was "null" and I am still getting the error. I
> updated it to a later date manually and still get the same exception.
>
> Regards,
> --Tushar.
>
> -----Original Message-----
> From: Scott Gray [mailto:[hidden email]]
> Sent: Tuesday, October 03, 2006 1:08 PM
> To: [hidden email]
> Subject: Re: Error while updating
>
> Hi Tushar
>
> My first bet would be that the contactMech has expired (thruDate set to
> before now).  For example you will get this error if you expire a
> contact mech then click on Show Old in the party manager and then try
> and edit the contact mech that you just expired.
>
> Regards
> Scott
>
> Tushar Abhyankar wrote:
>  
>> Hi Everybody,
>>
>>  
>>
>>             I am encountering an exception when trying to update the party
>>    
>
>  
>>  
>>
>>
>>    
> [file:/C:/dev/ofbizapps/ofbiz/applications/party/script/org/ofbiz/party/cont
>  
>> act/PartyContactMechServices.xml#updatePartyContactMech]]: ; [ERROR:
>>    
> Cannot
>  
>> update specified contact info because it does not correspond to the
>> specified party.]
>>
>>  
>>
>> Although the partyId corresponds to the contactMechId also the userloginId
>> corresponds to the partyId.
>>
>> Has anyone encountered this error before?
>>
>>  
>>
>> Regards,
>>
>> --Tushar.
>>
>>
>>  
>>    
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

RE: Error while updating

Tushar Abhyankar
Scott,
        I am calling a service through own code, the code below is part
service(simple method) itself.

The Code snippet is:

<clear-field field-name="mapIn"/>
                <log level="info" message="Creating or Updating
billContactMech for partyId:${partyId}"/>
                <set-service-fields to-map-name="mapIn"
service-name="updatePartyPostalAddress" map-name="parameters"/>
                <log level="info" message="MapIn:${mapIn}"/>
                <set field="mapIn.partyId" from-field="partyId"/>
                <if-empty field-name="mapIn.contactMechId">
                        <set field="mapIn.contactMechPurposeTypeId"
value="BILLING_LOCATION"/>
                        <call-service
service-name="createPartyPostalAddress" in-map-name="mapIn">
                                <result-to-result
result-name="contactMechId" service-result-name="contactMechId"/>
                        </call-service>
                <else>
                        <log level="info" message="Updating billContactMech
for contactMechId:${mapIn.contactMechId}"/>
                        <call-service
service-name="updatePartyPostalAddress" in-map-name="mapIn"/>
                        <log level="info" message="Updating billContactMech
complete"/>
                </else>
                </if-empty>
                <check-errors/>
                <field-to-result field-name="billContactMechId"
result-name="billContactMechId"/>

Thanks for your help,

Regards,
--Tushar.

-----Original Message-----
From: Scott Gray [mailto:[hidden email]]
Sent: Tuesday, October 03, 2006 2:14 PM
To: [hidden email]
Subject: Re: Error while updating

How are you updating the contact mech?  Are you using the existing UI or
are you calling the service through some code of your own?


Tushar Abhyankar wrote:

> Hi Scott,
> Thanks for the reply. I verified and found that thru_date in
> partyContactMech table was "null" and I am still getting the error. I
> updated it to a later date manually and still get the same exception.
>
> Regards,
> --Tushar.
>
> -----Original Message-----
> From: Scott Gray [mailto:[hidden email]]
> Sent: Tuesday, October 03, 2006 1:08 PM
> To: [hidden email]
> Subject: Re: Error while updating
>
> Hi Tushar
>
> My first bet would be that the contactMech has expired (thruDate set to
> before now).  For example you will get this error if you expire a
> contact mech then click on Show Old in the party manager and then try
> and edit the contact mech that you just expired.
>
> Regards
> Scott
>
> Tushar Abhyankar wrote:
>  
>> Hi Everybody,
>>
>>  
>>
>>             I am encountering an exception when trying to update the
party
>>    
>
>  
>>  
>>
>>
>>    
>
[file:/C:/dev/ofbizapps/ofbiz/applications/party/script/org/ofbiz/party/cont

>  
>> act/PartyContactMechServices.xml#updatePartyContactMech]]: ; [ERROR:
>>    
> Cannot
>  
>> update specified contact info because it does not correspond to the
>> specified party.]
>>
>>  
>>
>> Although the partyId corresponds to the contactMechId also the
userloginId

>> corresponds to the partyId.
>>
>> Has anyone encountered this error before?
>>
>>  
>>
>> Regards,
>>
>> --Tushar.
>>
>>
>>  
>>    
>
>
>
>  


Reply | Threaded
Open this post in threaded view
|

Re: Error while updating

Scott Gray
Hi Tushar

I get the feeling that the set field below isn't working, I'm not much
with miniLang but try from-field="parameters.partyId" or something like
that.  Also, move the log operation below the set field, that way you
can see if it's working.  If that doesn't work I'm out of ideas.

Regards
Scott

Tushar Abhyankar wrote:
> Scott,
> I am calling a service through own code, the code below is part
> service(simple method) itself.
>
> The Code snippet is:
>
> <log level="info" message="MapIn:${mapIn}"/>
> <set field="mapIn.partyId" from-field="partyId"/>
>  

Reply | Threaded
Open this post in threaded view
|

RE: Error while updating

Tushar Abhyankar
Hello Everyone,

In partyContactMechServices.xml   before  

<filter-list-by-date list-name="partyContactMechs"
to-list-name="validPartyContactMechs"/> statement. I get the log info of

partyContactMechs  as

2006-10-03 18:08:34,515 (http-0.0.0.0-8080-Processor4) [
Log.java:95 :INFO ] The vali
d contact partyContactMech
is:[[GenericEntity:PartyContactMech][allowSolicitation,null()][comments,n
ull()][contactMechId,10510(java.lang.String)][createdStamp,2006-10-03
18:37:34.156(java.sql.Timestam
p)][createdTxStamp,2006-10-03
18:37:33.468(java.sql.Timestamp)][extension,null()][fromDate,2006-10-0
3 18:37:34.156(java.sql.Timestamp)][lastUpdatedStamp,2006-10-03
18:37:34.156(java.sql.Timestamp)][la
stUpdatedTxStamp,2006-10-03
18:37:33.468(java.sql.Timestamp)][monthsWithContactMech,null()][partyId,
10510(java.lang.String)][roleTypeId,null()][thruDate,null()][yearsWithContac
tMech,null()]]


And after the filter statement "validPartyContactMechs" list  is an empty
list in the log statement.

Does someone have any idea on why the list is empty?



-----Original Message-----
From: Scott Gray [mailto:[hidden email]]
Sent: Tuesday, October 03, 2006 3:16 PM
To: [hidden email]
Subject: Re: Error while updating

Hi Tushar

I get the feeling that the set field below isn't working, I'm not much
with miniLang but try from-field="parameters.partyId" or something like
that.  Also, move the log operation below the set field, that way you
can see if it's working.  If that doesn't work I'm out of ideas.

Regards
Scott

Tushar Abhyankar wrote:
> Scott,
> I am calling a service through own code, the code below is part
> service(simple method) itself.
>
> The Code snippet is:
>
> <log level="info" message="MapIn:${mapIn}"/>
> <set field="mapIn.partyId" from-field="partyId"/>
>  


Reply | Threaded
Open this post in threaded view
|

Re: Error while updating

Scott Gray
Ok, problem solved!  Note your server's log time compared to the fromDate of
the contactMech, the contactMech is not yet valid.

Regards
Scott

On 04/10/06, Tushar Abhyankar <[hidden email]> wrote:

>
> Hello Everyone,
>
> In partyContactMechServices.xml   before
>
> <filter-list-by-date list-name="partyContactMechs"
> to-list-name="validPartyContactMechs"/> statement. I get the log info of
>
> partyContactMechs  as
>
> 2006-10-03 18:08:34,515 (http-0.0.0.0-8080-Processor4) [
> Log.java:95 :INFO ] The vali
> d contact partyContactMech
> is:[[GenericEntity:PartyContactMech][allowSolicitation,null()][comments,n
> ull()][contactMechId,10510(java.lang.String)][createdStamp,2006-10-03
> 18:37:34.156(java.sql.Timestam
> p)][createdTxStamp,2006-10-03
> 18:37:33.468(java.sql.Timestamp)][extension,null()][fromDate,2006-10-0
> 3 18:37:34.156(java.sql.Timestamp)][lastUpdatedStamp,2006-10-03
> 18:37:34.156(java.sql.Timestamp)][la
> stUpdatedTxStamp,2006-10-03
> 18:37:33.468(java.sql.Timestamp)][monthsWithContactMech,null()][partyId,
> 10510(java.lang.String
> )][roleTypeId,null()][thruDate,null()][yearsWithContac
> tMech,null()]]
>
>
> And after the filter statement "validPartyContactMechs" list  is an empty
> list in the log statement.
>
> Does someone have any idea on why the list is empty?
>
>
>
> -----Original Message-----
> From: Scott Gray [mailto:[hidden email]]
> Sent: Tuesday, October 03, 2006 3:16 PM
> To: [hidden email]
> Subject: Re: Error while updating
>
> Hi Tushar
>
> I get the feeling that the set field below isn't working, I'm not much
> with miniLang but try from-field="parameters.partyId" or something like
> that.  Also, move the log operation below the set field, that way you
> can see if it's working.  If that doesn't work I'm out of ideas.
>
> Regards
> Scott
>
> Tushar Abhyankar wrote:
> > Scott,
> >       I am calling a service through own code, the code below is part
> > service(simple method) itself.
> >
> > The Code snippet is:
> >
> >               <log level="info" message="MapIn:${mapIn}"/>
> >               <set field="mapIn.partyId" from-field="partyId"/>
> >
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: Error while updating

Tushar Abhyankar
Hi Scott,
           Thanks for the solution, it worked when I changed the fromDate of
contactMech to a previous date.  

Regards,
Tushar
-----Original Message-----
From: Scott Gray [mailto:[hidden email]]
Sent: Wednesday, October 04, 2006 12:51 AM
To: [hidden email]
Subject: Re: Error while updating

Ok, problem solved!  Note your server's log time compared to the fromDate of
the contactMech, the contactMech is not yet valid.

Regards
Scott

On 04/10/06, Tushar Abhyankar <[hidden email]> wrote:

>
> Hello Everyone,
>
> In partyContactMechServices.xml   before
>
> <filter-list-by-date list-name="partyContactMechs"
> to-list-name="validPartyContactMechs"/> statement. I get the log info of
>
> partyContactMechs  as
>
> 2006-10-03 18:08:34,515 (http-0.0.0.0-8080-Processor4) [
> Log.java:95 :INFO ] The vali
> d contact partyContactMech
> is:[[GenericEntity:PartyContactMech][allowSolicitation,null()][comments,n
> ull()][contactMechId,10510(java.lang.String)][createdStamp,2006-10-03
> 18:37:34.156(java.sql.Timestam
> p)][createdTxStamp,2006-10-03
> 18:37:33.468(java.sql.Timestamp)][extension,null()][fromDate,2006-10-0
> 3 18:37:34.156(java.sql.Timestamp)][lastUpdatedStamp,2006-10-03
> 18:37:34.156(java.sql.Timestamp)][la
> stUpdatedTxStamp,2006-10-03
> 18:37:33.468(java.sql.Timestamp)][monthsWithContactMech,null()][partyId,
> 10510(java.lang.String
> )][roleTypeId,null()][thruDate,null()][yearsWithContac
> tMech,null()]]
>
>
> And after the filter statement "validPartyContactMechs" list  is an empty
> list in the log statement.
>
> Does someone have any idea on why the list is empty?
>
>
>
> -----Original Message-----
> From: Scott Gray [mailto:[hidden email]]
> Sent: Tuesday, October 03, 2006 3:16 PM
> To: [hidden email]
> Subject: Re: Error while updating
>
> Hi Tushar
>
> I get the feeling that the set field below isn't working, I'm not much
> with miniLang but try from-field="parameters.partyId" or something like
> that.  Also, move the log operation below the set field, that way you
> can see if it's working.  If that doesn't work I'm out of ideas.
>
> Regards
> Scott
>
> Tushar Abhyankar wrote:
> > Scott,
> >       I am calling a service through own code, the code below is part
> > service(simple method) itself.
> >
> > The Code snippet is:
> >
> >               <log level="info" message="MapIn:${mapIn}"/>
> >               <set field="mapIn.partyId" from-field="partyId"/>
> >
>
>
>


Reply | Threaded
Open this post in threaded view
|

RE: Error while updating

Tushar Abhyankar
In reply to this post by Scott Gray
Hi,
        I investigated further on this problem and found that the timestamp
of the record when fetched is exactly 30 min ahead of the persisted
timeStamp.

 For instance the fetched data for a particular PartyContactMech is
[fromDate,2006-10-05 11:30:18.269(java.sql.Timestamp)]

But the persisted fromDate timestamp in PartyContactMech is
fromDate- 2006-10-05 11:00:18.269+05:30


Log when we fetch PartyContactMech
[GenericEntity:PartyContactMech][allowSolicitation,null()][comments,null()][
contactMechId,10601(java.lang.String)
][createdStamp,2006-10-05
11:30:18.27(java.sql.Timestamp)][createdTxStamp,2006-10-05 11:30:17.503(ja
va.sql.Timestamp)][extension,null()][fromDate,2006-10-05
11:30:18.269(java.sql.Timestamp)][lastUpdat
edStamp,2006-10-05
11:30:18.27(java.sql.Timestamp)][lastUpdatedTxStamp,2006-10-05
11:30:17.503(java.
sql.Timestamp)][monthsWithContactMech,null()][partyId,10600(java.lang.String
)][roleTypeId,null()][th
ruDate,null()][yearsWithContactMech,null()]]  

And the same data of party in partyContactMech Table View is:

partyId- 10600
contactMechId- 10601
fromDate- 2006-10-05 11:00:18.269+05:30
thruDate- <NULL>
lastUpdatedStamp- 2006-10-05 11:00:17.503+05:30
lastUpdatedTxStamp- 2006-10-05 11:00:18.27+05:30
createdStamp- 2006-10-05 11:00:18.27+05:30
createdTxStamp-   2006-10-05 11:00:17.503+05:30

Does anyone have any insight on this?

Thanks in advance,

Regards,
Tushar.



-----Original Message-----
From: Scott Gray [mailto:[hidden email]]
Sent: Wednesday, October 04, 2006 12:51 AM
To: [hidden email]
Subject: Re: Error while updating

Ok, problem solved!  Note your server's log time compared to the fromDate of
the contactMech, the contactMech is not yet valid.

Regards
Scott

On 04/10/06, Tushar Abhyankar <[hidden email]> wrote:

>
> Hello Everyone,
>
> In partyContactMechServices.xml   before
>
> <filter-list-by-date list-name="partyContactMechs"
> to-list-name="validPartyContactMechs"/> statement. I get the log info of
>
> partyContactMechs  as
>
> 2006-10-03 18:08:34,515 (http-0.0.0.0-8080-Processor4) [
> Log.java:95 :INFO ] The vali
> d contact partyContactMech
> is:[[GenericEntity:PartyContactMech][allowSolicitation,null()][comments,n
> ull()][contactMechId,10510(java.lang.String)][createdStamp,2006-10-03
> 18:37:34.156(java.sql.Timestam
> p)][createdTxStamp,2006-10-03
> 18:37:33.468(java.sql.Timestamp)][extension,null()][fromDate,2006-10-0
> 3 18:37:34.156(java.sql.Timestamp)][lastUpdatedStamp,2006-10-03
> 18:37:34.156(java.sql.Timestamp)][la
> stUpdatedTxStamp,2006-10-03
> 18:37:33.468(java.sql.Timestamp)][monthsWithContactMech,null()][partyId,
> 10510(java.lang.String
> )][roleTypeId,null()][thruDate,null()][yearsWithContac
> tMech,null()]]
>
>
> And after the filter statement "validPartyContactMechs" list  is an empty
> list in the log statement.
>
> Does someone have any idea on why the list is empty?
>
>
>
> -----Original Message-----
> From: Scott Gray [mailto:[hidden email]]
> Sent: Tuesday, October 03, 2006 3:16 PM
> To: [hidden email]
> Subject: Re: Error while updating
>
> Hi Tushar
>
> I get the feeling that the set field below isn't working, I'm not much
> with miniLang but try from-field="parameters.partyId" or something like
> that.  Also, move the log operation below the set field, that way you
> can see if it's working.  If that doesn't work I'm out of ideas.
>
> Regards
> Scott
>
> Tushar Abhyankar wrote:
> > Scott,
> >       I am calling a service through own code, the code below is part
> > service(simple method) itself.
> >
> > The Code snippet is:
> >
> >               <log level="info" message="MapIn:${mapIn}"/>
> >               <set field="mapIn.partyId" from-field="partyId"/>
> >
>
>
>