cancel
Showing results for 
Search instead for 
Did you mean: 

InvalidUriException: Try to copy a folder under src/mimes/Components to KM

Former Member
0 Kudos

Hi Everybody,

how can i copy a folder under src/mimes/Components/myFolder to KM-Content? Until now i try it with the following piece of code, but with no success. I get the Exception: InvalidUriException.


		IResourceContext ctx = buildResourceContext();   		 			
		RID sRid = RID.getRID("/LocalDevelopment~vd~de.gp.portal/_comp/src/mimes/Components/myFolder");   						 		
		RID tRid = RID.getRID(vdElem.getTargetPath());	
		wdComponentAPI.getMessageManager().reportSuccess(tRid.toString());									
		IResource resource = ResourceFactory.getInstance().getResource(sRid,ctx);		
		ICopyParameter copy_param = new CopyParameter(true);
		copy_param.setIgnorePropertyFailures(true);						
		resource.copy(tRid,copy_param);    	

regards,

Seed

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member192434
Active Contributor
0 Kudos

Hi

It seems that it is not able to read given URL

Plz your URL is correct or not

If you are using window then put your double slash (
).

Thanks

Former Member
0 Kudos

Hi Anup,

if i try to copy a km folder to another place it works fine. But in this case, i am trying to copy a folder under my Project folder (/src/mimes/...), which is not stored under KM. So, the question is, is that the right way to copy a folder from ../src/mimes/Components/myFolder to a KM-Content?

The URL was correct.

regards,

Seed

Edited by: seed_mopo on Oct 31, 2008 10:50 AM

former_member192434
Active Contributor
0 Kudos

Hi

Try to import it rather than copying it..

Thanks

Former Member
0 Kudos

Hi Anup,

what do you mean with "Import it"? My purpose is to copy the folder under my Projekt at runtime to KM-Content.

regards,

Seed

Former Member
0 Kudos

Hi,

the full exception was:


com.sapportals.wcm.repository.InvalidUriException: Invalid RID: No repository manager found for prefix: /LocalDevelopment~vd~de.gp.portal

souce code:


		IResourceContext ctx = buildResourceContext();   
		RID sRid = RID.getRID("/LocalDevelopment~vd~de.gp.portal/src/mimes/Components/myFolder");	   						 		
		RID tRid = RID.getRID(vdElem.getTargetPath());						
		IResource resource = ResourceFactory.getInstance().getResource(sRid,ctx);		
		ICopyParameter copy_param = new CopyParameter(true);
		copy_param.setIgnorePropertyFailures(true);						
		resource.copy(tRid,copy_param);    

regards,

Seed

former_member192434
Active Contributor
0 Kudos

Hi

Check out this forum link

same problem got resolved using following link

/thread/39714 [original link is broken]

/thread/692265 [original link is broken]

Thanks