Java does not get file list from shared folder in another server.

Hi,
I'm using java 1.4.2.16,
Command below does not get file list.
import java.io.;*..
File file = new File("\\\\10.242.22.28\\SapMII");
File[] files = file.listFiles();
SapMII folder is Everyone full Control permission.
How can i solve this problem?
Thanks.

Could you please post replies in a more helpful way? Just informing me that it was an NPE doesn't really tell me anything. Post the stacktrace (Exception#printStackTrace()). And the listFile() methods API has this to say:
Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.I'm able to run this sample code easily:
import java.io.File;
public class TestFileList {
     public static void main(String[] args) {
          File file = new File("\\\\10.40.55.33\\shared");
          File [] files = file.listFiles();
          for(File currentFile: files )
               System.out.println(currentFile.getName());
}

Similar Messages

  • File copy from SHARED folder to Application server

    Hi
    I have a file which is in a shared folder. My requirement is to copy this file into the application server.
    The function module C13Z_FILE_UPLOAD_BINARY is working fine with local files. But I could not use it to copy the file in shared folder.
    Please help me out.
    Points will be awarded for sure !!
    Thanks

    hi,
    use OPEN DATASET ... TRANSFER ... CLOSE DATASET to transfter the data on to the required file path ... else use transaction
    CG3Z - to upload file from presentation server to application server.
    Regards,
    Santosh

  • Web Matrix FTP Remote Connection Error - "Connection Error - Failure to get file list from server. An entry with the same key already exists."

    Does anyone have experience with this issue when connecting to a Linux FTP Web Server running a FTP Site?
    "Connection Error - Failure to get file list from server. An entry with the same key already exists."
    I cannot access the root directory of the ftp file server using Web Matrix 3. The site is .php based, and
    is accessible when connecting with FileZilla or Remote Connecting via FTP with Visual Studio.
    All sites have been deleted from Web Matrix, the user Application Data has been cleared and Web Matrix has been reinstalled.
    Issue Persists....
    Thanks in advance,
    Justin

    Turns out that the program leaves metadata in your app data folder that is not removed upon uninstallation of the software.
    This is incorporated to communicate with a file that uploaded into the ftp directory when publishing pages.

  • Solution Manager does not get service definitions from SAP in self diagnosi

    Hi,
    In our production solution manager transaction solution_manager, self diagnosis we are getting a warning message on our development solution manager. 
    Solution Manager XXX does not get service definitions from SAP.
    The production Solution Manager is the master in SDCCN for the test Solution Manager.  In the test Solution Manager, the scheduled task REFRESH SERVICE DEFINITIONS has task System ID of O01.  It is pointed to RFC destination SDCC_OSS, not the production Solution Manager system.
    It gives the same warning if I point the task to the production Solution Manager system.
    Has anyone seen this before?  Any ideas?
    Best regards,
    Russ

    Hi,
      i guess have you activated SDCCN from your solution manager system too?
    if not please activate. since that setup helps solman retrive the service definitions used in SDCCN from SAP (SAPOSS).so this ultimately allows you to set solution manager system as Master, so all the satellite system get the service definition from solman and do not need a direct SAPOSS connection.
    and Please check this Note 1143775 - SAP service content update
    the wiki for trouble shoot ["EarlyWatch Alert is Red Flagged - how to resolve" |http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=228262728]
    please check.
    Thanks,
    Jansi

  • Photoshop does not open files sent from LR

    Photoshop CS6 Extended does not open files sent from Lightroom. 4.4 on Win 7. What is wrong? PS starts but instead in LR the error "Could not open Photoshop appears.

    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Photoshop does not open file sent from LR

    Photoshop CS6 Extended does not open files sent from Lightroom. 4.4 on Win 7. What is wrong? PS starts but instead in LR the error "Could not open Photoshop' appears.

    BTW, I tried moving the Editor app from the support file into the app folder per fixes on this issue in the past.

