Topink 9.0.4 not generating an update statement, if the object was changed.
I have 2 tables T_Objects and T_Categories.
T_Objects stores images as a BLOB field. T_Categories stores the details of an article category and references the pictogram in T_Objects via a FK.
I have 2 webpages. One which is used to load the pictogram in T_Objects and the other which is used to maintain details of the category in T_Categories. As soon as the image is uploaded and is displayed on the screen, user fills in the category details and saves them.
Each of these operations is performed in a seperate HTTP Request (and consequently seperate UOW). The idea is that the user first uploads an image, checks the image on the screen and the decides to associate it with a category.
The database is Oracle 9i. Driver used is OCI 8. Binary Steam Binding is enabled for BLOB fields. DatabasePlatform is Oracle9Platform.
The descriptors of both the tables use SoftCacheWeakIdentity and the cache size is 100. Both tables use Optimistic Locking based on a version field using TimestampLockingPolicy.
Coming to the problem, if the delay between the upload of the image and saving of the category details is large (say 20 seconds or so) Toplink generates a Update query to update the details in T_Categories. If the delay is smaller than that then Toplink fails to generate an update query even if the object was changed. Upon debugging I find that just before the commit, the BO being committed has all the correct details including the new PK of the uploaded image.
Assuming that the BO pointing to T_Objects may not be in Cache (owing to images of size 200+ KB) I did an explicit read of this object before attempting to save details to T_Categories. Even that does not seem to help.
Any ideas on what is happening here?
Chris. Thanks for your reply. I did not get your point. However these are the steps being done.
Can you please go through the code and check what could be wrong?
Steps
1) createContent(VmTObjectsVO vo) is called to insert into VM_T_OBJECTS.
This internally calls create ( Object obj, UnitOfWork uow, boolean commitChanges )
2) update( VmSubcategoriesVO vo ) is called to update a sub-category details to VM_T_SUBCATEGORIES.
This internally calls save( Object bo, UnitOfWork uow, boolean commitChanges )
In the save method at the time of uow.commitAndResume() no update statement is getting generated.
These core methods are used for almost all tables in the application and all of them work.
It is only in this use case I have a problem.
* Creates a new entry for storing the image/document in VM_T_OBJECTS.
* @param vo the content to be stored.
* @return the sequence assigned to this object.
public Long createContent(VmTObjectsVO vo){
VmTObjectsVO voSaved = null;
Long lnContentId = null;
if(vo != null){
VmTObjectsBO bo = new VmTObjectsBO();
/* copy the properties from the VO to the BO. */
ObjectAssembler.vo2bo((BaseVO)vo, bo);
/* Create the content */
lnContentId = create(bo);
return lnContentId;
* updates a subcategory to VM_T_SUBCATEGORIES
* @param vo VmSubcategoriesVO to update.
* @ return updated VmSubcategoriesVO
public VmSubcategoriesVO update( VmSubcategoriesVO vo ) {
VmSubcategoriesBO boSaved = null;
VmSubcategoriesVO voSaved = null;
VmSubcategoriesBO bo = new VmSubcategoriesBO( );
/* Copy the properties in the VO to the BO */
ObjectAssembler.vo2bo( vo, bo );
/* Save the changed object */
save( bo );
return voSaved;
* Stores the new object in the database and
* returns the primary key identifier with which it was created.
* @param obj The object to be created.
* @param uow Use this unit of work for performing the insert.
* @param commitChanges Should commit changes upon insertion?
* If the client wants to perform the commit operation across several others
* operations, then the value should be set to false.
* @return Primary key of the object created.
public Long create ( Object obj, UnitOfWork uow, boolean commitChanges ) {
Object cacheObj = null;
Long lnSequenceAssigned = null;
if ( obj == null ) {
throw new ObjectNotFoundException( null, null, null, null );
try {
if (uow == null) {
/* create a new unit of work if necesasry */
uow = getUnitOfWork( dbSession );
/* Assign a sequence number */
uow.assignSequenceNumber( obj );
/* Get the descriptor associated with this object */
Descriptor descriptor = uow.getDescriptor(obj);
/* Get the sequence assigned */
lnSequenceAssigned = (Long)descriptor.getObjectBuilder().getBaseValueForField(descriptor.getSequenceNumberField(),obj);
/* Register the object */
uow.registerObject( obj );
if(commitChanges){
/* Commit the changes */
uow.commitAndResume();
} finally {
return lnSequenceAssigned;
* Saves changes to an existing object to the data store.
* Has only been tested for flat-objects. Objects that reference other
* persistent objects have not been tested.
* @param bo The object to be saved.
* @param uow The UnitOfWork to use for saving the object.
* @param commitChanges whether the changes should be committed.
* If the client wants to perform the commit operation across several others
* operations, then the value should be set to false.
public void save( Object bo, UnitOfWork uow, boolean commitChanges ) {
if ( bo == null ){
throw new IllegalArgumentException(
"Object is invalid" );
try {
/* Register the object supposed to be existing */
Object clone = uow.registerExistingObject( bo );
/* This object does not exist */
if ( clone == null ) {
throw new ObjectNotFoundException( "object not found", "dao", bo.getClass().getName(), bo.toString());
/* Copy the properties from the object to the clone, to ensure that
* the intended properties have not been overwritten in the object from
* the cache
ObjectAssembler.copy( bo, clone );
/* Commit the changes. */
if(commitChanges){
uow.commitAndResume();
} finally {
dbSession.release( );
}
Similar Messages
-
OWB won't generate an UPDATE statement
I have a mapping which I am attempting to do a MERGE (UPDATE/INSERT) statement on. The mapping validates, however, when I generate the SQL for the mapping, it does not generated the MERGE statement SQL. It is like the portion of the mapping does not even exist. I went ahead and tried to do a simple UPDATE statement, and the same problem exists...it will not generate the portion of the mapping that I try to do the UPDATE statement on. I can do an insert statement and the code will be generated, but the UPDATE is a problem.
I have the same problem.
I use one source table and one target table (ID filled by a sequence, another column is the unique key)
I want to use the INSERT/UPDATE as loading type, but OWB creates only an INSERT statement (without an update) and no MERGE-statement.
If I use the UPDATE/INSERT as loading type, OWB creates two cursors (update and insert).
What's going wrong?
And why doesn't OWB create a merge-statement??
I've created mappings like this one and that worked fine.
Is it a bug in OWB?
(And when I delete the sequence, still the same (wrong) result)
Regards,
Maurice -
I have the iPhone 5s. I synced it with my Mac and got all the old apps from my old phone. I was not able to update any of the apps on the old phone and they will not update on the new iPhone 5s either! What can I do?
Hey there rmflint,
It sounds like you are wanting to update the Apps that were synced over from your computer to your new iPhone 5s. If you are clicking Updates in the App Store in the bottom right corner, would you mind clarifying what happens when you are trying to update them?
App Store at a glance
http://help.apple.com/iphone/7/#/iph3dfd8c19
Thank you for using Apple Support Communities.
Take care,
Sterling -
i have a laptop mac 3 years old i did not pay the extend warranty plan, so know i can't update the iPhone 5 because thai do not accepted a update for iTunes the new version what i have to do call to apple or make repair
You need to be running Mac OS X 10.6.8 or newer to sync the iPhone 5; this may require buying a Mac OS X 10.6 DVD from the online Apple Store. OS upgrades aren't covered by the warranty.
(77198) -
In IDoc to file example if IDoc has not generated?what might be the problem
In IDoc to file example if IDoc has not generated? what might be the problem? where we can find it?
Hi Sudhakar,
We need to check in sm58 of R/3 system for any errors..and according to the error message we have to fix the problem.
It can fail with many reasons for example error in RFC destination connection etc.
Regards,
Prasanthi. -
I completed updating my iPad2 to ios6. I hv 11 app which need to be updated and these are flagged. But the updating procedures keep looping itself and I was not able to update any of the 11 app.? Why the update procedures keep looping and how to get out of it.
Okay - let's cut to the chase...
If the Menu Bar (File, Edit... Help) shown in my screenshot below is not visible, use CTRL+B to display it. Then click on Help/Check for Updates. If one is available, you will be able to select it at this time.
Note the item at the bottom of the list; About iTunes. Selecting that will show you which version of iTunes you are using.
An alternative method to display the Menu Bar is click on the box in the top left of your iTunes window... -
My macbook pro will not download or update software. The computer restarts without an update. How do I fix this?
Hello, which exact update is this? Which OSX version?
-
WCF Service update UPS. Operation is not valid due to the current state of the object.
I try import custom data to custom user properties from my own wcf service (on sharepoint server machine), but i got
Message "Operation is not valid due to the current state of the object. "
on line
userProfile[PropertyConstants.Department].Value = "SDDDD";
Why i cant modify property value?
SPSecurity.RunWithElevatedPrivileges(delegate()
using (SPSite site = new SPSite("http://portal.local"))
SPServiceContext serviceContext = SPServiceContext.GetContext(site);
using (var web = site.OpenWeb())
Debug.WriteLine(web.CurrentUser); //Here AppPoolAccount user of current wcf service
Debug.WriteLine(WindowsIdentity.GetCurrent().Name); //Here too AppPoolAccount user of current wcf service
UserProfileManager userProfileMgr = new UserProfileManager(serviceContext);
ProfilePropertyManager profilePropMgr = new UserProfileConfigManager(serviceContext).ProfilePropertyManager;
ProfileSubtypePropertyManager subtypePropMgr = profilePropMgr.GetProfileSubtypeProperties("UserProfile");
UserProfile userProfile = userProfileMgr.GetUserProfile(accountName);
userProfile[PropertyConstants.Department].Value = "SDDDD";
userProfile.Commit();
My service running under domain\SPSvcAcc what have full permissions on UPS service, it's management account and UPS admin with full rights.
If i create console app with identical code and run it under SPSvcAcc account it working without problems
What i do wrong?Hi,
pls seee if you can add threading like this below to solve the pbm
https://social.technet.microsoft.com/Forums/office/en-US/b6d6f85c-e12b-4540-a821-690e296b7b56/operation-is-not-valid-due-to-the-current-state-of-the-object-exception-when-activating-a?forum=sharepointdevelopmentprevious
Please remember to click 'Mark as Answer' on the answer if it helps you -
Write an UPdate statement using the logic used in PL/SQL block (oracle 10g)
Hi All,
I have written the following PL/SQL block. I want to write an UPDATE statement using the logic used in the following PL/SQL block. can any one please help me out in this regards.
DECLARE
v_hoov_fag gor_gold_post.hoov_flg%TYPE;
v_b49n gor_gold_post.b49n%TYPE;
CURSOR c
IS
SELECT bs_id, loyalty_date, loyalty_period, contract_date
FROM gor_gold_post
WHERE tariff_code IN (169, 135, 136);
BEGIN
FOR rec IN c
LOOP
IF (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
- SYSDATE) < 304
OR ( TRUNC ( ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
- SYSDATE
) IS NULL
AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2
THEN
v_hoov_flg := 1;
ELSE
v_hoover_flag := 99;
END IF;
IF (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
- SYSDATE) < 121.6
OR ( TRUNC ( ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
- SYSDATE
) IS NULL
AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2
THEN
v_b49n := 1;
ELSE
v_b49n := 99;
END IF;
UPDATE gor_gold_post
SET hoov_flg = v_hoov_flg,
b49n = v_b49n
WHERE bs_id = rec.bs_id AND tariff_code IN (169, 135, 136);
COMMIT;
END LOOP;
END;Thank you,Using case statement.
UPDATE gor_gold_post
SET hoov_flag = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 304
OR
(TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
THEN 1
ELSE 99
END,
b49n = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 121.6
OR
(TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
THEN 1
ELSE 99
END
WHERE tariff_code IN (169, 135, 136);Note: Code not tested. -
How to call UPDATE statements in the timesten
Hi i want to know how can i call UPDATE statements from the c program
as of now i am using SQLPREPARE and SQLEXECUTE for the same.
but i get the following error.
Is there any special way of calling UPDATE and INSERT routines.
As my select statements are doing fine, but i m getting error with UPDATE and INSERT. I am getting the following error
Can Anyone guide me ?
========================================================
[TimesTen][TimesTen 6.0.4 ODBC Driver][TimesTen]TT5102: Cannot load backend library 'libttorD.a' for Cache Connect. OS error message 'Symbol resolution failed
for /disk3/users/timesten/TimesTen/TT_EUDEV10G/lib/libttorD.a because:
Symbol ora_ldap_unbind (number 224) is not exported from dependent
module /disk1/users/oracle/product/9.2.0/lib/libclntsh.a[shr.o].
Symbol ora_ldap_memfree (number 225) is not exported from dependent
module /disk1/users/oracle/product/9.2.0/lib/libclntsh.a[shr.o].
Symbol
*** ODBC Error/Warning = S1000, Additional Error/Warning = 5102
*** (Note: error message was truncated.
Disconnecting from the data source...
==========================================================Hi,
It looks like you are using either :
1. A READONLY CACHE GROUP with PassThrough > 0.
or
2. An SWT CACHE GROUP
Is that correct? This looks like a mismatch between the TT Oracle library and the version of the Oracle client that you have installed (or maybe a bad setting of LD_LIBRARY_PATH).
What is the exact version of TimesTen you are using (output of ttVersion command)?
What is the exact version of Oracle?
Thanks, Chris -
hi,
when i was trying to deploy a SP solution from my vs 2012 solution. this error is displayed.
i tried many things like
1) get the wsp and apply power shell cmds to add and deploy, here also it failed:
Add-SPSolution -LiteralPath d:\mywsp.wsp
Install-SPSolution mywsp.wsp -GacDeployment -AllWebApplications -Local
2) restart the timer services and do iisreset and reboot the server. etc .as mentioned in one of the the below blogs:
http://sharepoint1on1.blogspot.in/2014/04/sharepoint-error-occurred-in-deployment.html
http://suehernandez.wordpress.com/2011/03/31/error-occurred-in-deployment-step-activate-features-operation-is-not-valid-due-to-the-current-state-of-the-object/
http://www.dotnetsharepoint.com/2014/04/error-occurred-in-deployment-step-add.html
http://social.msdn.microsoft.com/Forums/en-US/63adde23-03cf-4b65-923e-1219da94a780/error-occurred-in-deployment-step-add-solution-operation-is-not-valid-due-to-the-current-state-of?forum=sharepointdevelopmentprevious
http://www.shakirmajeed.com/error-occurred-in-deployment-step-activate-features-operation-is-not-valid-due-to-the-current-state-of-the-object/
but even after doing all these steps, the error still persists!. and am not deploying into a remote server, the dev env is in a VM, where sp 2013, vs 2012, sql 2012 are installed.
just wanna share one note: there is a isue in my search admin component. index was reset due to some reason. and from that time onwards my search full/incremental crawls were not working!
will this cause an issue in my wsp deployment ? i hope it wont, still asking...
can anyone help me how to resolve this error.because this is a show stopper for me for the last few days!
help is highly appreciated!This issue cause because of feature activation failure while WSP deployment.
when you create a WSP using visual studio, it creates WSP package with default deployment configuration settings.
Please restrict feature activation configuration, this will help you to troubleshoot this issue.
- Click on Project in WSP and press F4, it will open "Project Properties"
- set "Active deployment Configuration" - as "No Activation"
- you can activate this features in required sequence after deployment using Activate-SPFeature
If my contribution helps you, please click Mark As Answer on that post and Vote as Helpful
Thanks, ShankarSingh(MCP) -
I created a SharePoint 2013 farm solution project in Visual Studio 2013 (running on the same machine where SharePoint 2013 server is running) with
event receiver. I added web.config at project root level to store connection string (I'm working off external SQL DB) and got the following error during deployement:
Error 27
Error occurred in deployment step 'Activate Features': Operation is not valid due to the current state of the object.
When I commented out the ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString; the error went away. Am I missing something or not supposed to add my own App.config to SharePoint project solution?Hi,
From your description, you might want to store your connection string in web.config and there is an error during deployment.
It is recommended to store the configuration data of SharePoint solution in either property bags or hierarchical object store.
The links below will provide more information about this:
http://blogs.msdn.com/b/zwsong/archive/2012/03/27/where-should-you-store-your-sharepoint-solution-s-configuration-data.aspx
http://msdn.microsoft.com/en-us/library/ff647766.aspx
Thanks
Patrick Liang
Forum Support
Please remember to mark the replies as answers if they
help and unmark them if they provide no help. If you have feedback for TechNet
Subscriber Support, contact [email protected]
Patrick Liang
TechNet Community Support -
ADMT 3.2 Group Migration - Include File error: The object was not found in the domain
Hello,
I have been digging for weeks and still no answer. I am trying to migrate Group across two domains and if I select the group, it works just fine. But I want to bulk-migrate groups. So I am going the Include-File route. when ever I load the file I get
the bulk of the groups processed but I get a dialogue box that states:
The following objects are either not found or do not meet selection requirement. No migration will be performed on these objects.
Then I get a list a group and the message states:
The object was not found in the domain "contoso.com"
Does any one know anything about this or how to fix it? I have compared the files with good/bad versions using ADSI edit and from its POV they look the same.Hi,
Thanks for your post.
There is an attribute named "showInAdvancedViewOnly" which specifies whether the object is to be visible in the "Advanced" mode of user interfaces. This is to say, if the schema attribute "ShowInAdvanceViewOnly" is set to TRUE for any security principal
in AD, we would not be able to find that account or group while trying to migrate it except the simple ADUC search. Just as the issue you encountered.
Therefore, please enable the "Advanced" mode in Active Directory Users and Computers, and then check if the three groups could be migrated or not.
If anything unclear or you have any questions about this case, please feel free to let me know.
Thanks and I look forward to your reply.
Best regards,
Ann Zhu -
I have ipod 4 i want to sync the device to my pc through Itunes by the sync selection to my iTunes at PC were disable cause even the device are not appearing on iTunes PC but the iPod was connected to my PC how I can be able to fix this.
Hi there,
If you are experiencing an issues where iTunes is not recognizing your iPod, then I would recommend taking a look at the article below.
iPod: Appears in Windows but not in iTunes
http://support.apple.com/kb/TS1363
-Griff W. -
FAST Search - The object was not found exception.
Hi all - I am getting "The object was not found exception" error for one of my site collection I checked the permissions they are there. Please let
me know how to find more details about error with Item id specified in crawl log.
Also let me know what could be issue for this error. Only one line of error is not helping me to troubleshoot.Hi Satish,
Do you have alternate access mappings configured for your web application or an incorrect IIS binding? Have you seen these posts?
http://sharepoint.stackexchange.com/questions/22844/object-not-found-error-in-search-service-crawl-logs
http://serverfault.com/questions/130663/sharepoint-server-search-not-crawling
Please remember to click Mark as Answer on the answer if it helps you
Maybe you are looking for
-
I'm attempting a clean install of OS X Lion on a 2.8 GHz iMac with 4 GB of RAM. I downloaded Lion from the app store, created a USB installer, and booted from the installer. I initiated the installation after wiping the drive with disk utility. It's
-
I want to donate but not give out my named and address
I want to make a donation, but you are askoing for my name, address etc. I do not hand these out unless there is a direct need (deliveries etc). Can't I just donate? I have a Firefox account and I am signed in. Thanks Nick
-
How to add attribute..
Hello I have a characteristic ZCALMONTH, in which I need to include attribute ZREQDT (request dt) ZCALMONTH is of type NUMC-3 and is a reference of 0CALMONTH. ZREQDT is of type DATS-8, no master data. I am not able to add ZREQDT as attribute of ZCALM
-
Any DVD player software that upscales?
I assume Apple DVD Player does not upscale standard def dvd's Any playback software that will ?
-
Uploading photos from camera memory card are being duplicated
Hi, When loading phoots into iphoto from a memory card we are getting two images of the same photo (same identifier as well) into the iphoto event. I've looked over many previous threads and have unticked the duplicate options in preferences/advanced