cancel
Showing results for 
Search instead for 
Did you mean: 

Reading a file from a File Server using WAS

Former Member
0 Kudos

Hello All,

We are required to access a few files from the Lan File Servers, where only certain users have read access. When I run a java program to read the files on my local JVM, I am able to access the file. However, when I deploy the same java program on the J2EE engine, the following error comes up:Message:java.io.FileNotFoundException:
10.52.31.23\04_Design\01_Design_Docs\cookbook.xls (Logon failure: unknown user name or bad password).(10.52.31.23 is the IP of lan server). We noticed that System property user.name in this case is SAPJ2EService, while when local JVM runs it is my windows login. I am not sure what is the workaround for this? One way is to change WAS's java.policy and security file, but is there any other way which can be done programmatically, since we wouldn't have access to the Production Server.

Regards,

Rahul

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

The solution I found was to change the Logon property of the J2EE instances to a domain user, its by default set to SAP<InstanceName>Service local user.

For changing the property, you have to go the operating system's Services Control, where Logon property for instances can be changed.

Cheers,

Rahul

Former Member
0 Kudos

Hi,

The link gives a solution in a round-about way. In my case, I cannot use an IIS server since, the server on which my files are there, I don't have any other access that just read-write of my folder.

I am looking for a way which can be used directly through WAS.

Regards,

Rahul

Former Member
0 Kudos

Hi,

No, the file resides in a LAN Server which is accessible through my windows machine. You may consider it access to a file shared on another computer with permission to your windows id.

Regards,

Rahul

Former Member
0 Kudos

Hi,

you need to access files through "http".

Regards, VIP

Former Member
0 Kudos

Hope this link would be helpful