cancel
Showing results for 
Search instead for 
Did you mean: 

can not find file path getting error in webdynpro Java

Former Member
0 Kudos

Dear All.

I facing one issue regardin Knowledge Mnagement

some of webdynpro java Applications are created for to Access the files ,which is available in KM

Error details : cannot find file ://172.30.2.7/portal/TIRC/DIGITAL_DOCUMENTS/MISSILE-LECTURE-NOTES-PART-1'.

Make sure the path or Internat address is correct.

Webdynpro Code :

IWDMessageManager msgmgr = wdThis.wdGetAPI().getComponent.getMessageManager();

String docPath = wdcontext.currentResultsTableElement().getdocPath();

File file = new File(docPath);

try

{

Runtime rT = Runtime.getRuntime();

Process p = null;

IWDResource res = WDResourceFactory.createResource(new FileInputStream(docPath) , file.getName() , WDWebResourceType.TXT , true);

IWDWindow docWin = wdComponentAPI.getWindowManager().createNonModalExternalWindow(res.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()),res.getResourceName());

docWin.open();

}

The above code is handle to open KM fIle , for to access KM Files we developed webdynpro Java Application.

But waht ever it is showing the error , file ://172.30.2.7 is correct IP address which is maintaining for NAS file Share

Previously it's worked fine , but now I am facing the issue...

please give your inputs , it will helpful to me.

Regards,

Sony

Accepted Solutions (0)

Answers (1)

Answers (1)

Qualiture
Active Contributor
0 Kudos

If it used to work, what changes have been made since?

It seems your NetWeaver environment isn't able to access the file from that path, so you may want to check permissions

Also, you code contains the block

Runtime rT = Runtime.getRuntime();
Process p = null;

which doesn't do anything. Maybe it's a copy-paste error, if not, then it's redundant

Former Member
0 Kudos

Hi Robin,

The Java application working fine Upto IE 6.0 ,I didn't have any issue.

But when I am coming to IE 7.0 onwards it is showing the above error.

If any thing is wrong in code it means it wont work in any of The IE Browser

If anybody have an idea please share your inputs.

Regards,

Sony.

Qualiture
Active Contributor
0 Kudos

Hi,

I simply cannot believe a browser (client application) will throw a server error (from a server application)

Can you post the whole stack trace?

Former Member
0 Kudos

Robin

The webdynpro Java application developed for to read KM Folders

I am getting the error when KM related links Accessing

Error details : cannot find file ://172.30.2.7/portal/TIRC/DIGITAL_DOCUMENTS/MISSILE-LECTURE-NOTES-PART-1'.

Make sure the path or Internat address is correct.

The above error information I am getting

Need to Provide any more Robin.

I checked in IE 6.0 its working fine my client first he used IE 6.0 only recently onwards he is using Advanced versions

I am having issue in IE 7.0 onwards

Thanks,

Sony.

Edited by: sonyepmdm on Feb 24, 2012 10:50 AM

Qualiture
Active Contributor
0 Kudos

Hi,

The error message is rather strange, on both occasions you wrote "Make sure the path or Internat address is correct" and this typo leads me to believe this is a custom error message rather than an SAP generated one

Can you debug on which line of your code the error gets thrown? Also, are there any suspicious messages in the defaulttrace file?

Former Member
0 Kudos

Hi

are you expecting the entire code of that application

Thanks,

Sony.

Qualiture
Active Contributor
0 Kudos

No,

Just post the method or few lines in which you get the exception, and at which particular line the exception is thrown. This will give me an idea of what's happening

Former Member
0 Kudos

Hi Robin,

The below code is related for to opening the KM Folder ,when I was clicking on that folder it is showing above error.



public void onActionShowDocuments(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
IWDMessageManager msgMgr = wdThis.wdGetAPI().getComponent().getMessageManager();
String docPath = wdContext.currentResultsTableElement().getDocPath();
File file = new File(docPath);
try{
Runtime rT = Runtime.getRuntime();
Process p = null;
IWDResource res = WDResourceFactory.createResource(new FileInputStream(docPath), file.getName(), WDWebResourceType.TXT, true);
IWDWindow docWin = wdComponentAPI.getWindowManager().createNonModalExternalWindow(res.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()),res.getResourceName());
docWin.open();

}catch(Exception e){
	msgMgr.reportSuccess("Exception in opening a file. "+e);
		}

Qualiture
Active Contributor
0 Kudos

Hi,

Are you absolutely sure you get your error in this particular code stub?

I mean, if you get an exception, I would suspect it would display "Exception in opening a file. " and then the exception message, instead of "Error details : cannot find file ....."