Upload file to windows share folder running on unix

Hi, I am having requirement to upload the files into windows share folder, It works fine If I run the application on windows, but we moved the application to UNIX, so right now the client has to upload the files to windows shareholder , server is running on the UNIX,
as I am using the simple File file = new File(//share/shareholder),
so the problem is once we move to UNIX, how can I handle ., any example will really helpful.
Thanks
Srikanth

k, when I run the UNIX, I am getting below error, It works fine If I run in windows, but when I run in Unix getting error, as all are inside the network.
jcifs.smb.SmbException: Failed to connect to server
java.net.UnknownHostException: shareServer
at jcifs.UniAddress.getByName(UniAddress.java:297)
at jcifs.UniAddress.getByName(UniAddress.java:201)
at jcifs.smb.SmbFile.getAddress(SmbFile.java:792)
at jcifs.smb.SmbFile.connect(SmbFile.java:820)
at jcifs.smb.SmbFile.connect0(SmbFile.java:797)
at jcifs.smb.SmbFile.open0(SmbFile.java:852)
at jcifs.smb.SmbFile.open(SmbFile.java:881)
at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:139)
at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:97)
at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:67)
at jcifs.util.FileTest.main(FileTest.java:37)
at jcifs.smb.SmbFile.connect0(SmbFile.java:799)
at jcifs.smb.SmbFile.open0(SmbFile.java:852)
at jcifs.smb.SmbFile.open(SmbFile.java:881)
at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:139)
at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:97)
at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:67)
at jcifs.util.FileTest.main(FileTest.java:37)

