Deleting files in sonicfs via java api

Posted by marmul on 07-Apr-2010 17:16

hi

is there away to delete files in the sonicfs:// of the directory service in sonic esb 7.5.2

unfortunately i using the smc is tyring cause can not select more then one. It tried the delete methodes of the sonicfs class but it get always an exception not implemented.

Regards

Markus

All Replies

Posted by tsteinbo on 08-Apr-2010 04:49

Is the esdadmin command

     delete file

good enough?

Thomas

Posted by marmul on 08-Apr-2010 05:16

It's not working ...

ESBAdmin> delete file /workspace/test/test3/20100401_co1_13_DocNoNotIncrementing

.xml

Deleting from Directory Service...

type = file

name = /workspace/test/test3/20100401_co1_13_DocNoNotIncrementing.xml

Failed to delete file '/workspace/test/test3/20100401_co1_13_DocNoNotIncrementin

g.xml' - Not Implemented

Posted by tsteinbo on 08-Apr-2010 09:22

Markus,

it is except for the workspace.

Manipulations to the workspace directory need to be done via the Workbench environment, e.g. you need to open you test project and  delete test3/20100401_co1_13_DocNoNotIncrementing.xml there.

Posted by marmul on 08-Apr-2010 09:36

Thx a lot Thomas for your replies,

unfortunately I have this files in production ESB(and they are not just one actually much more). Can I connect with a work bench to a production environment?

Posted by tsteinbo on 08-Apr-2010 09:54

Mmmm, the /workspace should not be there in a production environment (in the way that it is pointing to a directory on your file system). But I guess in your case /workspace is indeed just a normal dir within sonicfs that happens to have the same name as the virtual dir /workspace in a workbench install, right?

And not, you should not connect with workbench to a prod env!

BTW, I tried to delete from a none-workspace directory

ESBAdmin> delete file /test/test.pdf
Deleting from Directory Service...
    type = file
    name = /test/test.pdf

ESBAdmin>

works like a sharm.

Can you does confirm that you production install is not ideed a workbench install?

Posted by marmul on 08-Apr-2010 10:06

Well, it happens to have the same name as in dev ... yes ...

And it's not a work bench installation

Posted by tsteinbo on 08-Apr-2010 10:08

weired... have you tried other locations?

have you tried with delete dir too?

Posted by marmul on 08-Apr-2010 10:16

Yes i tried "delete directory" too same result ...

On a other file/directory outside the workspace it works fine ....

Posted by tsteinbo on 08-Apr-2010 10:44

Well, that seems to indicate to me that somehow the virtual dir is in place. To confirm, can you do a ds dump (SMC -> Tools -> Export Directory Service -> choose one). The locate the dsdump xml.

The seach it for

     

       

         

         

           

             

             

           

           

           

         

       

       

         

           

           

             

           

         

       

     

If you find the

ECLIPSE_WORKSPACE_DISK_LOCATION

then it is indeed a workbench install. The file path after it is where you find the files on local disk.

If you don't find it... I don't know further...

BTW, I would expect SMC give you the same error, right?

Posted by marmul on 08-Apr-2010 11:11

Nope the SMC allows me to delete a file and a directory .... but well only one by one .... which is quite much for all this files...

About the ECLIPSE_WORKSPACE_DISK_LOCATION I will check for it

This thread is closed