  • HT1688 Messaging does not let me move from one conversation to another without going to the contact info of the person and choosing "send a message", then I can continue the conversation. I'm sure it's a setting I have made by mistake, but can't figure it

    Messaging does not let me move from one conversation to another without going to the contact info of the person and choosing "send a message", then I can continue the conversation. I'm sure it's a setting I have made by mistake, but can't figure it out

    Hi Elaine
    Here si what I do:
    Since I tend to message with teh same people I leave the messages available to me.  If you are in one conversation with "Karen"  and want to message with "Kathy" tap the message back arrow and select Kathy.
    As always just be careful to rememeber who you are messaging to!

  • Applet does not get client certificate from browser (Firefox, IE7)

    I'm writing a web service which runs Tomcat through Apache. One critical requirement is that the service be able to invoke certain device drivers on the end user's machine. Fortunately, there is a Java API for this, so this requirement can be fulfilled using an applet.
    Here's the problem. This is a B2B application, so we're using SSL and requiring client authentication. I'm no web security guru, but I managed to get SSL set up through Apache (with a self-signed certificate for now; we'll get a real one from a real CA when we're ready to go to production). I also managed to set up client authentication by creating my own CA and generating a client certificate, which I then copied to my test client (Win XPSP2) and imported into both Firefox (2.0.0.15) and IE (6.0.2900). The applet is signed with a real certificate, and that causes no problems. And all of the pages for my web service work as expected.
    All except one. The page which is supposed to load the applet pops a dialog stating 'Identification required. Please select certificate to be used for authentication', and presents a list of zero certificates.
    Actually, I get this dialog in Firefox on my XPSP2 box, and also when I test on a Vista Home Premium box running IE 7.0.6000. Puzzlingly, this behavior does NOT occur on my XPSP2 box when running through IE 6.0. It seems that with XPSP2 and IE 6.0, the JVM can manage to obtain the required client certificate from the browser and pass it along to Apache, but the JVM can't do this when running in Firefox or in IE 7.0 on Vista.
    I have gone to the Java Control Panel and verified that the 'Use certificates and keys in browser keystore' option is selected on both boxes.
    I've done a fair amount of research for this (including in this forum) and see that this appears to be a chronic difficulty with applets. What makes it worse is that I don't think I can use the standard workaround, which is to download the applet from a different host/virtual host, because the applet needs to communicate with the web service. Since we have the additional layer of Tomcat container-managed user authentication, the applet needs to be communicating with the server using the same session token as everything else.
    So at this point, I'm stuck. Does anyone know a solution to this problem? Two thoughts (I'm reaching at straws here):
    1) I have the certificate imported in both Firefox and IE as a 'personal' certificate. Is there someplace else I can put it so the JVM will know how to find it? A rather old thread in this forum mentioned something about setting properties in the Java Control Panel, but I see no place in the JCP to specify such properties, so I'm guessing that solution is no longer operative.
    2) I'm using a trick I found on the internet to make the applet load cleanly with both Firefox and IE, namely, I'm using the <OBJECT> tag to specify the applet class and codebase for IE, and then using <COMMENT><EMBED ... /></COMMENT> within the <OBJECT> declaration to specify the information for Firefox. Is there some other way of doing the markup that will give the JVM a hint that it should get a certificate from the browser?
    BTW . . . I would hate to drop support for Firefox, but if someone has an IE-only solution, I'll take it. Unfortunately, I reckon a Firefox-only solution would not fly.
    Thanks all.

    My applet is also signed by a valid certificate. The question of whether the applet is signed/self-signed/unsigned >isn't an issue --- I just wanted you to make sure the Applet runs because it is a know valid Java2 Applet that is 100% signed properly and verified to run.
    This eliminates the possibility that it is a JVM issue. However after reading your message further I am afraid
    it is not relevant to your issue.
    due to the client authentication, my browser (Firefox, IE7) refuses to even download the applet.
    I went to your site, and I can see your applet in both Firefox and IE6. However, I don't believe your site is set up >quite like mine, because it appears I can run your applet whether I have imported your X509 certificate or not. What I >did was:If that is true we are all dead :) No I think you just missed the cert in the IE databse. It doesn't have to be in the
    Applet database to function. Surprise!
    Check your IE/tools/internet options/content tab/certificates/trusted root certification authorities.
    I then opened the Java control panel and verified that the certificate isn't listed there, either. So unless the certificate >is being cached/read from some other location (which could be, this certificate stuff is largely black magic to me), >then your server isn't requiring client authentication, either accidentally or by design.No HyperView is a valid java2 Applet and actually writes to a file "hyperview.dat" though it is probably empty.
    If you click on a component in the view and then on the view and type "dumpgobs" it shoud write out some data about the current graphics objects so you can see it has complete read/write access..
    Further it opens up a complete NIO server ands starts listening for connections on a random port
    (Echoed in your java console) You can connect to it with telnet and watch impressive ping messages all day :)
    This all goes back to a few years BTW back before there was a plugin and there was only Netscape & IE.
    There are actually 2 certificate databases and what loads where depends on which type of cert you are using. Now self signed or not doesn't matter but what does matter is the type of certificate. IE: is it RSA/DSA/Sha1
    etc. The Netscape DB was a Berkley DB and MS used whatever they use. The Cert is a DSA/Sha1 cert
    which I like the best ATM as it (X fingers it stays so) always has worked.
    Sadly that tidbit doesn't help you either I am afraid.
    What I'm trying to do is require client authentication through Apache by including the following markup in a virtual >host definition:
    SSLCACertificateFile D:/Certificates/ca.crt
    SSLVerifyClient require
    SSLVerifyDepth 1You got me there I avoid markup at all costs and only code in C java and assembler :)
    Now unless I am wrong I think you are saying that you want the Applet to push the certificate to the server
    automatically and I don't think this happens. Least I have never heard of this happening from an Applet automatically.
    On my client machine, I have a certificate which was generated using OpenSSL and the ca.crt file listed. Testing >shows that the server is requiring a certificate from the client, and the web browser is always providing it.
    The problem is that when the browser fires up the Java plugin to run an applet, there is not sufficient communication >between the browser and the plugin so that the plugin can obtain the certificate from the browser and provide it to >the server.
    So the server refuses to send the applet bytecode to the JVM, and we're stuck.In terms of implementation ease I think you may have the cart before the horse because I think it would be far easier to run an Applet in the first place to do the authentication, and then send, for example, a jar file to bootstrap and run
    (or some classes) in the event the connection is valid. Then again one never knows it all and there may be some classes which enables the plugin as you wish. I have never heard of this being done with the plugin the way you suggest.
    I am thinking maybe there is another method of doing this I do not know.
    Did you try pushing the cert via JavaScript/LIveConnect?? That way it could run before the Applet and do the authentication.
    Maybe someone else has other ideas; did you try the security forum??
    Sorry but I am afraid that is not much help.
    I did snarf this tidbit which may have some relevance
    The current fix for this bug in Mantis and 1.4.1_02 is using JSSE API, Here are the step:
    In Java control panel, Advanced tab -> Java Runtime Parameters, specify:
    -Djavax.net.ssl.keyStore=<name and path to client keystore file>
    -Djavax.net.ssl.keyStorePassword=<password to access this client keystore file>
    If it is a PKCS12 format keystore, specify:
    -Djavax.net.ssl.keyStoreType=PKCS12
    In our future JRE release 1.5, we will create our own client authentication keystore file for JPI and use that for client authentication, for detail info, please see RFE 4797512.
    Dennis
    Posted Date : 2005-07-28 19:55:50.0Good Luck!
    Sincerely:
    (T)
    Edited by: tswain on 23-Jul-2008 10:07 AM

  • Can not edit file on network shared folder after upgrading to windows 7

    Merry Christmas and happy new year,
    Due to some configuration changes on a specific application, I have forced to upgrade OS of a few number of workstations from Windows XP to windows 7. After upgrading I am facing a strange problem on WIN7 workstations. These workstation are member of a Windows
    2008 R2 Active Directory domain which also has a Windows 2003 advanced server additional domain controller. Also there are a number of shared folders on some member servers (all windows 2003) which are mapped as network drives at user logon. Before upgrading
    mentioned workstations to WIN7, users was able to edit his/her files on all of mapped network drive according to his/her permissions without any problem on their WINXP workstations, But after installing windows 7 they begin facing problem on one of these mapped
    network drives and the problem exactly is when they edit a file, in more specific word an excel file, and then try to save, the excel returns an error message of "document not saved" and exit the excel program. It becomes more strange when you learn
    that the edited excel file is disappeared and replace with some "tmp" file. If user copy the excel file to his/her own desktop, edit it and then copy it back to its original place on mapped network drive, it will be replaced normally with its older
    version. In other words if user wants to edit an excel file on that specific network drive, he/she must edits it somewhere else and then replace it on the network drive. If the same user uses a WINXP box, there will be no problem.
    Can anybody help me to fix the issue?
    TIA
    Bijan

    Thank you Karen,
    The problem is fixed, but my case was none of what you suggested. In fact I have
    another problem which I described in another question and it was of the root of this excel file issue. I describe what I have done to fix the latter problem hope to help fixing similar issues to mine.
    Okay, as it is described in the
    question, I was not able to open a shared folder with its UNC address while it could be mapped as a network drive without any problem. I examined what I was replied and some other ways, came to no result. I decided investigate a similar shared folder in
    permissions to problematic one to see if the problem is repeated. So I created a folder and shared it with similar permissions and examined it. Surprisingly there was no problem. It was wise to remove sharing of the problematic folder and share it again to
    see if the problem resist. But when I tried to remove sharing I received an error message saying that
    the shared folder is related to a DFS root. When I took a look at the DFS roots of domain there was no sign of the problematic folder (that made me recall that I created a DFS root with problematic folder mistakenly and removed that DFS root).
    After little searching, I found out that the problem could be caused by traces of the removed DFS root. Yep! I found the suspect! The registry key
    HKLM\Software\Microsoft\DFS\Domain\problematic shared folder. I removed the key restarted DFS service and log off and on and Bingo!
    This problem pops up a few more questions:
    1) Why is not the registry key related to removed DFS root deleted from the registry of windows 2003 server?
    2) Why was I able to browse this ex-DFS root shared folder without any problem in windows XP while it was problematic in windows 7?
    3) As there is no special client service for DFS and user can access DFS root targets like other shared folders what is the deference between shared resource access mechanisms in windows XP and windows 7 that caused the problem?
    Bests,
    Bijan

  • Read text file in a shared folder in another PC

    Hi All,
    Is it posible to use OPEN DATASET, READ DATASET, CLOSE DATASET to read a text file in a shared folder in a another PC (Not the Application server)
    Pradeep

    Hi pradeep,
    1. Normally any PC is restricted by username and password,
      and it may happen that folders / files are not shared on that machine.
    2. So there are two approaches, if we want to use
      OPEN DATASET commands to read file from other machine.
    a) Basis team will MAP that computer and folder
        on the application server
        at the OS Level (Unix/AIX/Windows etc)
        and that logical drive+path we can in our abap syntax
        just like we use other normal path on application server.
       This may also require the basis team to know
        the username and password of other computer for mapping purpose.
    b) Another approach is we use FTP_OPEN function modules
        and other related FTP_* Fms.
       But the pre-requisite for this is that the FTP server
        should be running on the other computer.
       Also we should know the ftp username and password for it.
    regards,
    amit m.

  • Get file list from URL/web directory

    Hey guys,
    I have created a script for After Effects that can download multiple images from URLs that are given in an array. Now ideally what I want, is to get all the filenames of the files in a certain browsable web directory to be put in an array.
    Unfortunately, I can't seem to figure out how to do this. Does someone have the knowledge here to help me out?
    Thanks in advance,
    Jorge

    This is more difficult to do than it seems. Since the files are on a remote web server, you need to find some way to get the server to divulge its local file structure, which is not something most servers will do. The absolute best way is to have control over the web server and run some server-side code (PHP, node.js, whatever) to generate the file list on the server side and then fetch it with your client/extension/script. Other than that it's almost impossible to get a 3rd party server to divulge its file structure as far as I know, mainly for security reasons. So the #1 question is: do you have control over the server/website that you're trying to fetch from or not?

  • Sender File Adapter does not get files when there is a large number ( 300)

    We are on XI 7.0 (SAPKB70015)
    We have an issue picking up a large number of files from a particular server. We are trying to pickup the files based on a wildcard e.g. test
    - we can retreive up to 200 files from the same server (using the same config) no problem
    - we can pull lots of files (>3000) files from other servers (using the same config) no problem
    - we can write an mget command (mget test) to reteive the files no problem
    So the only issue is retrieving a large number of files from a parfticular server. We see no errors in the RWB.
    To get this sorted out we need to find the exact commmands that XI executes to attempt to retrieve the files. Can anyone point me in the right direction on how to find this.
    Thanks
    Richard

    It turned out that this was caused by a limitation on the ftp server.
    The file adapter uses the dir command to get a listing of the files matching a specific mask. The dir command does not return any files if there are a large number (the ls command works fine but the file adapter uses dir instead of ls).
    sap told me that 'According to this FTP server is no compliant with RFC 959 and that is
    why DIR command returns an error.'
    We were able to get this resolved by applying a patch on the ftp server.
    Thanks
    Richard

  • (10.8) Finder.app does not update file lists and Dropbox stops syncing, could they be related?

    The Finder on three identical, brand new, iMacs does not refresh when new files are added or removed from a folder. They were all purchased about a month before the release of Mountain Lion and were upgraded upon release. The problem is intermittent, and does not affect the Spotlight or other computers viewing the filesystem remotely. Occasionally, the mini-finder will see a file when using the open command in a program.
    At the same time, the Dropbox app on one of the computers stops syncing properly (though, realistically it may be a problem on all three and I'm only noticing it on the iMac I use). The app will regularly tell me that it is fully synced, but is not uploading changes made on the local computer. This problem has persisted through versions.
    I've been unable to find information on either of these problems seperately, and I am beginning to consider that they may be related or that another application is the cause of the problem.
    What steps can I take to trying to track down the cause of these issues--I am relatively new to troubleshoot Macs?
    Some of the software that these iMacs have in common is Microsoft Office 2011, Adobe Creative Suites 6, Avast! antivirus for mac, smcfancontrol, and Dropbox.

    The basic issue with Finder is that it's ill-designed and slow to update and has been that way for years. The best way to get it to update is to OPTION-click and hold the Finder's Dock icon and select RELAUNCH.
    Then, join the crowd and File a bug report with Apple about this shortcoming..
    I know nothing about Dropbox, so can't comment on it.

  • Java could not get the TGT from cache in Linux client.

    Dear friends,
    I have set up the kerberos server and OpenLDAP in RHEL5.5. I also have a RHEL6 as a client.
    I have ran my java program using jaas to query the openldap server from the linux client.
    1) I can query the openldap server If I copy the client's keytab to the client machine and use the following configruation options
         principal=wpingli
    useKeyTab=true
    keyTab="/home/wpingli/ker/java/wpingli_new.keytab";
    2) I also can query the openldap server If I am prompted to input the user/password.
    This makes me believe that my enviroment is ok.
    But I could not be sucessful if I run the java program after the kinit command.
    klist wpingli
    [wpingli@pli java]$ klist
    Ticket cache: FILE:/tmp/krb5cc_500
    Default principal: [email protected]
    Valid starting Expires Service principal
    10/20/11 16:18:06 10/21/11 16:18:02 krbtgt/[email protected]
    jaas configuration
    GssExampleSUN{
    com.sun.security.auth.module.Krb5LoginModule required
    client=true
    debug=true
    doNotPrompt=true
    useTicketCache=true
    ticketCache="/tmp/krb5cc_500";
    Exception:
    Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt true ticketCache is /tmp/krb5cc_500 isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
    Acquire TGT from Cache
    Principal is null
    null credentials from Ticket Cache
    *[Krb5LoginModule] authentication failed*
    Unable to obtain Princpal Name for authentication
    Authentication attempt failedjavax.security.auth.login.LoginException: Unable to obtain Princpal Name for authentication
    Does anyone have idea on this problem?
    Thanks,
    Ricky

    Dear friends,
    I have set up the kerberos server and OpenLDAP in RHEL5.5. I also have a RHEL6 as a client.
    I have ran my java program using jaas to query the openldap server from the linux client.
    1) I can query the openldap server If I copy the client's keytab to the client machine and use the following configruation options
         principal=wpingli
    useKeyTab=true
    keyTab="/home/wpingli/ker/java/wpingli_new.keytab";
    2) I also can query the openldap server If I am prompted to input the user/password.
    This makes me believe that my enviroment is ok.
    But I could not be sucessful if I run the java program after the kinit command.
    klist wpingli
    [wpingli@pli java]$ klist
    Ticket cache: FILE:/tmp/krb5cc_500
    Default principal: [email protected]
    Valid starting Expires Service principal
    10/20/11 16:18:06 10/21/11 16:18:02 krbtgt/[email protected]
    jaas configuration
    GssExampleSUN{
    com.sun.security.auth.module.Krb5LoginModule required
    client=true
    debug=true
    doNotPrompt=true
    useTicketCache=true
    ticketCache="/tmp/krb5cc_500";
    Exception:
    Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt true ticketCache is /tmp/krb5cc_500 isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
    Acquire TGT from Cache
    Principal is null
    null credentials from Ticket Cache
    *[Krb5LoginModule] authentication failed*
    Unable to obtain Princpal Name for authentication
    Authentication attempt failedjavax.security.auth.login.LoginException: Unable to obtain Princpal Name for authentication
    Does anyone have idea on this problem?
    Thanks,
    Ricky

  • Get File List From webserver!

    hello !
    I want to get the list of files residing in webserver.Actually these files r image files and i want to show thumbnails of these images to the user for selection. Please Help..

    Unless the webserver is poorly secured and allows directory browsing you're not going to get it.

Maybe you are looking for

  • _sans and _serif Text Doesn't Display

    Hello, I think I might have a font problem, but don't know where to look to find out or how to fix it. Any static text box I create with _sans or _serif font chosen displays no text when I run the movie. If I choose Verdana, for example the text appe

  • Muttating in triggers

    Hi! When i move code into database from aplication i have problem with database control of muttating data. I have to call plsql procedure wich do some actions by example after updating some data. Example: create table tab (col1 Number, col2 ..., colN

  • CAN ANYONE HELP ME WITH LOGIC EXPRESS 7

    I have just installed logic express 7 on my mac but for some reason none of the MIDI sounds are playing back through my speakers after i have made them in the matrix edit window. i know the program is playing the MIDI sounds because it is showing the

  • Where is Device Central that exist in CS5 in Cs6 ?

    in Adobe Flash Cs5 there is Device central to choose and test Air android with different resolution and brand but i cant find this on Flash CS6 !! so how can i test my Air 3.2 project in various resolutions and devices ??

  • How to Send 'CC' in Email

    <i><b>Hello,        I am sending mail from SAP. it works well. But I like to send CC mail apart from To address. Please give Ur suggestions in this regard. Thanks, Senthil</b></i>