Deleting directory contents

Hi All.
I have an application which read the contents of a directory and deletes the files in them. If the directory has subdirectories, i need to enter the subdirectory and delete the files in there too. however, I do not want to delete the directory itself after it has been emptied.
I have tried calling a recursive delete method but I can't get it to work completely. It deletes most of the files but it does not delete some of them as it looks for them in the wrong directory. I have posted the method below.
any help will be appreciated. Thanks.
public void emptyContents(String cmf_dir_path){
System.out.println("entering "+cmf_dir_path);
File cmf_dir = new File(cmf_dir_path);
File[] cmf_contents = cmf_dir.listFiles();
for(int i=0;i<cmf_contents.length;i++){
boolean delval = false;
File the_file = (File)cmf_contents;
if(!the_file.getName().endsWith(".log")&&
the_file.exists()){
delval = the_file.delete();
if(delval){
System.out.println("this file was deleted");
if((!delval) &&(!the_file.getName().endsWith
(".log"))){
if(the_file.isDirectory()){
emptyContents(the_file.getAbsolutePath());
else{
System.out.println("could not delete this
file");

Hi,
I have modified your method to suit your requirements.. i.e. It deletes all the files except the .log files from the directory and also from its subdirectories.. but it will not delete the directories..
Hope this helps..
look like this [ i ] is for Italic.. So I gave a space in between.. check for that..
This is the modified method..
public void emptyContents(String cmf_dir_path){
System.out.println("entering "+cmf_dir_path);
File cmf_dir = new File(cmf_dir_path);
File[] cmf_contents = cmf_dir.listFiles();
for(int i=0;i<cmf_contents.length;i++){
// boolean delval = false;
// File the_file = (File)cmf_contents;
if(!cmf_contents[ i ].getName().endsWith(".log")&&cmf_contents[ i ].exists()){
if(cmf_contents[ i ].isDirectory()){
System.out.println( cmf_contents[ i ].getName() +" is Directory");
emptyContents(cmf_contents[ i ].getAbsolutePath());
else{
boolean delval = cmf_contents[ i ].delete();
System.out.println( cmf_contents[ i ].getName() +" is File");
if(delval){
System.out.println("this file was deleted");
} // end of if not .log file
else {
System.out.println( cmf_contents[ i ].getName()+" is a log File");
}//end of for.
} // end of emptyContents()

Similar Messages

  • Deleting directory and its contents recursively

    File clearDir = new File(dirname);
    String farr [] = clearDir.list();
    for(int i = 0 ; i<farr.length; i++){
    new File(farr).delete();
    new File(dirname).delete();
    above code only deletes directory files and directory.
    say if the there are some other directories inside,how to handle it to delete them also??

    better version with stack implementation. (not a recursive function)
    public void deleteDir(File dir){
       Stack<File> dirStack = new Stack<File>();
       dirStack.push(dir);
       boolean containsSubFolder;
       while(!dirStack.isEmpty()){
          File currDir = dirStack.peek();
          containsSubFolder = false;
          String[] fileArray = currDir.list();
          for(int i=0; i<fileArray.length; i++){
             String fileName = currDir.getAbsolutePath() + File.separator + fileArray;
    File file = new File(fileName);
    if(file.isDirectory){
    dirStack.push(file);
    containsSubFolder = true;
    }else{
    file.delete(); //delete file
    if(!containsSubFolder){
    dirStack.pop(); //remove curr dir from stack
    currDir.delete(); //delete curr dir

  • Can I safely delete the contents of Content.IE5?

    I'm running MacOS 10.6.8 (Snow Leopard) and using Bootcamp 3 (I think) so run Windows XP SP3. My Bootcamp drive is formatted in FAT32, There is a hidden folder in Windows called Content.IE5 where, as I understand it, Internet Explorer stores all of its temporary files. My folder has grown to over 700 MB, and it doesn't get any smaller when I click on the delete temporary files button in IE.
    The folder itself is invisible in Windows, but I can see it when I navigate through the Bootcamp drive in Mac OS.
    I found two links regarding this problem, one from Microsoft
    http://support.microsoft.com/?scid=kb;en-us;301057
    http://www.paessler.com/blog/2009/04/17/prtg-7/how-to-get-rid-of-huge-default-us erlocal-settingstemporary-internet-filescontentie5-folders
    As the second link explains, there are severral issues that make it quite difficult to clear the contents of this directory, such as the fact that it belonds to the "default user" and the fact that it is always in use. But as a Mac user running Bootcamp, I have the ability to navigate directly to the directory while running Mac OS and delete the contents manually which otherwise is not possible when running in Windows! My question to the community is should I do it? Or rather, has anyone else attempted this, and if so, did you brake anything in Windows or did it all turn out honky dorey?
    Many thanks.

    Thanks. The clip in the events folder is in Apple Intermediate Codec.
    A clip from the same video in the Original Movies folder is also in Apple Intermediate Codec but with larger pixel dimensions. I'm assuming this isn't H.264 as you mentioned should be there? See attached images.
    The original movie is shot in 1080p AVCHD. But when I imported it into iMovie I did so at the iMovie optimised 920 x 540px as most movies I edit will only ever appear online for the moment (I do archive original HD footage from important footage to the iMovie Camera Archives for future use).

  • BUG: Import Java Sources, can delete file contents.

    When I was recreating my project files because I had a problem with migrating from Preview 2. I went to import all my source into the new project... via File > Import > Java Sources... This is when I realized I setup the path wrong for the project I had c:\projects\application\projectname\projectname\src for the source where it was suppose to be c:\projects\application\projectname\src.
    Anyway instead of recreating again I just changed the Copy to 'c:\projects\application\projectname\src' and I set the copy from to the same exact directory 'c:\projects\application\projectname\projectname\src', then clicked ok to import.
    Well 10minutes later after adding the rest of the stuff I need and fixing the directory paths I realized all the source files were there but the contents were deleted!
    Wasn't a big deal for me because I backup my files and I just right clicked on the source folder in vista and restored the previous versions (what a handy feature)... But I don't remember getting a warning and why would it delete the contents anyways? Shouldn't it do a check to see if its copying the file onto it self before copying and just skip the copy part and import.
    Stupid me for messing up the path but for someone who doesn't backup their files this would really suck bad.
    Thanks,
    Art

    When I was recreating my project files because I had a problem with migrating from Preview 2. I went to import all my source into the new project... via File > Import > Java Sources... This is when I realized I setup the path wrong for the project I had c:\projects\application\projectname\projectname\src for the source where it was suppose to be c:\projects\application\projectname\src.
    Anyway instead of recreating again I just changed the Copy to 'c:\projects\application\projectname\src' and I set the copy from to the same exact directory 'c:\projects\application\projectname\projectname\src', then clicked ok to import.
    Well 10minutes later after adding the rest of the stuff I need and fixing the directory paths I realized all the source files were there but the contents were deleted!
    Wasn't a big deal for me because I backup my files and I just right clicked on the source folder in vista and restored the previous versions (what a handy feature)... But I don't remember getting a warning and why would it delete the contents anyways? Shouldn't it do a check to see if its copying the file onto it self before copying and just skip the copy part and import.
    Stupid me for messing up the path but for someone who doesn't backup their files this would really suck bad.
    Thanks,
    Art

  • Force deleting all content in UCM

    Hi
    I have a UCM that is n a bad state, its database has records of content that it does not have on disk. So if I try and delete all content via the archiver, it fails with a message saying (there are too many errors).
    How can I force delete all content? Empty some specific database tables and delete some directory on disk, or?
    Thank you
    Søren

    Hi Jonathan, Srinath
    Download the example that are in http://jonathanhult.com/blog/2013/07/delete-content-ridc/ and run this successfull, the out is:
    13:14:28.266 [main] DEBUG c.j.w.c.d.DeleteContentRIDCUtils - Service binder before executing:
    13:14:28.268 [main] DEBUG c.j.w.c.d.DeleteContentRIDCUtils - {dataSource=RevisionIDs, IdcService=GET_DATARESULTSET, UserTimeZone=UTC, UserDateFormat=iso8601, resultName=RevisionIDs}
    13:14:28.480 [main] DEBUG c.j.w.c.d.DeleteContentRIDCUtils - Successfully called service
    13:14:28.480 [main] DEBUG c.j.w.c.d.DeleteContentRIDCUtils - Service binder after executing:
    13:14:28.481 [main] DEBUG c.j.w.c.d.DeleteContentRIDCUtils - {dataSource=RevisionIDs, UserDateFormat=iso8601, UserTimeZone=UTC, ClientEncoding=UTF-8, IdcService=GET_DATARESULTSET, addAlert=1, nextRow=0, dUser=sysadmin, refreshSubjects=, blDateFormat=yyyy-MM-dd HH:mm:ssZ!tUTC!mAM,PM, refreshMonikers=, changedSubjects=, refreshSubMonikers=, copyAborted=0, blFieldTypes=xWebsiteObjectType, ..., xIdcProfile text,xComments memo, NoHttpHeaders=0, changedMonikers=, resultName=RevisionIDs, idcToken=, hasUserAccessChanged=1, IsJava=1, localizedForResponse=1}
    13:14:28.484 [main] INFO  c.j.w.c.d.DeleteContentRIDCUtils - Total number of content items found using query: 0
    probably was because he had previously removed content directly in the database.
    I deleted all folders that are in UCM_HOME/cs/archives via archiver, but i still see part of the structure of the content in /UCM_HOME/cs/weblayout/websites, /UCM_HOME/cs/weblayout/fragments/, and so on,  they are in shared filesystem for my cluster UCM. I can start a new migration content?
    What happens to the information found in the tables of the database?
    DELETEDROWS   
    FOLDERHISTORY 
    INDEXERSTATE
    REVCLASSES
    Is correct that persist the information in theyy tabless?
    Thanks.
    Regards.

  • Error While Deleting cube Contents in Process Chain

    Hi All ,
       I am getting a error when i am trying to delete the contents of two cubes in a Process Chain . The data of one cube is getting successfully deleted but while deleting the second one it results in a error.
    Following are the messages :
    1>Database table /BIC/FZCFEXP01 was deleted and recreated     
    2>Database table /BIC/EZCFEXP01 was deleted and recreated     
    3>Database table /BIC/FZCFEXP02 was deleted and recreated     
    4>Database table /BIC/EZCFEXP02 was deleted and recreated     
    5>Content Of Data Target ZCFEXP01 Successfully Deleted     
    6>Content Of Data Target ZCFEXP01 Successfully Deleted     
    7>System error: RSDU_DATA_EXISTS_TABLE_DB6/ DB6     
    8>Drop Cube Failed In Data Target ZCFEXP02
    Can anyone Help ??
    Sam
    Any pointers . Help is highly appreciated.
    Edited by: Samir Bihari on May 14, 2009 8:54 AM
    Edited by: Samir Bihari on May 14, 2009 8:55 AM

    Hi,
    I'm not sure for this issue but it may relate to SP issue...
    jst chk this notes:
    Note 385293
    Note 987754
    rgds,

  • Cross reference markers are deleted for content in text insets

    Cross reference markers are deleted for content text insets. I currently have a chapter that is built from several Import by Reference files. I added an introductory paragraph with cross reference links to heading 2 titles in these text insets. Everything works and saves normally, although the cross reference markers disappear from the chapter when files are checked out a few days later. An extra Heading 2 is also added to the end of the document.
    Steps to reproduce:
    1. Create a chapter composed of several text insets.
    2. Create a list of cross references to headings in these text insets at the beginning of the chapter.
    3. Check in/check out the files from a source control product.
    What went wrong?:
    The cross reference markers are gone, resulting in broken cross references. An empty Heading 2 is also added to the end of the document following the final text inset
    What should have happened?:
    The markers should remain and the heading 2 tag should not be applied to the document.
    Product version:
    Product: FrameMaker
    Version: 7.2
    Platform information:Windows XP
    Hardware: Dell Latitude D620
    OS Version: Windows XP Professional Version 2002, Service Pack 3.
    RAM: 1GB

    Thanks for the information, Van. We did try several techniques including adding the insertion point immediately after the text inset before the normal paragraph tag, but none seemed to consistently work. I will investigate this scenario futher, though, in light of your comments.
    We have managed to determine a workaround for this issue by avoiding a string of text insets. For some reason, using multiple text insets without separating them with normal text causes most of the problems after we add the files to our source control system. The situaton is not ideal, but it does work for the time being anyway.
    Steve

  • How to delete Autofill contents Safari 2.0.4

    How can I get rid of Autofill or delete Autofill contents? I find it anoying to to be prompted with several suggestions that are not what I want. I know there is private browsing...but what about everything that is already in autofill, or the next time I forget to turn it on? Any help would be greatly appreciated.

    Hi
    I may have misunderstood your original question.
    I find it anoying to to be prompted with several suggestions that are not what I want.
    I thought you were asking about the multitude of prompts appearing when you begin to type a web address into the Address window.
    If you are asking about the autofill information that appears when you are completing a form, then yes, as you discovered, the reset command will remove that data in its entirety from the system. It also removes a lot of other data too. You can find out the specifics of what is affected by going to the Help Menu>Safari Help. When the Help screen appears, type "reset" in the spotlight panel. This will lead you to a more thorough explanation of the reset command.
    If there are specific instances where the auto-fill information is not accurate or helpful, you can remove that data without throwing away everything else by going to Safari Preferences>Auto-fill>Other forms>Edit. There, you can remove specific entries without losing the entire database.

  • I have an external hard drive that was formatted by a PC and has files and directories etc. I want to format it and use it on my IMAC for backup but I can't seem to write to it nor can I delete current content. How do I initialize it for use with the MAC?

    I have an external hard drive that was formatted by a PC and has files and directories copied to it etc. I want to use it on my IMAC for backup. I see it on my my IMAC . I can open files etc.  But I can't seem to write to it nor can I delete current content. I don't care if I lose current content. How do I initialize it for use with the MAC?

    You can't write to it because it's formatted as NTFS which OS X will read but not write to. If you want to continue using the drive with both a PC and OS X you will need to download and install NTFS-3G so you can then write to it from your Mac. You can get NTFS-3G at:
    http://www.macupdate.com/app/mac/24481/ntfs-3g
    If you want to use the drive exclusively with your Mac then move the data off it and reformat it in Disk Utility (Applications - Utilities - Disk Utilities) as Mac OS Extended (Journaled.)

  • How to delete the Contents in a transaction?

    Hi all.
    I had a definite transaction that will be run by a pgm having 5 columns in a table.Now the users dont need 2 columns .
    How can we delete the contents of that table?
    Reply soon.
    Regards,
    SSR.

    I am not 100% sure what you mean.
    Do you only want to remove the two columns from the report (assumed it is a Z-report)
    In that case if it is an ALV list, just remove the fields from the field catalog and the user won't be able to see them any more.
    If it is just a standard list, you would have to remove the write statements for those two columns.
    For standard reports there is not much you can do without doing a mod or in case of an ALV list create a variant for that user which hides the fields he doesn't want to see. The variant is an option for the Z-reports as well.
    If you are talking about fields in a database table you would like to remove (assumed that it is a Z-table, you can just remove the fields in transaction SE11. After deleting the fields you will have to use the Database Utility (SE11-Utilities-Database Object- Database Utilities - Activate and Adjust Database). This will remove the columns including the data in it from that table.
    Never remove any fields from a standard table - even deleting values out of certain columns for standard tables is a very bad idea unless you really exactly know what you are doing.
    Hope that helps,
    Michael

  • How to Delete the content of an existing site and start from scratch

    I choose the wrong template when i initially setup my bc hosting for a customer how do i change the template i choose in site options and select a different one . I need to delete everything and stat over. I tried deleting everything under the develop area but lost my module style sheets for the eCommerce package. please help. Im on the business catalyst platform

    Hi Joey,
    Good to see that we are not the only ones running into this problem.
    Seems as there is no standard solution available.
    We have developed our own process type which deletes the content of the Open Hub table.
    Thanks,
    Klaus

  • How can I delete unsupported content songs from my iPad?

    How can I delete unsupported content songs from my iPad?

    jtetard wrote:
    Hi,
    You only able to do it by ITune.
    No.
    You can easily delete songs on the iPad.
    Open the Music app.
    Tap Songs at bottom
    Swipe left or right across the song then tap Delete.

  • I bought this apple ipad from pawn shop and have receipt. its locked by previous owner and pawn shop had no info on previous owner to contact. how can I delete all content and start fresh so my grandson can use for college?

    i bought this apple ipad from pawn shop and have receipt. its locked by previous owner and pawn shop had no info on previous owner to contact. how can I delete all content and start fresh so my grandson can use for college?

    If it's activation locked, you can't; go back to the shop and ask for a refund.
    (120778)

  • Hi, I have a new cell phone, I wanted to give my iphone to my father, instead of deleting the content on the iphone I have deleted the entire iphone. It starts up no more. iTunes will not recognize the iphone. How do I get my old data back onto the phone?

    Hi, I have a new cell phone, I wanted to give my iphone to my father, instead of deleting the content on the iphone I have deleted the entire iphone. It starts up no more. iTunes will not recognize the iphone. How do I get my old data back onto the phone?

    Place the device in DFU mode (google it) and restore as new.

  • Error when using Channel Migration Tool in SAP Directory Content Migration Tool

    Hi Experts,
    I'm trying to migrate a file receiver channel using the Channel Migration Tool in SAP Directory Content Migration Tool.
    I enter the channel name and then select it or click in "Edit"; I get the bellow error:
    Thanks in advance.
    Su May
    500   Internal Server Error
      SAP NetWeaver Application Server/Java AS
    The initial exception that caused the request to fail, was:
    java.lang.NullPointerException: while trying to invoke the method
    com.sap.pi.tools.dirmig.channel.metadata.SoftwareComponentVersion.getVersion()
    of a null object returned from
    com.sap.pi.tools.dirmig.channel.metadata.AdapterMetadataFactory.getLatestSWCV(java.lang.String)
    at
    com.sap.tc.pi.tools.dirmig.wd.wd.comp.channelmigration.ChannelSelectionView.onActionChannelTableSelect(ChannelSelectionView.java:548)
    at
    com.sap.tc.pi.tools.dirmig.wd.wd.comp.channelmigration.wdp.InternalChannelSelectionView.wdInvokeEventHandler(InternalChannelSelectionView.java:486)
    at
    com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:142)
    at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:75)
    at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.doHandleActionEvent(ProcessingEventPhase.java:159)
    ... 56 more
      See full
    exception chain for details.
    Failed to process request. Please contact your system
    administrator.
    While processing the current request, an exception occured which could not be handled
    by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the
    cause of the problem, please contact your system administrator. To facilitate
    analysis of the problem, keep a copy of this error page. Hint: Most browsers
    allow to select all content, copy it and then paste it into an empty document
    (e.g. email or simple text file).
    For further information about the Web Dynpro error page, error
    analysis and a description of well-known error situations, see SAP note
    1113811.
      Correction Hints
    Exception
    could be caused by the development component: sap.com/tc~pi~tools~dirmig~wd
    Note: The above hints are only a guess. They
    are automatically derived from the exception that occurred and therefore can't
    be guaranteed to address the original problem in all cases.
    System Environment
    Client
    Web Dynpro Client Type
    AJAX Client
    User agent
    Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1;
      Trident/5.0)
    Client Type
    msie 
    Client Type Profile
    ie6
    ActiveX
    enabled
    Java Applets
    enabled
    Accessibility mode
    disabled
    Inline CSS
    false
    Validate by rendering
    true
    Server
    Web Dynpro Runtime
    vendor: 'sap.com', name: 'tc/wd/webdynpro', scV: 'sap.com',
      scN: 'WD-RUNTIME', location: 'SAP AG', counter: '7.4008.20140808120905.0000',
      R: '7.40', SP: '8', PL: '0', change number: '613920', codeline:
      NW731CORE_13_REL
    J2EE Engine
    7.40.3301.367419.20140806095041
    System ID (SID)
    Server Node ID
    |6080050|60800|Server 00
      00_60800|douaklsappod.douglas.local/10.2.0.87|SERVER|RUNNING
    Java VM
    SAP Java Server VM, version:6.1.071 24.55-b08, vendor: SAP AG
    Operating system
    Windows Server 2008 R2, version: 6.1, architecture: amd64
    Application
    Java EE Application (deployable object)
    sap.com/tc~pi~tools~dirmig~wd
    Web Dynpro Application
    DirectoryCockpit
    Request URI
    /webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd/DirectoryCockpit
    Version
    vendor: 'sap.com', name: 'tc/pi/tools/dirmig/wd', scV:
      'sap.com', scN: 'SOAMON', location: 'SAP AG', counter:
      '7.4008.20140828111619.0000', R: '7.40', SP: '8', PL: '0', change number: '9' 
    Web Dynpro Code Generation Infos
    sap.com/tc~pi~tools~dirmig~wd
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd:
      SapDictionaryGenerationCore
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:01:39+0000, changelist=402811, host=vmw5876,
      is-central=true)
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd:
      SapDictionaryGenerationTemplates
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:02:11+0000, changelist=402811, host=vmw5876,
      is-central=true)
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd: SapGenerationFrameworkCore
      7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T19:41:09+0000, changelist=402838, host=vmw5876,
      is-central=true)
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd: SapIdeWebDynproCheckLayer
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:25:15+0000, changelist=612716, host=vmw5876,
      is-central=true)
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd: SapMetamodelCommon
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T19:44:59+0000, changelist=402897, host=vmw5876,
      is-central=true)
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd: SapMetamodelCore
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL, buildtime=2014-08-22T19:42:52+0000,
      changelist=402897, host=vmw5876, is-central=true)
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd: SapMetamodelDictionary
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T19:51:47+0000, changelist=402813, host=vmw5876,
      is-central=true)
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd: SapMetamodelWebDynpro
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:03:52+0000, changelist=612717, host=vmw5876,
      is-central=true)
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd: SapWebDynproGenerationCore
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:25:48+0000, changelist=612716, host=vmw5876,
      is-central=true)
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd:
      SapWebDynproGenerationTemplates
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:25:36+0000, changelist=612716, host=vmw5876,
      is-central=true)
    WD web module
      webdynpro/resources/sap.com/tc~pi~tools~dirmig~wd: SapWebDynproRuntimeGen
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:22:51+0000, changelist=612719, host=vmw5876,
      is-central=true)
       sap.com/tc~wd~api
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapDictionaryGenerationCore
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:01:39+0000, changelist=402811, host=vmw5876,
      is-central=true)
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapDictionaryGenerationTemplates
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:02:11+0000, changelist=402811, host=vmw5876,
      is-central=true)
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapGenerationFrameworkCore
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL, buildtime=2014-08-22T19:41:09+0000,
      changelist=402838, host=vmw5876, is-central=true)
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapIdeWebDynproCheckLayer
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:25:15+0000, changelist=612716, host=vmw5876,
      is-central=true)
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapMetamodelCommon
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T19:44:59+0000, changelist=402897, host=vmw5876,
      is-central=true)
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapMetamodelCore
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T19:42:52+0000, changelist=402897, host=vmw5876,
      is-central=true)
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapMetamodelDictionary
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T19:51:47+0000, changelist=402813, host=vmw5876,
      is-central=true)
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapMetamodelWebDynpro 
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:03:52+0000, changelist=612717, host=vmw5876,
      is-central=true)
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapWebDynproGenerationCore
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:25:48+0000, changelist=612716, host=vmw5876,
      is-central=true)
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapWebDynproGenerationTemplates
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL, buildtime=2014-08-22T20:25:36+0000,
      changelist=612716, host=vmw5876, is-central=true)
    WD web module webdynpro/resources/sap.com/tc~wd~api:
      SapWebDynproRuntimeGen
    7.4008.20140806095041.0000 (release=NW731CORE_13_REL,
      buildtime=2014-08-22T20:22:51+0000, changelist=612719, host=vmw5876,
      is-central=true)
    Detailed Error Information
    Detailed Exception Chain 
      java.lang.NullPointerException:
    while trying to invoke the method
    com.sap.pi.tools.dirmig.channel.metadata.SoftwareComponentVersion.getVersion()
    of a null object returned from
    com.sap.pi.tools.dirmig.channel.metadata.AdapterMetadataFactory.getLatestSWCV(java.lang.String)
    at
    com.sap.tc.pi.tools.dirmig.wd.wd.comp.channelmigration.ChannelSelectionView.onActionChannelTableSelect(ChannelSelectionView.java:548)
    at
    com.sap.tc.pi.tools.dirmig.wd.wd.comp.channelmigration.wdp.InternalChannelSelectionView.wdInvokeEventHandler(InternalChannelSelectionView.java:486)
    at
    com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:142)
    at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:75)
    at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.doHandleActionEvent(ProcessingEventPhase.java:159)
    at
    com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.execute(ProcessingEventPhase.java:94)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequestPartly(WindowPhaseModel.java:162)
    at
    com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doProcessRequest(WindowPhaseModel.java:110)
    at
    com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:97)
    at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:515)
    at
    com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:58)
    at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doExecute(ClientApplication.java:1671)
    at
    com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doProcessing(ClientApplication.java:1485)
    at
    com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessingStandalone(ApplicationSession.java:908)
    at
    com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessing(ApplicationSession.java:880)
    at
    com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:357)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:326)
    at
    com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)
    at
    com.sap.tc.webdynpro.serverimpl.wdc.DispatcherServlet.doContent(DispatcherServlet.java:101)
    at
    com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doPost(AbstractDispatcherServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
    at
    com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
    at
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:466)
    at
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210)
    at
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430)
    at
    com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:278)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at
    com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    at
    com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)
    at
    com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)
    at
    com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)
    at
    com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at
    com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:475)
    at
    com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:269)
    at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)

    Hi,
    Go to NWA>Configuration>Infrastructure>Java System Properties, Click on the Applications tab and search tc~pi~tools~dirmig~wd & Start Application as shown in below screenshot.
    I am not sure but you can try this if it helps.
    Regards,
    Dipen.

Maybe you are looking for