How to handle "The specified resource does not exist" exception while using entity group transactions to purge WADLogs table
Hi,
We have a requirement to purge the Azure WADLogs table on a periodic basis. We are achieving this by using Entity group transactions to delete the
records older than 15 days. The logic is like this.
bool recordDoesNotExistExceptionOccured = false;
CloudTable wadLogsTable = tableClient.GetTableReference(WADLogsTableName);
partitionKey = "0" + DateTime.UtcNow.AddDays(noOfDays).Ticks;
TableQuery<WadLogsEntity> buildQuery = new TableQuery<WadLogsEntity>().Where(
TableQuery.GenerateFilterCondition("PartitionKey",
QueryComparisons.LessThanOrEqual, partitionKey));
while (!recordDoesNotExistExceptionOccured)
IEnumerable<WadLogsEntity> result = wadLogsTable.ExecuteQuery(buildQuery).Take(1000);
//// Batch entity delete.
if (result != null && result.Count() > 0)
Dictionary<string, TableBatchOperation> batches = new Dictionary<string, TableBatchOperation>();
foreach (var entity in result)
TableOperation tableOperation = TableOperation.Delete(entity);
if (!batches.ContainsKey(entity.PartitionKey))
batches.Add(entity.PartitionKey, new TableBatchOperation());
// A Batch Operation allows a maximum 100 entities in the batch which must share the same PartitionKey.
if (batches[entity.PartitionKey].Count < 100)
batches[entity.PartitionKey].Add(tableOperation);
// Execute batches.
foreach (var batch in batches.Values)
try
await wadLogsTable.ExecuteBatchAsync(batch);
catch (Exception exception)
// Log exception here.
// Set flag.
if (exception.Message.Contains(ResourceDoesNotExist))
recordDoesNotExistExceptionOccured = true;
break;
else
break;
My questions are:
Is this an efficient way to purge the WADLogs table? If not, what can make this better?
Is this the correct way to handle the "Specified resource does not exist exception"? If not, how can I make this better?
Would this logic fail in any particular case?
How would this approach change if this code is in a worker which has multiple instances deployed?
I have come up with this code by referencing the solution given
here by Keith Murray.
Hi Nikhil,
Thanks for your posting!
I tested your and Keith's code on my side, every thing worked fine. And when result is null or "result.count()<0", the While() loop is break. I found you code had some logic to handle the error "ResourceDoesNotExist" .
It seems that the code worked fine. If you always occurred this error, I suggest you could debug your code and find which line of code throw the exception.
>> Is this an efficient way to purge the WADLogs table? If not, what can make this better?
Base on my experience, we could use code (like the above logic code) and using the third party tool to delete the entities manually. In my opinion, I think the code is every efficient, it could be auto-run and save our workload.
>>Is this the correct way to handle the "Specified resource does not exist exception"? If not, how can I make this better?
In you code, you used the "recordDoesNotExistExceptionOccured " as a flag to check whether the entity is null. It is a good choice. I had tried to deleted the log table entities, but I used the flag to check the result number.
For example, I planed the query result count is 100, if the number is lower than 100, I will set the flag as false, and break the while loop.
>>Would this logic fail in any particular case?
I think it shouldn't fail. But if the result is "0", your while loop will always run. It will never stop. I think you could add "recordDoesNotExistExceptionOccured
= true;" into your "else" block.
>>How would this approach change if this code is in a worker which has multiple instances deployed?
You don't change anything expect the "else" block. It would work fine on the worker role.
If any question about this issue, please let me know free.
Regards,
Will
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
Azure Rest API PUT Block Blob Returns "The specified resource does not exist" CORS
I am trying to upload a file to Azure Blob storage. For some reason when I try to put a new block blob on in the storage it tells me the resource does not exist. I am sure it is something silly I am missing.
According to the documentation:
The Put Blob operation creates a new block blob or page blob, or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List (REST API) operation.
CORS is setup and that seems okay.
When I do a preflight and get this:
Request URL:https://<account>.blob.core.windows.net/test/image.png
Request Method:OPTIONS
Status Code:200 OK
Request Headers
OPTIONS /test/image.png HTTP/1.1
Host: <account>.blob.core.windows.net
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Request-Method: PUT
Origin: http://www.<site>.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
Access-Control-Request-Headers: accept, content-type
Accept: */*
Referer: http://www.<site>.com/azure/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Response Headers
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 0d372e95-1524-460a-ab9c-7973d42a7070
Access-Control-Allow-Origin: http://www.<site>.com
Access-Control-Allow-Methods: PUT
Access-Control-Allow-Headers: accept, content-type
Access-Control-Max-Age: 36000
Access-Control-Allow-Credentials: true
Date: Thu, 27 Feb 2014 22:43:52 GMT
But when I make the PUT request these are the results.
Request URL:https://<account>.blob.core.windows.net/test/image.png
Request Method:PUT
Status Code:404 The specified resource does not exist.
Request Headers
PUT /test/image.png HTTP/1.1
Host: <account>.blob.core.windows.net
Connection: keep-alive
Content-Length: 22787
Cache-Control: no-cache
Pragma: no-cache
x-ms-blob-content-dis; filename = "image.png"
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
Content-Type: image/png
x-ms-blob-type: BlockBlob
Accept: application/json, text/plain, */*
x-ms-version: 2013-08-15
Origin: http://www.<site>.com
x-ms-date: Thu, 27 Feb 2014 23:19:19 GMT
Referer: http://www.<site>.com/azure/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Response Headers
HTTP/1.1 404 The specified resource does not exist.
Content-Length: 223
Content-Type: application/xml
Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: d5a60c8b-356a-44ff-93af-0ea720b5591f
x-ms-version: 2013-08-15
Access-Control-Expose-Headers: x-ms-request-id,Server
Access-Control-Allow-Origin: http://www.<site>.com
Access-Control-Allow-Credentials: true
Date: Thu, 27 Feb 2014 23:22:42 GMTYour request must be authenticated to be able to upload a blob. Please see our
Windows Azure Storage: Introducing CORS blog post for more information on using Shared Access Signatures with CORS. -
The requested resource does not exist - EAR - Jsp
Hy!
Following a tutorial I'm trying to create a small application in the Developer Studio.
I created a Table, an EJB-Project with an Entity Bean and a Stateless Session Bean, a Web-Project with a JSP-File and an EAR which I deployed. Now the JSP form should be available at http://[server-name]:50000/employee/view.
But I get:
404 Not Found - SAP J2EE Engine/6.40
The requested resource does not exist.
Details: Go to main page of this application!
"main page" is a link which refers to http://localhost:50000/index.html which is the SAP Engine Start Page.
This is my first experience with sap netweaver. So I don't know where I should start to search for the problem or how to solve it.
In the web.xml of the WebProject there is the following code for the servlet mapping:
<servlet>
<servlet-name>NewEmployee.jsp</servlet-name>
<jsp-file>/NewEmployee.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>NewEmployee.jsp</servlet-name>
<url-pattern>/view</url-pattern>
</servlet-mapping>
This is the code in the application.xml of the ear which should make it possible to access the webproject under .../employee.
<module>
<web>
<web-uri>EmployeeWeb.war</web-uri>
<context-root>employee</context-root>
</web>
</module>
Best Regards,
CarinaHy!
I tried several changes and found out, I just had to remove the ' / ' bevor NewEmployee.jsp in the jsp-file - tag.
<servlet>
<servlet-name>NewEmployee.jsp</servlet-name>
<jsp-file>NewEmployee.jsp</jsp-file>
</servlet>
Now it works and I'm able to test the jsp. There's a form and after a submit a jndi-lookup is performed.
Object ref=jndiContext.lookup("java:comp/ev/ejb/EmployeeService");
It seems the EJB reference in the web.xml:
<ejb-ref>
<ejb-ref-name>ejb/EmployeeService</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.sap.bsp.EmployeeServicesHome</home>
<remote>com.sap.bsp.EmployeeServices</remote>
<ejb-link>EmployeeEjb.jar#EmployeeServicesBean</ejb-link>
</ejb-ref>
doesn't work, because I get:
com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at java:comp, the whole lookup name is java:comp/ev/ejb/EmployeeService.
Looking forward to a hint
Best regards,
Carina -
The specified screen does not exist in the DLIB file
Dear Experts,
I have copied the program of VA01 to Zprogram and created ztransaction when I execute ztransaction it will goto first screen, after I type input and click enter I will get below message
Screen zsapmv45a 4470 does not exist
when I check help (F1) it says as follows
Diagnosis
The specified screen does not exist in the DLIB file.
Procedure
Specify the programm and the screen number correctly.
If you want to generate a list of existing screens, select the program
and screen number on the Screen Painter selection screen. In the case of
the screen number, you can only enter a * in the first position.
can anyone tell me that how to maintian screen in DLIB file?
Thanks in Advance...
VenkateshDo you have such a screen number under the function group where you have copied the transaction VA01?
If not chek in standard func group for this screen and copy it. -
Error :-The requested resource does not exist while opening the adobe form
hello Experts,
We are in Portal implementation face with ECC6 EHP4 and Portal EHP1
We have developed adobe form using HCM forms and processes and done the required configuration in SPRO
When we are trying to open the form from ESS we are getting below error
404 not found
The requested resource does not exist.
Please look into this issue and let us know any thing we are missing
Sincerely
Pareshis ADS working correctly?
1. Use transaction SA38 to execute the program FP_TEST_00.
Detailed information about this test program and about how you
should then proceed is given in the Adobe Document Services
Configuration Guide in the Help Portal under:
http://help.sap.com/saphelp_nw2004s/helpdata/en/37/504b8cbc2848a4
94facfdc09a359b1/frameset.htm -> Adobe Document Services
Configuration Guide -> Configuring the Web Service -> Securing
Access to the Web Service ->Configuration Check -> Configuration
Check for PDF-Based Forms in ABAP
- If the FP_TEST_00 form is displayed in the print preview, the
ADS configuration is correct.
-> If you use scenarios with an interactive PDF, proceed with
point 5. Otherwise, proceed with the test under point 6.
- If the system displays an error message instead of a form, the
configuration of ADS is incorrect.
-> Carry out the additional tests from point 2 onwards.
2. Use transaction SA38 to execute the program FP_PDF_TEST_00.
This enables you to check the RFC connection to ADS (see the
reference to the documentation given above).
- If the system displays the version number of ADS, the
configuration of the RFC connection is correct.
read the note 944221
Please paste the whole error? Is any dump in ST22 -
The Specified Directory Does not Exist
Hi expert
could you help me with my problem , this word " The Specified Directory Does Not Exist" its some stupid question , isn't it ?
this is my sitiuation :
1. BPC version is SAP BPC 5.0.512
2. we are using MS Excel 2003
our user do some modification from BPC WEB (the BPC open excel file with many macro and add-in etc ... ), then user save using Save Dynamic Template sub menu from eTools menu , and raise message "The Specified Directory Does not Exist < directory path>/eEXCEL. "
the questions Are .
1. Could anyone explain why BPC try to save in Client Local Direcory not is BPC Server
2. Could anyone help me how to resolve the problem ?
(i am appolagize with my bad english )
thanks.HI nvsleman ,
I had the same problem and I manually copied the eExcel folder (on my local harddrive) from a working application to the application in question.
Hope this helps
Sabine -
GCWebservice not found (The requested resource does not exist)
Dear expert,
According to the following link, there is a standard web service allowing the update of xml file into portal :
http://help.sap.com/saphelp_banking60/helpdata/de/45/485c1a5b875b3ee10000000a1553f6/frameset.htm
The problem is that I get the message " The requested resource does not exist." when I launch the URL http://<server>:<port>/GCWebservice/Config1?wsdl (where <server> and <port> are the server and port number for my portal).
Please do you know how to assist on this topic ? do you know how we can access to the GCWebservice and eventually download it to the portal ?
Thanks and regardsHi all ,
Thanks for the replies .
Shravan ,
I pinged my XI and is working . we have already added
the IP Address and the host name , but the same error
is coming .
Anirban,
Checked all the necessary services again as suggested
by you .
Andreas ,
> is to set the abap profile parameter
LOCALHOSTFULL to the fqhn.
Can you please let me know where to set the abap
profile parameter "LOCALHOSTFULL" as suggested by you .
Thanks
Shikha -
The requested resource does not exist
Hello!
I have a programm, made in Visual Stuio2005(.NET). I installed the PDK for .NET and now i get this failure massage:
The requested resource does not exist.
Any ideas?Hi Guntram,
Change link's url to some static url, like www.google.com and see if it works. If yes,
then the problem caused by wrong url. Anyway, if you want to navigate between iViews
developed in PDK for .NET I would suggest you to read this documentation:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/go/km/docs/library/dotnet/pdk%20for%20.net/developer's%20Guide%20PDK%202.0%20for%20.NET/index.html">PDK 2.0 for .NET Development Guide</a>:
1. Tutorials -> Tutorial 8: Implementing Object-Based Navigation
2. Tutorials -> Tutorial 7:Client-Side Events and How to -> Portal Client-Side Events
3. How to -> Portal Server-Side Events
and in <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/developerareas/dotnet?rid=/lw/uuid/95628888-0d01-0010-7d97-f0d771999d0f">pdk 2.5 for .NET Development Guide</a>:
1. How to -> Using the TabStrip Control ( TabStrip is available in PDK 2.0 too, but without the documentation ).
Regards,
Rima. -
CRM Upgrade from 7.0 to EhP1 Error - The requested resource does not exist
Hello All,
We have recently upgrade our pilot system in CRM from CRM 7.0 to Ehp1. The upgrade was successful.
However, when I login into the WebUI, I get an error message as follows:
404 Not Found
The requested resource does not exist
Details: Go to main page of this application
I got in touch with the Basis team and tried to activate some services through SICF that were deactivated because of the upgrade. But we still encounter the above error everytime I tried logging into WebUI.
I kindly request to provide some pointers towards the resolution of the same.
Thanks and regards,
VSK.Hi,
please try to activate all SICF services under sap->bc->bsp.
If needed deactivate them and activate afterwards again to be sure all services are active.
Good luck
Kind regards
Manfred -
404 Not Found, the requested resource does not exist
Hi gurus,
We're faciing an issue where when we submit data back to the SRM shopping cart from the MDM catalog UI, we intermittently get a "404 Not Found, the request resource does not exist" error page.
Below is the HTTP trace upon item checkout:
POST 200 text/html; charset=UTF-8 https://server/webdynpro/dispatcher/sap.com/tcmdmsrmcat~uisearch/MDM_SRM_UI_App?sap-wd-cltwndid=0cf753a3797111dfa7c662676002500a&sap-wd-appwndid=0cf753a4797111df966b62676002500a&sap-wd-norefresh=X
GET (Cache) application/x-javascript https://server/webdynpro/resources/sap.com/tcwddispwda/global/SSR/js/autorelax.js?7.0103.20091012142306
GET 404 text/html https://server/webdynpro/resources/sap.com/tcmdmsrmcat~uisearch/Components/com.sap.mdm.srmcat.uisearch.master.Master/ProductForm30703.html
GET (Cache) text/html https://server/webdynpro/resources/sap.com/tcwddispwda/global/SSR/html/blank.html?7.0103.20091012142306
GET (Cache) application/x-javascript https://server/webdynpro/resources/sap.com/tcwddispwda/global/SSR/js/autorelax.js
GET (Cache) text/html https://server/webdynpro/resources/sap.com/tcwddispwda/global/SSR/html/backprevention.html
GET (Cache) text/html https://server/webdynpro/resources/sap.com/tcwddispwda/global/SSR/html/backdummy.html
GET (Cache) application/x-javascript https://server/webdynpro/resources/sap.com/tcwddispwda/global/SSR/js/autorelax.js
The page https://server/webdynpro/resources/sap.com/tcmdmsrmcat~uisearch/Components/com.sap.mdm.srmcat.uisearch.master.Master/ProductForm30703.html is where the 404 error is being generated. And this error is also intermittent, so some time, the page will load with GET 200, but other times, it will show GET 404.
Does anyone know what this ProductForm#####.html does? The ##### is a numerical value that seems to be incrementing on every catalog submission back to SRM shopping cart.
MDM build 03.69
Thanks.Sudhanshu appreciate your quick responses and the intermittent error is what's troubling me as well.
Let me run through the SRM SC scenario for example:
1. In shopping cart professional > Add Item > SRMMDM Catalog
2. In the SRM-MDM catalog > Add an item to cart > Checkout
3. After checkout, is where the intermittent error comes. Sometimes, the ProductForm.html is generated without a problem, and the product data is returned to the SRM SC in line 1.
4. When we're back in the SRM SC professional > Add Item > SRMMDM Catalog to punchout to the catalog again.
5. Again, in the SRM-MDM catalog > Add an item to cart > Checkout
6. Boom...the ProductForm.html page generates a 404 error.
The scenario is similar from SUS to MDM, where for example, the first (or second or third) MDM punch out works, then all of a sudden, the 404 error is generated and it's always at the ProductForm.html where the 404 code is given. I have yet to find a pattern to see what triggers this 404 error. Sometimes the first MDM punchout will generate this 404 error. Sometimes it will work up to 4 or 5 punchouts before the 404 error is generated.
I'm have our BASIS team do a thorough analysis at the portal level to look for errors and still waiting for SAP's response.
Another interesting thing is that this ONLY happens in our dev box. In our QA box, we don't see such a behavior.
Thanks for your time! -
Web Dynpro image not found: The requested resource does not exist
Hi everybody,
I'm experiencing a strange Poltergeist, so I would like to cry out the issue and hope any kind sould could help me
In my WebDynpro application, I show a JPG picture which is located in the own project, that means in "src/mimes/Components/metromadrid.net.formacion.Cursos". The image appears correctly in my Development environment, but when the activity is moved to the Consolidation System (I'm using JDI), the image doesn't appear. If I try to access it directly, via URL, the messagen shown is "404 Not found: The requested resource does not exist.." (the URL accessed is http://hostname:port/webdynpro/resources/metromadrid.es/formacionapp/Components/metromadrid.net.formacion.Cursos/foto_vacia.jpg)
The point is that in the same Consolidation environment I have already some applications with images, which are found and loaded without any problem.
I have checked if the image appears in the corresponding active repository and everything seems alright (I mean I can see the file there).
Any idea? It would be really appreciated, since my time to solve the problem expires in few days...
Thank you very much in advance!!
Isidro LopezHi Isidro,
your mime files were most probably not added to your NWDI activities when developing your Web Dynpro DC. This means when adding these mime files to the src/mimes/<comp package>.<Comp name> folder the Web Dynpro Tools have most probably not detected the new mime files. When testing your application on in your local development environment all images appear as they exist on your local file system. As missing mimes do not cause a CBS build failure you won't encounter a designtime error.
Please check whether the corresponding mimes are listed as 'local only' (house symbol) in your DTR perspective. In case they are listed as 'local only' you must explicitly add them to an activity.
I have also encountered this missing mime problem before but I have not started any investigation to really determine the reason for it.
Best regards, Bertram -
Need urgent help :'The requested resource does not exist error'
Hi All,
I am getting 'The requested resource does not exist error' when trying to acess http://machinename:50000/irj
Even when i access http://machinename:50000, i get the same 'The root directory does not exist' error. I checked in visual admin, there is no other application deployed except my application.
Any clues? Pls help
thanks
bhawnaHI ,
Did succeed to solve your problem. I am running into same problem.
Any help is welcome.
Thank u very much. -
Please get the web site designers to fix this forum. There is no Z30 "place" and there is an error message that shows up every time.
The specified template does not exist or is emptyMake sure the SharePoint Server is joined to Active Directory. Also validate that the Web Application Application Pool account is running as a Domain User (rather than say Network Service).
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Alert Configuration : 404 Not Found The requested resource does not exist
Hi all ,
We are facing problem in Alert configuration and
Alert Inbox . We are on SP14 service patch
We are getting error as " 404 Not Found The requested
resource does not exist "
We have activated all the necessary services in
Tcode : SICF as mentioned in the config. guide
We have executed the program :
SXMB_ACTIVATE_ICF_SERVICES
We have referred the SAP note : 750287 and tried to
set the httpport as per the note but again we are
getting error as "The page cannot be displayed" .
We have checked the parameters in Exchange profile
for httpport as well as for host also .
Can someone please guide us on this .
Thanks
ShikhaHi all ,
Thanks for the replies .
Shravan ,
I pinged my XI and is working . we have already added
the IP Address and the host name , but the same error
is coming .
Anirban,
Checked all the necessary services again as suggested
by you .
Andreas ,
> is to set the abap profile parameter
LOCALHOSTFULL to the fqhn.
Can you please let me know where to set the abap
profile parameter "LOCALHOSTFULL" as suggested by you .
Thanks
Shikha -
404 Not Found, Error: The requested resource does not exist.
Hi all,
When I try to access VC with the http://localhost:50400/vc where 04 is the CE1 instance, it returns the following error:
404 Not Found
Error: The requested resource does not exist.
Any clues. Just to add that the CE1 servers are running green and nwa is accessible on same url.
Regards.Hi
Try with following link (VC should be in Caps) -
http://localhost:50400/VC/default.jsp
Also check whether you have proper admin roles assigned to your user id.
Regards
Sandeep
Edited by: Sandeep Patki on Sep 16, 2009 8:47 AM
Maybe you are looking for
-
I am trying to use imessage on my macbook air, when I try to open it up nothing happens
Hi. I am attempting to open messages on my macbook air. When I click on the icon, or double click and try to open it up. Nothing happens. Thank you
-
What do I need to fully connect iPhone 5 to Mini Cooper Connect?
I was told by the Mini dealership that my 2013 Mini is not compatable with my iPhone 5. What do I need to fully connect the two?
-
Dynamic HTML elements with JSP?
I need to have a row in a HTML page which contains of a combox and two text fields. Depending on what I select in the combox I have to insert another row (which contains another combox and two text fields) or I have to remove one or both text fields
-
Interesting thing about RDMBSRealm
Hi. I'm using the RDBMSRealm example and I have a question for gurus. I have two entries in my ACLENTRIES table: 1 - weblogic.servlet.AdminMain=paul 2 - weblogic.servlet.AdminMain=mike In properties file I have the next sentence: weblogic.allow.execu
-
Dforum - 500 internal server error
i have deployed the forum portlet in oracle portal... i made all the steps required and i added the portlet to a page ..... when i view the page the forum portlet returns to me an internal server error 500 .... if anyone can help me ..pls do thanx..