Similar Messages

  • OBIEE 11.1.1.6.12 - save analysis in Excel file into Windows share folder on daily basis

    Hi all,
    how do I save analysis in Excel file into Windows share folder automatically on daily basis? Also my need is to automatically set prompt date in analysis as "sysdate - 1" (yesterday) before saving. Is it possible at all?
    OBIEE 11.1.1.6.12

    Set the report level filter using date
    as current_date-1
    to save file check this OBIEE 11g &amp;#8211; Export To The File System : Total Business Intelligence

  • File adapter(receiver) to generate file in remote windows share folder?

    Hello gurus,
    1.Is that possible, to use the file adapter(NFS) to generate a file in a remote windows share folder?
    How can i specify the target directory field?
    2.Another question, when i specify the target directory like rootFolder/subFolder, then the file is generated in the folder
    /usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/rootFolder/subFolder.
    Why did it put my path as sub-folder of /usr/sap/XID/DVEBMGS00/j2ee/cluster/server0?
    Can i put it in another place? or even start from the root?
    Best regards, Charlie

    > 1.Is that possible, to use the file adapter(NFS) to generate a file in a remote windows share folder?
    This is possible only, when your PI system is installed on Windows OS also.
    > How can i specify the target directory field?
    The same way as you access it from your Windows Explorer.
    > Why did it put my path as sub-folder of /usr/sap/XID/DVEBMGS00/j2ee/cluster/server0?
    Because this is the working directory of the Adapter Engine
    > Can i put it in another place? or even start from the root?
    Yes, of course. Why you do not simply try it?

  • Upload file to a particular folder in UCM

    I want to upload file to a particular folder location in UCM.
    When I am uploading it is going to the default location though i programmatically have set the folder path
    I am using Adf application in Jdev 11.1.1.3
    As i am new to UCM i do not have idea of whether to define the location at ucm level or in our program
    Below is my code like this
    public void checkInContent(TransferFile file){
    UploadContentVORowImpl row=(UploadContentVORowImpl)this.getUploadContentVO1().getCurrentRow();
    IdcClient client= UCMRepositoryOperations.getIdcClient();
    DataBinder binder= client.createBinder();
    binder.putLocal ("IdcService", "CHECKIN_UNIVERSAL");
    binder.addFile("primaryFile", file);
    String fileType=file.getContentType().substring(0,file.getContentType().indexOf("/"));
    int contentId= new SequenceImpl("UCM_CONTENT_ID_SEQUENCE",getDBTransaction()).getSequenceNumber().intValue();
    binder.putLocal("dDocID", contentId+"");
    binder.putLocal("dDocName", file.getFileName());
    binder.putLocal("dDocTitle", file.getFileName());
    binder.putLocal("dDocType","DigitalMedia");
    SimpleDateFormat sdf=new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
    binder.putLocal("dInDate",sdf.format(row.getFromDate().dateValue()));
    binder.putLocal("dOutDate",sdf.format(row.getToDate().dateValue()));
    binder.putLocal("xScope",row.getScope());
    if(row.getStateId()!=null){
    binder.putLocal("xState", row.getStateId().toString());
    if(row.getDistrictId()!=null){
    binder.putLocal("xDistrict",row.getDistrictId().toString());
    binder.putLocal("dLocation", "/Contribution Folders/sahaj/content/loginPageNews");
    binder.putLocal("dAuthor", "Test");
    binder.putLocal("dSecurityGroup", "public");
    binder.putLocal("blDateFormat", "dd-MM-yyyy HH:mm:ss");
    ServiceResponse resp=null;
    String response=null;
    try {
    resp = client.sendRequest(UCMRepositoryOperations.getContext(), binder);
    } catch (IdcClientException e) {
    ucmAMLogger.severe(e);
    try {
    response=resp.getResponseAsString();
    resp.close();
    } catch (IOException e) {
    ucmAMLogger.severe(response);
    ucmAMLogger.info(response);
    }

    The xContributionFolder should be an ID, not a file path.
    To determine the correct ID, this PL/SQL function may be useful :
    function f_get_folder_id ( p_folder_path in VARCHAR2)
    return NUMBER
    is
    v_parent_folder_id NUMBER := 429910249369000002 ; -- ID of 'Contribution Folders/Root' collection
    v_folder_name VARCHAR2(255);
    v_folder_path VARCHAR2(32000);
    pos_next_separator NUMBER;
    CURSOR c_get_folder_id ( p_parent_folder_id in number, p_folder_name in varchar2 )
    is
    SELECT dcollectionid
    FROM collections
    WHERE dcollectionname = p_folder_name
    AND dparentcollectionid = p_parent_folder_id;
    begin
    v_folder_path := p_folder_path ;
    -- strip first '/'
    if ( substr(v_folder_path,1,1) = C_FOLDER_SEPARATOR ) then v_folder_path := substr(v_folder_path,2); end if;
    pos_next_separator := instr(v_folder_path,C_FOLDER_SEPARATOR) ;
    while ( pos_next_separator > 0 )
    loop
    v_folder_name := substr(v_folder_path,1, pos_next_separator - 1);
    v_folder_path := substr(v_folder_path,pos_next_separator+ 1);
    open c_get_folder_id ( p_parent_folder_id => v_parent_folder_id , p_folder_name => v_folder_name );
    fetch c_get_folder_id into v_parent_folder_id;
    close c_get_folder_id ;
    pos_next_separator := instr(v_folder_path,C_FOLDER_SEPARATOR) ;
    end loop;
    v_folder_name := v_folder_path;
    open c_get_folder_id ( p_parent_folder_id => v_parent_folder_id , p_folder_name => v_folder_name );
    fetch c_get_folder_id into v_parent_folder_id;
    close c_get_folder_id ;
    dbms_output.put_line('Found :' ||v_folder_name||' id '||v_parent_folder_id);
    return v_parent_folder_id;
    end f_get_folder_id;

  • Mac OSX file copy to Windows Share folder permissions

    We'd got a few Mac's, one is snow leopard and the other is Lion.  The scenario is:
    Mac:
    Go > Connect to server > smb://servernamehere > Connect > select your share
    The authentication box then pops up, they've been typing in a username and password to connect to Server 2008 (Active Directory here by the way).  I don't think it matters if they type in "DOMAIN\username" and the password or just "username" and the password.
    They try to copy files around but they get this wacky -xx number and their Macs lock up.
    On the Windows Server Side I look at the folder permissions and the users they're using are all golden, full permissions.  I look at a test folder I create and it too looks good.
    The weird thing is this:
    If I look at the folders on Windows it looks normal but if I open the command line on a Mac, do:
    cd /
    cd Volumes
    ls
    cd Folder_I'm_Connected_To
    ls -la | grep testfolder_I_made
    I get these results...
    drwx------ 1 Their_Username_Here  staff  --> Some other stuff here like a folder size, date, time and the folder name
    My question is this I guess.
    Do I have to join these Macs to the Windows domain for the permissions and folder views on the Mac to look right AND to have them funtion properly?  The user of the other Mac says she never types in any authentication stuff, she just clicks a folder shortcut on her Mac ans she's in.
    I would expect the permissions to at least say something like:
    drwxdrwx---
    The Windows server doesn't have the group "staff" which makes it seem the Mac isn't looking at the mounted volume in the same way Windows is.  They also had this problem on AFP and SMB shares directly on a FreeNAS box which is also BSD like a Mac.
    As a result of the Macs behaving similarly on both Windows and BSD (FreeNAS) I think this seems to be some wacky Mac behavior and I just can't figure it out.
    Any help would be appreciated.
    Thanks.

    Hi, same results at the terminal command on a SMB share, observed here with mac computers running with OsX 10.8 with Windows 2008 R2 SMB shares. My issue is that theses computers need to copy files on theses shares with Chronosync or Carbon Copy and this is not working due to an "modify file attributes permissions" error. But if I copy the files using "Finder" it works great.
    You don't need to join your computers to your domain to get it to work. The error that you are talking about is the -5000 error ???

  • Upload Files into SAP Office Folder in Background

    Hi All ,
    Has anyone tried uploading file(s) of any type say *.XLS , *.PDF to SAP office folder (Outbox) in the background . I am using the function module  'SO_DOCUMENT_REPOSITORY' with methods "SAVE" , "ATTCREATEFROMPC" and "SEND" . It works fine in foreground without any errors . But when tried to schedule in background , the job stops at the method call "ATTCREATEFROMPC" and gives a message  "Database error for <INSERT INTO KPRO> " . It looks like the uderlyiong function module checks for an active GUI and fails during background .
    Any thoughts or other solutions would be appreciated ....
    Thanks

    Hi,
    I think ATTCREATEFROMPC method is for loading the file from frontend PC. It is bound to fail if you run it in background since there is no SAPGUI running it and it can't know the location.
    You will need to use some other method to be able to read the files from the APP server, and have your documents on the APP server if you want to run your code in the background.
    cheers,
    Ajay

  • Unable to view files from windows share

    Hi guys,
    I am wondering if you can help me out. I have 10 mac ocnnected to a windows domain. Five machinies are OSX 10.5.8 and five are OSX 10.6.8. The problem I am having is I can connect to the windows share via smb but I am unable to view the files. I can connect the server and see the folder listings but I am unable to view the contents of each directory. The users permissions are fine as they can log into a windows PC an are able to access the files as needed. I have tried different user accounts and all are getting the same issue. Each account has admin rights as well. I was wondering if anyone else has seen this issue before?
    Thanks in advance!

    files like movies or pdf files. Under the apps section, I can't see any way to transfer files.
    Also do I need to completely sync my ipad, if i click sync then after a while it says can't sync all the apps present on the ipad

  • How to upload files residing in a folder on local file system .

    Hi, I have a problem when trying to upload files.
    I have a folder in my local system and have n files in it. Now if i use the file upload element i need to click n times to upload these files. So i want to achieve programatically to upload all the files in a folder given the folder name to the application. Is this possible or is there any restriction to achieve this through webdynpro.
    Also how to know programatically all the names of files and folders in a particular folder during web dynpro session.
    Regards,
    Vinay.

    Hi Vinayaka,
    Watch these links..
    Uploading multiple files using the FileUpload UI element
    Files...
    Regards,
    Karthick K Eswaran
    Display files in web browser

  • Cannot open Excel files on Windows share and ONLY Excel files

    I'm browsing a Windows share and for whatever reason it will not let me open Excel files directly from the network location. If I view the Coverflow, I can see a a preview of the actual file as well as copy it to the desktop and open it.
    I receive an error message that says "filename.xls could not be found."
    I can open up any other file from the network location, but not Excel files.
    I checked the file permissions and they mirror the other file types, it may be worth mentioning that I utilize network synchronization and view these files from a PC as well. I also noticed when I create a new file in that location, it will only appear in OS X and not Windows, but is still completely accessible.
    Any help is appreciated!
    Thanks

    Re:  Windows 8 vs. Excel problem
    Does your new Dell computer have MS Office installed?
    Jim Cone
    Portland, Oregon USA
    https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2

  • Upload file in to km folder using ETL tools

    Hi Experts,
    I have requirement, to upload html file in to km repository using some ETL tool. Is it possible? If not...
    How i can bring a file from a different server in to portal km repository?
    Regards
    Baby

    Hi all,
    I am closing this question... since i got a better way to proceed...
    In our portal we have a file system mountpoint (etc). We are able to FTP html files in to this folder through ETL scheduling... 
    I think this is better way, also have discussion with some of my friends... any comments..
    Regards
    Baby
    Edited by: Baby on May 25, 2009 4:11 PM

  • Can not create a file under \window\system32 folder

    How do I create a folder in \windows\system32 in x64 machine through java code?
    Creating a file/folder under \windows\system32 fails and java creates a folder in \windows\syswow64 folder.
    pls see the code attached for example.
    My client wants to create a folder using my application.
    I dont want to use any native code suggested by microsoft. You can see in the following link
    http://msdn2.microsoft.com/en-us/library/aa365743(VS.85).aspx
    import java.io.*;
    public class FileTest{
         FileTest(){
              boolean created = writeFile();
              if (created)
                   System.out.println("File Created Successfully");
              else
                   System.out.println("Could not able to create the file");
         public static void main (String args[]){
              FileTest ft = new FileTest();
         public boolean writeFile(){
              try{
              Writer output = null;
              String text = "Sample Test File";
              if(!(new File("c:\\windows\\system32\\customFIle").exists())){
                   new File("c:\\windows\\system32\\customFIle").mkdirs();
              File file = new File("c:\\windows\\system32\\customFIle\\write.txt");
              output = new BufferedWriter(new FileWriter(file));
              output.write(text);
              output.close();
              return true;
              }catch(IOException ioex){
                   System.out.println(ioex);
              return false;
    Thanks in advance

    java_mani wrote:
    How do I create a folder in \windows\system32 in x64 machine through java code?Can the user that executes this Java code create "manually" a folder in that directory?
    Creating a file/folder under \windows\system32 fails and java creates a folder in \windows\syswow64 folder.
    pls see the code attached for example.
    My client wants to create a folder using my application.
    I dont want to use any native code suggested by microsoft. You can see in the following link
    http://msdn2.microsoft.com/en-us/library/aa365743(VS.85).aspx
    Why not?

  • Cannot access/see files on windows share

    I have successfully mapped a iBook running 10.3.9 to a Windows 2003 file server. I can see all the shares on the server but no files or folders underneath it. I looked at the security log on windows AD server and saw my successful authentication and no errors. I read an earlier post indicating there may be an AD security setting allowing 'foreign' connections or something but my thought is you would either map the volume or you wouldn't.
    If anyone has encountered this and figured it out please let me know. I may be able to test turning off antivirus in a test lab, I think we are running McAffee.

    What browser are you using?
    I'm able to access forms at irs.gov using Firefox, IE10, Opera, Chrome and Safari on Windows 7, 8 and Mac OS 10.8.4

  • DLL file in Windows\system32 folder cannot be found by regsvr32 even though the file is visible in Windows Explorer

    I am trying to register a DLL on a Windows 7 ultimate, 64-bit computer (all SPs installed).
    The file resides in c:\windows\system32.
    The DLL file is clearly visible in Windows Explorer. The file is not hidden. It is not marked Read-Only. All users can access it.
    When I run regsvr32 it responds that the file cannot be found. It says to check the path.
    The same thing happens when I run from the command prompt if c:\windows\system32.
    When I try to open using Dependency Walker, it also cannot find the file.
    Does anybody know what's happening here? I feel like I'm in the Twilight Zone.
    Thanks.
    Murray
    M Whipps

    Hi,
    You could run SFC command to see if you fix any corrupted system file.
    If this cannot help, try to replace this file with a known good copy.
    For the detailed steps, you could follow the link below:
    http://support.microsoft.com/kb/929833?wa=wsignin1.0#method3
    Alex Zhao
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Alex Zhao
    TechNet Community Support

  • Uploading files from windows media player to itunes need help!

    Some of the files WMA are protected some are not. When I uploaded itunes real player files transfered to itunes. How would I go in to change the settings in windows to unprotect the files to have them transfered to itunes. Help please

    iTunes will not accept Window Media player tracks that are protected. If you imported them off your own CDs, did you check the option to apply protection to them? If so, your only choice is to re-rip those CDs.
    Patrick

  • Firefox hangs or crashes when upload file dialogue window opens.

    Whether in safe mode or not. Usually hangs, when clicking close the window "wait for a response" or "close now" is presented.
    Latest report
    bp-5e42f1b8-fab7-4522-97a2-257b32140817
    Using Chrome on the same pc there is no problem..
    TIA

    Do a clean reinstall and delete the Firefox program folder before (re)installing a fresh copy of the current Firefox release.
    *Download the full Firefox installer and save the file to the desktop<br>https://www.mozilla.org/en-US/firefox/all.html
    If possible uninstall your current Firefox version to cleanup the Windows registry and settings in security software.
    *Do NOT remove "personal data" when you uninstall your current Firefox version, because this will remove all profile folders and you lose personal data like bookmarks and passwords including data in profiles created by other Firefox versions.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    *(32 bit Windows) "C:\Program Files\Mozilla Firefox\"
    *(64 bit Windows) "C:\Program Files (x86)\Mozilla Firefox\"
    *It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other personal data are stored in the Firefox profile folder and won't be affected by an uninstall and (re)install, but make sure that "remove personal data" is NOT selected when you uninstall Firefox.
    If you keep having problems then also create a new profile.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

Maybe you are looking for