cancel
Showing results for 
Search instead for 
Did you mean: 

unable to perform IO operation from MI Client

former_member188598
Contributor
0 Kudos

Hi All,

In our application we are doing File Read/write operation. The files are included in the project structure. When we execute the project from NWDS it works fine. The application is able to read and write new files.However when we run the application from the MI client, the application fails to read/write the files.

Wat can be the prob.Does client is not supporting I/O?

Suggest some help.

Regards

Priyanka

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

are you using native java classes or MI classes for the storage access?

One difference between dev env and MI Client runtime is the location. The MI Client is located in C:\Programm Files\...

Probably your security settings require admin rights or modification/creation of files in the programms folder is disallowed for security resons (viruses)...

Cheerz,

Thomas

former_member188598
Contributor
0 Kudos

Hi Thomas,

We are using native java Serialization APIs to read/Write files.

Can you please let me know, what authorization I need to add so as to be able to Read/Write files from MI Client and how to give the authorization.

Thanks in Advance!

Warm Regards

Priyanka Singh

Former Member
0 Kudos

Hi,

are you sure the file structure you create is correct?

Check the SAP Signature capturing solution of xMAM as an example. they write and read files as well - MI reads and writes property files. So if MI is working in general your App should be working fine as well. I guess you try to write to a wrong folder of have any other issue with the complete filename structure. Could this be possible?

Be aware you are in Java - so be very precise on the filename and look for correct separation. What platform are you on?

If you are not able to write - what is the error - at least you should get any error from IO handler.

Regards,

Oliver

former_member188598
Contributor
0 Kudos

Hi Oliver,

are you sure the file structure you create is correct?

I am saving the file in the following path"app-root/vehicles/Vehicleid". Is this the correct place to store the file?

In MAM signature Capture, the jar file has Signed applet and hence it does not give any error in File I/O.

I am getting null pointer exception because on application load I am fetching the list of files created. And since the creation of file is unsuccessful , null pointer exception is thrown.

I am on Java Platform.

Please let me know how to resolve the security issue with java.

Former Member
0 Kudos

Hi,

no, it is not.....I guess....

By my oppinion your path should be either

/MI/WEBAPPS/MAM/APP-ROOT/.....

or

c:/Programm files/...... and so on....

By what I can see ehre, your path is missing the first part. If you are on PC the drive letter is missing and so on. You can get these values by MI properties.

Somethig like this should work:

String meFolder = Configuration.getInstance().getProperty(ConfigKeys.TOMCAT_HOME, "wwwroot");

Log.log(Log.DEBUG_LEVEL, "--PartReturnControllerImpl ->meFolder:" + meFolder);

String filename = meFolder + "
webapps
APPFOLDERNAME
SUBFOLDER
" + somePropertyImformationorGUID + ".FORMAT");

What worries me: you say you create a file in that folder. have yu opened that folder and is the file really there? That would surprise me really...

Well, the MAM WAR file would give an error, if it would reference a wrong filepath - cause then it would give an PATH NOT FOiuND exception at least - even if it is signed. But this is a guess and if you have a try-catch block with no logging in the catch clause, you could continue working even there was nothing created.

Well, I guess the Null Pointer in your case is more to the fact the folder does not exist at all. If the folder is empty you should not get null pointer but an empty list. But anyway, I thought you should give an exception already while creating the file. Well, who cares, lets give that a try above and see if this solves the issue. At least I can say: the APP does not reference a file in the WEBAPPS folder and so the folderpath you have created is not a relative path but an absolute one. This is the problem you are facing at the end - most likely.

Hopefully this will work for you

Regards,

Oliver

former_member188598
Contributor
0 Kudos

Hi Oliver,

The prob was specifying the wrong path. Thx for ur help. Rewarded full points to u.

Regards

Priyanka

Answers (0)