cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear the cache of WebService Model or ARC2 Model in the server?

former_member207065
Participant
0 Kudos

I have encountered this problem several times.In WebDynpro,I created a WebService model or ARFC2 model and completed my projects.Then due to some reason the WebService or RFC was changed,for example,the WebService had only one input parameter before but then had two after modification.So I had to reimport the model,by which I had thought I could run my application with new model.But I was wrong,the "Reimport" just updated the model data in my local project,not the runtime model data in the server.Because I always got error saying that some attribute didn't exist when I ran my app.However,after restarting the server,it worked.

The problem I want to ask is that are there any other motheds to clear the runtime model data cached in the server?Must I restart the server once the WS or RFC is modified?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member207065
Participant
0 Kudos

Can anybody help me?

Thanks.

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Abe000

For JCO Models running on NW 7.2 you go to:

1) NWA

2) Availability and Performance Management --> Resource Monitoring

3) JCO Monitoring

4) Metadata Cache

5) Click on clear of the desired cache region.

Cheers,

Ivan

former_member207065
Participant
0 Kudos

Great! Thank you very much.

But how about CE 7.1 Ehp1? There is no "JCo Monitoring" in NWA.

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Abe000,

You are correct, this function has been introduced on NW 7.2.

If you are running on versions lower than 7.2, there is a tool, which was introduced on NW 7.0 SP11, for ARF Metadata Cache Invalidation. Please refer to the following documentation on help@sap:

http://help.sap.com/saphelp_nwce711/helpdata/en/46/a81a68e0933ef0e10000000a1553f7/frameset.htm

or

https://cw.sdn.sap.com/cw/docs/DOC-106336

This procedure has already been explained on this thread, but the above links are the official documentation about this tool for NW 7.11.

The info about WS cache I provided is still valid for any version greater than 7.1x.

BR,

Ivan

junwu
Active Contributor
0 Kudos

are you sure that page can be used to clear ws meta cache?

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi John,

I posted information about clearing WS Metadata Cache a while ago. Please read through this thread () to find the related notes you should apply to your system in order to clear this type of cache.

There are different tools to clear ARF Metadata Cache. In NW 7.2 you have a special tool in NWA explained on this thread also.

On NW greater than 7.0 SP11 and lower than NW 7.11 you need to do it via Invalidation Tool available on Webdynpro Console App.

Cheers,

Ivan

former_member207065
Participant
0 Kudos

In CE 7.1 Ehp1, I always get nothing when I click "Get JCO Destinations" in Web Dynpro Console.Why?

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

This usually happens if you have configured Netweaver not to cache metadata for JCO Destinations.

Have you checked that? If already checked, please open an OSS message for SAP Support to investigate it.

Be aware that this functionality doesn't work for Web Services as well. It will show just JCO Metadata Caches.

There are no tools currently available for displaying Web Services Metadata Caches. You can only disable it on development systems to make sure you have consistent ws calls.

BR,

Ivan

former_member207065
Participant
0 Kudos

Thank you.But I don't know where to to check if I have configured Netweaver not to cache metadata for JCO Destinations.

Can you tell me?

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Abe000,

If you do not get a JCO Destination Name on Webdynpro Console, then you won't be able to set it to non-cacheable.

If this is the case, than I can only think of the following possibilities:

1) The JEE runtime you are accessing is actually not the runtime where your webdynpros are running

2) You don't have a JCO Destination created for your Dynpros or the application has not used a JCO Connection yet.

3) You have something wrong with the product that support needs to analyze.

A1) Check again if the machine you are accessing is really running the dynpros for which you should be seeing JCO Destinations. Once you are able to see the JCO Destinations after clicking the "Get JCO Destinations", then you should see a "Don't Cache!" check box right beside it. When this is enabled, the system will never cache enything for that particular destination. If this is the case, than you won't get any Metadata Caches when clicking "Get Dictionaries...".

A2) You can check within the Webdynpro Content Administrator if your dynpro has a JCO Destination Created (green light). Of course, if your app is not listed there, then you have the wrong machine.

A3) If even after all these checks you don't have a JCO Destination listed, please check the Default Trace files for error messages. If none are related to your problem than please open an OSS message. I'm sure the support guys will be more the happy to help you fix that issue.

BR,

Ivan

former_member207065
Participant
0 Kudos

Thank you very much.

We don't create and use JCo destinations in Web Dynpro Content Administrator and all the status are red in it.We create and use destinations in NWA->SOA Management->Technichal Configuration->Destinations.Actually Web Dynpro Content Administrator is deprecated because ARFC is replaced by ARFC2. So we never used it.

By the way,where can I open an OSS message?

Edited by: abe000 on Nov 30, 2010 9:28 AM

Amey-Mogare
Contributor
0 Kudos

You can open OSS message in http://www.service.sap.com/support

You will need SAP Marketplace ID to login and report a product error to SAP.

Thanks and regards,

Amey

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Abe000,

You are correct. Sorry for the misleading information on ARFC/ARFC2 for 7.11.

For NW 7.11 there is currently no way of clearing the cache for ARFC2 via UI.

You need to perform a programmatic call to the JCO API in order to clear the cache.

For more information, please take a look at the following note:

https://service.sap.com/sap/support/notes/1479970

There is a workaround, but I wouldn't recommend it because it takes too much effort and manual steps in order to work properly - but you may give it a try.

Open the <ModelName>.java file on your project and change the IMPORT_TIME_STAMP attribute for this <ModelName> class and deploy the DC once more. When you increase this value you are telling the runtime that the model metadata it is running is outdated, so it will perform an automatic clearing of the cache area. You may also try to increase this value before re-importing the model which is would have the same effect.

If the workaround doesn't work as expected there is no other way other than restarting the Java instance.

You may consider upgrading 7.11 to 7.2 or wait for 7.3 GA because these systems will provide many more features and performance benefits with added stability. If you are running NW solely for WD4J the migration should be a breeze.

Be aware that the information available on note 1479970 is valid for a single Java Node. In order to clear the metadata caches across all server nodes, you need to manually perform the API calls on each server node via URL parameter sap-nodeid. For more information on calling a particular server node instance via URL take a look at the following note:

https://service.sap.com/sap/support/notes/1440724

Enjoy!

Ivan

olivier_thiry
Participant
0 Kudos

For lazy people like me, here is the code for 7.11 :

JCoDestination destination = JCoDestinationManager.getDestination(<DESTINATION>);

JCoRepository repository = destination.getRepository();

repository.clear();

I tried, and it works fine, thank you

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Olivier,

That's exactly what is written on note 1479970 for which I provided a link to on my last post.

But thanks for sharing that piece of code on SCN.

BR,

Ivan

Answers (4)

Answers (4)

Former Member
0 Kudos

for CE 7.2 read SAP Note 1521040 - Configuration changes are not reflected in subsequent calls

Best Regards,

Marco

former_member207065
Participant
0 Kudos

When I clicked "Get JCO Destinations" in Web Dynpro Console,nothing appeared.And We are using CE 7.2 SP03.How to make JCO Destinations appear in CE?

Former Member
0 Kudos

Hi,

You can clear the metadata cache available in System Administration part of Enterprise Portal to resolve.

Regards

Saravanan K

Former Member
0 Kudos

Hi,

You can achieve this either by re-starting the server or by clearing the metadata cache through System Administration from portal.

Check this [link|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10465350-b4f5-2910-61ba-a58282b3b6df?quicklink=index&overridelayout=true]. But its always best to re-start the server.

Regards,

Manoj

Edited by: Manoj on Oct 27, 2010 3:46 PM