cancel
Showing results for 
Search instead for 
Did you mean: 

Java mapping Dynamic directory getting error as K:\Staging\LandingArea\2016\/ does not exists

Former Member
0 Kudos

Hi Experts,

I am on PI 7.31 single stack file to SFTP scenario.

I made the java code to dynamically create the target directory path based on the file name.

The target directory will be E:\Staging\LandingArea\2016\

Code logic:

String targetDir= "E:\\Staging\\LandingArea";

filename = filename.substring(9,13);

  subDir = filename;

targetDir = targetDir + "\\" + subDir + "\\";


in receiver channel I am getting error as "Message processing failed. Cause: javax.resource.ResourceException: java.lang.Exception: K:\Staging\LandingArea\2016\/ does not exists.


extra "/ " is adding at the end.


Can you please help me to resolve the issue.


Thanks,

Akhila.A



Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

You might need to use forward slash (/) instead of backslash for the path separator:-


E:/Staging/LandingArea/2016/

Sometimes, you might also need a / before the drive name, i.e. /E:/xxxx

The best way to confirm this is to login to the SFTP server using Filezilla and navigate to the respective folder and see how it looks like.

Former Member
0 Kudos

Hi Eng,

This is the path they have given E:\Staging\LandingArea\2016. And we are using key based authentication so I am not able to test with filezilla .

I asked basis team to logon to their server and check the navigation they have given . it leads to this path  /E/Staging/LandingArea/2016.and when they try to place the file in that folder its giving permission denied error.

addition to that when I try to push the file from PI server to the folder path /E/Staging/LandingArea/2016, getting error as Message processing failed. Cause: javax.resource.ResourceException: 3: Putting /E/Staging/LandingArea/2016/xxxxxxyy123445t3463.eot failed.


I asked them to check the permission for the user they have given to us .they told user has all the permission

please suggest.

Thanks,

Akhila.A


Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you all for your support. Its resolved now .

The directory is "/E/Staging/LandingArea/2016" and the issue was with folder permissions.

Regards,

Akhila A

engswee
Active Contributor
0 Kudos

Glad to hear that. Please proceed to close this thread.

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Akhila,

What are the configuration you have done in receiver channel i hope you have provide * in target directory and what about file name schema i hope you don't have any '/' character ? (please provide screenshot) . please provide the complete code too.

And also i doubt whether you can access as a drive i.e "F:" .

Br,

Manoj

Former Member
0 Kudos

Hi Manoj,

Thank you for response. I have the ASMA as the target directory path and file name has _ after 2016 (abcsrcbal2016_20160208).

I think something may be need to do in Java mapping to escape that "/" coming at the end or may be it showing as default- not sure. Need help on it.

Regards,

Akhila A

manoj_khavatkopp
Active Contributor
0 Kudos

Can you check in  message monitoring i.e in soap envelope you will be having dynamic configuration values please check on this so it could be found whether the character is being added at java mapping level or by the receiver channel.

Former Member
0 Kudos

Thank you Manoj.

I have enabled the log, but not able to see the versions.

Thanks & Regards,

Akhila A

Former Member
0 Kudos

Hi Manooj,

I have checked the log after mapping, the directory path is correct after mapping step. So its getting added in the channel or by default it may be showing like that.

Thanks & Regards,

Akhila A

Former Member
0 Kudos

please provide your channel configuration and Dynamic UDF code screenshot to help further.

Error log says - directory K: ... not exist but code you have E:??

Former Member
0 Kudos

Hi Ramkumar,

The code was changed,the code screenshot:

the error is as shown below:

The channel Configs:

Thanks & Regards,

Akhila A