Acrobat showing wrong file

I'm using OSX Mountain Lion with Acrobat Pro X (10.1.3) and when I double click on a PDF attachment in mail, Acrobat shows me the wrong file.  If I let PREVIEW open the attachment it is correct, or if I download the attachment and have Acrobat open it is correct.
Its almost like Acrobat has cached the attachment by name and as this matches a previous file name that is the version that is always shown.   Is there a "clear cache" setting or something to resolve this?

I agree. It would appear that you may be depending on the Acrobat URL recognition, rather than having entered the URL in the link tool.

Similar Messages

  • Iphoto showing wrong file size and length for movie after upgrade

    in iphoto, an AVI from my camera is shown as being 1:04 long and 76 MB. but playing the file shows it is 9 seconds long, and Finder shows the file as being 10 MB.
    a bit more about this file: I shot the video with my still camera and imported it. on the camera, I then edited it down from 1:04 to 0:09, and reimported it. both files were in my iphoto library before upgrading to iphoto '08; iphoto saw they had different lengths and did not consider them duplicates.
    now, I see only one file with the time of 1:04 (the original length) and it plays the edited version. while I would prefer to have both versions, as I did before, I would more like to know why iphoto is showing the wrong information for a file the was fine in the previous version of iphoto.

    in iphoto, an AVI from my camera is shown as being 1:04 long and 76 MB. but playing the file shows it is 9 seconds long, and Finder shows the file as being 10 MB.
    a bit more about this file: I shot the video with my still camera and imported it. on the camera, I then edited it down from 1:04 to 0:09, and reimported it. both files were in my iphoto library before upgrading to iphoto '08; iphoto saw they had different lengths and did not consider them duplicates.
    now, I see only one file with the time of 1:04 (the original length) and it plays the edited version. while I would prefer to have both versions, as I did before, I would more like to know why iphoto is showing the wrong information for a file the was fine in the previous version of iphoto.

  • Adobe Acrobat showing wrong strange signs

    Hi all.
    Using Adobe Acrobat Pro ver. 9.4.0 on Windows XP.
    It happens that opening a pdf file (but not all files) it shows some strange signs in spite of stress marked letters or apostrophe all along the text.
    Any equal experience and solution?
    Thanks in advance.

    Hi thanks.
    It seems it's so, because pressing Ctrl+D it shows I have some recognised fonts (it says me the exact name) and others with the indication subsystem embedded with a number (eg TTE1768338t00) , saying that Type: TrueType and Codification: personalized; which way to solve?
    Hi

  • Jdev 10.1.3. Application Sources shows wrong files

    Hi,
    I've been using jdev 10.1.2 for long time and decided to give 10.1.3 a try. The new way project files are handled is quite frustrating (I read the technical paper on upgrading from 10.1.2...) I hope these are all bugs which will be fixed!
    Here are my problems:
    * in Application Sources I see files which are outside the Java Content I defined. It seems that JDev 10.1.3 picks all .class files in the HTML Root Directory and presents them as "sources" (which they obviously are not!). Those files are not visible under Web Content. Why?
    * I wanted to exclude a subfolder from the Java Content in one of my projects but nothing happened. The same worked with some of the other projects (I did click Refresh)
    * Clicking Refresh freezes Jdev for considerable amount of time. My PC is one of the fastest on the market!
    * some files on the Resource path and outside the Java Content path, like TOAD .pkb and .pks show up as Application Sources (wrong!), other like .sql show as Resources (correct!). All are on the same path - the one defined as Resource. why?
    * there is no way to exclude directories from the Web Application content.
    Any comments would be appreciated! Shall I open a TAR?
    Regards,
    Plamen

    I found the problem. My application uses a custom faces taglib. In Jdev you can specify wich tag in your library should execute in design time. I was rendering 3 tags, and forget that I modified one of these tags. This tag now renders dynamic content and it seems that JDeveveloper don't display the rest of a page (in design time) when it tries to display a tag that has dynamic content that is unavailable. In my case, I access the requestScope to get the username.
    I hope this can be useful for you.
    Victor Quan.

  • Custom document library showing wrong file type icon

    Hi All - I have a custom document library created using VS code. In search result if any document appear from that library it shows web page icon.
    I found this below url for this issue:
    http://www.neilrichards.net/sharepoint/missing-document-icons-from-search-results-with-fast-for-sharepoint/comment-page-1#comment-1043
    I don't want to write custom pipe line and I also don't want to hard code file types in XSLT. 
    Is there any solution to change content class?
    There is difference in contentclass in source XML.
    for 
    <imageurl imageurldescription="Image">/_layouts/images/imageresult_16x16.png</imageurl>
    <contentclass>STS_ListItem_DocumentLibrary</contentclass>
     icon is displayed correctly.
    for
     <imageurl imageurldescription="List Item">/_layouts/images/STS_ListItem16.gif</imageurl>
    <contentclass>STS_ListItem_10623</contentclass>
    Icon is displayed wrong.

    yeah its problem with library, But how to fix this?.
    http://www.neilrichards.net/sharepoint/missing-document-icons-from-search-results-with-fast-for-sharepoint/comment-page-1#comment-1043

  • Problem With Elements 10 Organizer Showing Wrong Files in Folders (In Folder View)

    I just got started using Elements 10 on Windows XP and have had some problems with the Organizer. Once it was installed and had cataloged all my photos, I made sure to only move files and folders to different locations from within Organizer. However, now it seems to have lost track of which photos are in which folder. It will "remember" that there are 3 photos in a folder (in Folder View) and only show three photos in that folder, but they will be 3 random photos from a different location. Opening that item shows that thumbnail and referenced file are the same, so it isn't just a thumbnail problem. And looking in the actual folder with Windows Explorer shows that right photos. I'm not sure if I should run an Optimize or Repair on the catalog or if there is something else I can do to fix the problem. I don't need to use Folder View too often, but sometimes I do and I use it to reorganize the actual locations of files. Not sure what would happen if I did it now (with the obvious catalog confusion).
    Any thoughts?
    Thanks,
    torreyindy

    Image size.  I have been scanning old 35mm images.  Any image greater than about 8100 pixels causes thumbnails to fail - this sounds like being around 2 to the power of 23 but what a really odd combinatin that is.
    8100 pixels? All of my photos are larger than that, and I don't have this problem. Do you mean 8100 pixels on a side? There is a known limitation in PSE that photos above a certain pixel size on a side cannot be displayed in the Organizer. I no longer remember what that size is, perhaps someone else can chime in. Scanning your images to be 8100 pixels on a side would be overkill for me; however maybe for you its an important thing to do.
    I have about 10,000 photos in the catalog but need to load up about another 5,000 historic images, and we take about 1,500 images per annum.
    This is not a problem for PSE.
    I have played with databases, so if i can get into the organizer database (at least to do backups), ideally with Access, that would be brilliant.  Any suggestions?
    If you are going to play with the database through Acess, I think you will fail. I believe that PSE uses SQLite as its database, so you have to use SQLite to view the contents. If you are going to do this, work only on a copy of the database. As this is a long-standing bug in PSE (since at least PSE6), and no one that I know of has found a workaround, and people have reported that the rest of PSE behaves as if the photos are where they are expected to be, my guess is that the bug is in the way PSE displays the photo location in folders. And if that's the case, that the database is correct and its only the display that is incorrect, then there's really nothing you can do to fix that; monkeying around with the database itself won't help.
    whereas I had complete confidence in Adobe products being a long time Photoshop fan, I am now taken aback, so any help would be much appreciated.
    I agree with you, this is a shame that PSE has this problem and it has gone unfixed since PSE6. Your choices are:
    use tags and captions and notes to organize in Thumbnail view, and not use Folder Location View
    stop using Organizer, use your operating system to browse your folders, only use the PSE Editor
    switch to Lightroom, which has a quality Organizer (called the "Library Module") that doesn't seem to have this particular bug, and in general seems very solid, behaves well and is relatively bug free. (Lightroom 3 currently on sale in the vicinity of $79 (USD) as the anticipation is that Lightroom 4 will be released soon)
    switch to other organizing software, there are many, but I make no recommendations as I have tried only PSE and Lightroom

  • Firefox for Mac preferences shows .qif file format for quicken as "quicktime image format"-wrong application and won't let me select anything else

    Post to Firefox forum; Oct.2011
    Re: Quicken 2007; Mac OS 10.5
    Problem: can’t import or download Qif format files into quicken from bofa or Chase. Mac can’t recognize; how do I set preferences in Firefox (or Safari).
    https://support.mozilla.com/en-US/questions/new?product=desktop&category=d1&search=Firefox+for+Mac+preferences+shows+.qif+file+format+for+quicken+as+%22quicktime+image+format%22-wrong+application+and+won%27t+let+me+select+anything+else&showform=1
    Hello,
    I previously used Firefox on my old Mac G4 with OS 10.3.9; the above issue existed with that system and Firefox 2.00.2 (or similar). I then "tried" to move to a G5 Mac with OS 10.5, hoping that an updated Mac Operating system and updating Firefox would solve that problem.
    I'm now working on my son's MacBook Pro, OS 10.5.8, 2.4 ghz Intel Core 2 Duo; 2gb Memory; 2 gb 667 Mhz DDR2 SDRAM.
    I still have a problem in Firefox Preferences trying to download .qif files. BofA Mortgage accounts only allow downloading of .qif files. My .qfx download works fine, but the error message is as follows:
    The error message is that this is a corrupted file or one that Preview doesn't recognize.
    and it is still a problem when trying to download Quicken .qif format files for our B of A mortgage.
    The preferences for Firefox under File Helpers won't let me name the extension I want; instead, it CONFUSES .qif (Quicken Interchange Format) with .qtif (Quicktime Image Format) for Mac.
    Therefore, when I download .qif files and try to import them to Quicken, I get a message that this is a corrupted file:
    thanks for any help.
    Val in Seattle

    Well, in the end, I just gave up and deleted the photos, in the hope that it was something to do with them. Took some more photos and they seem to have imported without any problems at all.
    Given that the same irksome photos loaded on the wife's macbook without so much as a murmur, how weird is that?
    Still- all's well that ends well. Thanks for the suggestions- much appreciated.
    Matt

  • The "Today" row shows wrong date in file choosers (All my files favorite)

    1- I edit and save a document (e.g., a word doc)
    2- I try to attach that file in Mail.app or upload it through Safari.
    3- When the file chooser opens (in safari or Mail.app) I select "All my files" and sort by "Date last modified".
    4- The Today row does not show my file. Instead it shows files that where last modified the day I last opened Safari (or mail.app).
    5- If I close Safari (or Mail.app) the Today row updates.
    Any suggestions on how to solve this issue?

    When viewing files in All My Files view, date last opened is not updating properly ever since Yosemite installed.  In Mt. Lion did not occur.  Since the Yosemite install - we've tried opening many different pages & preview files, same thing occurs.  I've had 4 appointments at Genius Bar about this and no one has figured out a fix.  Genius Bar already re-installed Yosemite and bug still there.  Last thing Genius Bar was going to do today was a Manual Migration of data (see my repair history) - but when I came to check in, Genius Bar person found your post dated 2 days ago with identical situation.

  • Itunes points to wrong files - points to random system files instead of mp3

    I noticed this about a year and a half ago when my ipod would have an error that some of the files couldnt be transfrered. Upon further inspection, it seems itunes occasionally gets confused about where files are located. The files will look fine in itunes but wont play. If I right click on them and chose "show in finder" the file that should be an mp3 in my library, is actually pointed at ical/contents/resources/italian.Ipoj/iCal Help/gfx/priority.gif
    Which is totally bonkers. It's a totally random operating file.
    Now I could go in and delete and re-import these files. Eventually that is what I have ended up doing in the past. But now it's happened to about 700 files (out of about 18,000) and it would take a century for me to go through each track and find out which ones that has happened to.
    I know there are some applescripts out there for missing and dead tracks, but I can't seem to find one that just checks that we're pointing to the CORRECT file. keep in mind, these correct files actually are where they are supposed to be. Itunes is just linking to the wrong files.
    Message was edited by: James Campbell

    I am experiencing the same problem and after restoring from backup I either still have some wrong pointers or the problem is returning.
    One way to find out which tracks are pointing to random files is to sync your whole music library either in one go if it's small enough or in parts to an iphone or ipod. You will then get a dialog with all the files that won't play on the device.
    How do I relink them manually? Can't work it out.

  • LR 5.3 showing wrong thumbnails

    I have been running LR 5.3 smoothly for a while but a couple of minutes ago LR started to show wrong thumbnails, it shows thumbnails from a delete Snapshot. I have tried purging my cache but nothing happens. I have upgraded from LR 3 to LR 3.5  Ideas ? This is my system:
    Lightroom version: 5.3 [938183]
    Operating system: Windows 7 Home Premium Edition
    Version: 6.1 [7601]
    Application architecture: x64
    System architecture: x64
    Logical processor count: 2
    Processor speed: 1.9 GHz
    Built-in memory: 3003.1 MB
    Real memory available to Lightroom: 3003.1 MB
    Real memory used by Lightroom: 912.9 MB (30.4%)
    Virtual memory used by Lightroom: 901.7 MB
    Memory cache size: 364.0 MB
    Maximum thread count used by Camera Raw: 2
    System DPI setting: 96 DPI
    Desktop composition enabled: Yes
    Displays: 1) 1366x768
    Application folder: C:\Program Files\Adobe\Adobe Photoshop Lightroom 5.3
    Library Path: C:\Users\User\Pictures\Lightroom\Lightroom 5 Catalog.lrcat
    Settings Folder: C:\Users\User\AppData\Roaming\Adobe\Lightroom
    Installed Plugins:
    1) 500px
    2) Behance
    3) Canon Tether Plugin
    4) Facebook
    5) Flickr
    6) Leica Tether Plugin
    7) Nikon Tether Plugin
    8) SmugMug
    Config.lua flags: None
    Adapter #1: Vendor : 8086
        Device : 2a42
        Subsystem : 360b103c
        Revision : 7
        Video Memory : 64
    AudioDeviceIOBlockSize: 1024
    AudioDeviceName: Speakers (Conexant High Definition SmartAudio 221)
    AudioDeviceNumberOfChannels: 2
    AudioDeviceSampleRate: 44100
    Build: LR5x89
    CardID: 10818
    Direct2DEnabled: false
    GPUDevice: D3D
    MaxTexture2DSize: 8192
    OGLEnabled: true
    Renderer: Mobile Intel(R) 4 Series Express Chipset Family
    ShaderModel: 10.0
    Vendor: Intel
    VendorID: 32902
    Version: 8086:2a42:360b103c:0007

    I have had this problem also ever since I updated to 5.3,  I think it is a major bug!
    At random the preview window on the left doesnt show the preview of the presets anymore when I hover them, and when I click back and forth to other images it suddenly starts working again, its a very annoying problem and I cannot believe that Adobe isnt aware of it yet!
    Marcel

  • How to show FTP Files in JTable, i gave codeeeee

    hi to all,
    plz any one can help me to show FTP Files in JTable, my FTP code is below,where i can upload and download files, i can list the files in JText Area , i want to show files in JTable, plz any on can post some code which can slove my problem
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class CFtp
       static final boolean debug = false;
       public static final int FTP_PORT = 21;
       static int FTP_UNKNOWN = -1;
       static int FTP_SUCCESS = 1;
       static int FTP_TRY_AGAIN = 2;
       static int FTP_ERROR = 3;
       static int FTP_NOCONNECTION = 100;
       static int FTP_BADUSER = 101;
       static int FTP_BADPASS = 102;
       public static int FILE_GET = 1;
       public static int FILE_PUT = 2;
       /** socket for data transfer */
       private Socket      dataSocket            = null;
       private boolean     replyPending       = false;
       private boolean     binaryMode            = false;
       private boolean     passiveMode            = false;
         private boolean     m_bGettingFile     = false;
       /** user name for login */
       String  user = null;
       /** password for login */
       String  password = null;
       /** last command issued */
       public String  command;
       /** The last reply code from the ftp daemon. */
       int lastReplyCode;
       /** Welcome message from the server, if any. */
       public  String       welcomeMsg;
       /** Array of strings (usually 1 entry) for the last reply
           from the server. */
       protected   Vector    serverResponse = new Vector(1);
       /** Socket for communicating with server. */
       protected Socket    serverSocket = null;
       /** Stream for printing to the server. */
       public PrintWriter  serverOutput;
       /** Buffered stream for reading replies from server. */
       public InputStream  serverInput;
       /* String to hold the file we are up/downloading */
       protected String strFileNameAndPath;
       protected String m_strSource;
       protected String m_strDestination;
       public void setFilename( String strFile )  {
            strFileNameAndPath = strFile;
       String getFileName()  {
            return strFileNameAndPath;
       public void setSourceFile(String strSourceFile)  {
          m_strSource = strSourceFile;
       public void setDestinationFile(String strDestinationFile)   {
          m_strDestination = strDestinationFile;
       public String getSourceFile()  {
          return m_strSource;
       public String getDestinationFile()  {
          return m_strDestination;
       void getCurrentDirectory()  {
         // return CSystem.getCurrentDir();
       /** Return server connection status */
       public boolean serverIsOpen()  {
          return serverSocket != null;
          /**Set Passive mode Trasfers*/
         public void setPassive(boolean mode)  {
            passiveMode = mode;
       public int readServerResponse() throws IOException  {
          StringBuffer    replyBuf = new StringBuffer(32);
          int             c;
          int             continuingCode = -1;
          int             code = -1;
          String          response;
          try  {
                while (true)  {
                   while ((c = serverInput.read()) != -1)  {
                                if (c == '\r')  {
                                       if ((c = serverInput.read()) != '\n')  {
                                            replyBuf.append('\r');
                                  replyBuf.append((char)c);
                                  if (c == '\n')
                                       break;
                             response = replyBuf.toString();
                             replyBuf.setLength(0);
                   try  {
                      code = Integer.parseInt(response.substring(0, 3));
                         catch (NumberFormatException e)  {
                    code = -1;
                         catch (StringIndexOutOfBoundsException e)  {
                      /* this line doesn't contain a response code, so
                      we just completely ignore it */
                      continue;
                   serverResponse.addElement(response);
                   if (continuingCode != -1)  {
                      /* we've seen a XXX- sequence */
                      if (code != continuingCode || (response.length() >= 4 && response.charAt(3) == '-'))  {
                         continue;
                              else  {
                         /* seen the end of code sequence */
                         continuingCode = -1;
                         break;
                         else if (response.length() >= 4 && response.charAt(3) == '-')  {
                      continuingCode = code;
                      continue;
                         else  {
                      break;
             catch(Exception e)  {
                  e.printStackTrace();
              if (debug)  {
              //     CSystem.PrintDebugMessage("readServerResponse done");
          return lastReplyCode = code;
       /** Sends command <i>cmd</i> to the server. */
       public void sendServer(String cmd)  {
          if (debug)  {
              //       CSystem.PrintDebugMessage("sendServer start");
          serverOutput.println(cmd);
          if (debug)  {
           //  CSystem.PrintDebugMessage("sendServer done");
       /** Returns all server response strings. */
       public String getResponseString()  {
          String s = new String();
          for(int i = 0;i < serverResponse.size();i++)  {
             s+=serverResponse.elementAt(i);
          serverResponse = new Vector(1);
          return s;
       public String getResponseStringNoReset()  {
          String s = new String();
          for(int i = 0;i < serverResponse.size();i++)  {
             s+=serverResponse.elementAt(i);
          return s;
       * issue the QUIT command to the FTP server and close the connection.
       public void closeServer() throws IOException  {
          if (serverIsOpen())  {
             issueCommand("QUIT");
                   if (! serverIsOpen())  {
                      return;
             serverSocket.close();
             serverSocket = null;
             serverInput = null;
             serverOutput = null;
       protected int issueCommand(String cmd) throws IOException  {
          command = cmd;
          int reply;
          if (debug)  {
           //  CSystem.PrintDebugMessage(cmd);
          if (replyPending)  {
             if (debug)  {
                   //     CSystem.PrintDebugMessage("replyPending");
             if (readReply() == FTP_ERROR)  {
                System.out.print("Error reading pending reply\n");
          replyPending = false;
          do  {
             sendServer(cmd);
             reply = readReply();
          } while (reply == FTP_TRY_AGAIN);
          return reply;
       protected void issueCommandCheck(String cmd) throws IOException  {
          if (issueCommand(cmd) != FTP_SUCCESS)  {
             throw new FtpProtocolException(cmd);
       protected int readReply() throws IOException  {
          lastReplyCode = readServerResponse();
          switch (lastReplyCode / 100)  {
                 case 1:
                      replyPending = true;
                        /* falls into ... */
                 case 2://This case is for future purposes. If not properly used, it might cause an infinite loop.
                   //Don't add any code here , unless you know what you are doing.
                 case 3:
                      return FTP_SUCCESS;
             case 5:
                      if (lastReplyCode == 530)  {
                             if (user == null)  {
                                  throw new FtpLoginException("Not logged in");
                           return FTP_ERROR;
                        if (lastReplyCode == 550)  {
                             if (!command.startsWith("PASS"))  {
                                  throw new FileNotFoundException(command);
                   else  {
                                  throw new FtpLoginException("Error: Wrong Password!");
             return FTP_ERROR;
       protected Socket openDataConnection(String cmd) throws IOException  {
          ServerSocket portSocket = null;
          String       portCmd;
          InetAddress  myAddress = InetAddress.getLocalHost();
          byte         addr[] = myAddress.getAddress();
          int          shift;
          String       ipaddress;
          int          port = 0;
          IOException  e;
              if (this.passiveMode)  {
         //          CSystem.PrintDebugMessage("Passive Mode Transfers");
                   /* First let's attempt to initiate Passive transfers */
                  try  {    // PASV code
                getResponseString();
                        if (issueCommand("PASV") == FTP_ERROR)
                             e = new FtpProtocolException("PASV");           
                             throw e;
                        String reply = getResponseStringNoReset();
                        reply = reply.substring(reply.indexOf("(")+1,reply.indexOf(")"));
                        StringTokenizer st = new StringTokenizer(reply, ",");
                        String[] nums = new String[6];
                        int i = 0;
                   while(st.hasMoreElements())
                        try
                             nums[i] = st.nextToken();
                             i++;
                        catch(Exception a)
                             a.printStackTrace();
                   ipaddress = nums[0]+"."+nums[1]+"."+nums[2]+"."+nums[3];
                   try
                        int firstbits = Integer.parseInt(nums[4]) << 8;
                        int lastbits = Integer.parseInt(nums[5]);
                        port = firstbits + lastbits;
                   catch(Exception b)
                        b.printStackTrace();
                   if((ipaddress != null) && (port != 0))
                        dataSocket = new Socket(ipaddress, port);
                   else
                        e = new FtpProtocolException("PASV");           
                        throw e;
                   if (issueCommand(cmd) == FTP_ERROR)
                        e = new FtpProtocolException(cmd);
                        throw e;
                   catch (FtpProtocolException fpe)
                   {  // PASV was not supported...resort to PORT
                        portCmd = "PORT ";
                        /* append host addr */
                        for (int i = 0; i < addr.length; i++)
                             portCmd = portCmd + (addr[i] & 0xFF) + ",";
                   /* append port number */
                   portCmd = portCmd + ((portSocket.getLocalPort() >>> 8) & 0xff) + ","
                        + (portSocket.getLocalPort() & 0xff);
                 if (issueCommand(portCmd) == FTP_ERROR) {
                     e = new FtpProtocolException("PORT");
                     portSocket.close();
                     throw e;
                   if (issueCommand(cmd) == FTP_ERROR) {
                        e = new FtpProtocolException(cmd);
                        portSocket.close();
                        throw e;
                   dataSocket = portSocket.accept();      
                   portSocket.close();
              }//end if passive
              else 
                   {  //do a port transfer
                   //     CSystem.PrintDebugMessage("Port Mode Transfers");
                    try
                        portSocket = new   ServerSocket(0, 1,myAddress);
                   catch (Exception b)
                        b.printStackTrace();
              portCmd = "PORT ";
              /* append host addr */
              for (int i = 0; i < addr.length; i++) {
                portCmd = portCmd + (addr[i] & 0xFF) + ",";
              /* append port number */
              portCmd = portCmd + ((portSocket.getLocalPort() >>> 8) & 0xff) + ","
                    + (portSocket.getLocalPort() & 0xff);
              if (issueCommand(portCmd) == FTP_ERROR) {
                e = new FtpProtocolException("PORT");           
                portSocket.close();
                throw e;
              if (issueCommand(cmd) == FTP_ERROR) {
                e = new FtpProtocolException(cmd);
                portSocket.close();
                throw e;
              dataSocket = portSocket.accept();      
              portSocket.close();
            }//end of port transfer
            return dataSocket;     // return the dataSocket
        /** open a FTP connection to host <i>host</i>. */
        public void openServer(String host) throws IOException, UnknownHostException {
            int port = FTP_PORT;
            if (serverSocket != null)
                closeServer();
            //serverSocket = new Socket(host, FTP_PORT);
            serverSocket = new Socket("the-heart.com", FTP_PORT);
            serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),true);
            serverInput = new BufferedInputStream(serverSocket.getInputStream());
        /** open a FTP connection to host <i>host</i> on port <i>port</i>. */
        public void openServer(String host, int port) throws IOException, UnknownHostException {
            if (serverSocket != null)
                closeServer();
            serverSocket = new Socket(host, port);
            //serverSocket.setSoLinger(true,30000);
            serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),
                                           true);
            serverInput = new BufferedInputStream(serverSocket.getInputStream());
            System.out.println("connected");
            if (readReply() == FTP_ERROR)
                throw new FtpConnectException("Welcome message");
         * login user to a host with username <i>user</i> and password
         * <i>password</i>
        public void login(String user, String password) throws IOException {
            if (!serverIsOpen())
                throw new FtpLoginException("Error: not connected to host.\n");
           this.user = user;
            this.password = password;
            System.out.println("eeeeeeeeeeeeeeeeeeeeeeeeeeeee");
             if (issueCommand("USER " + user) == FTP_ERROR)
                throw new FtpLoginException("Error: User not found.\n");
            if (password != null && issueCommand("PASS " + password) == FTP_ERROR)
                throw new FtpLoginException("Error: Wrong Password.\n");
         * login user to a host with username <i>user</i> and no password
         * such as HP server which uses the form "<username>/<password>,user.<group>
        public void login(String user) throws IOException
            if (!serverIsOpen())
                throw new FtpLoginException("not connected to host");
            this.user = user;
            if (issueCommand("USER " + user) == FTP_ERROR)
                throw new FtpLoginException("Error: Invalid Username.\n");                
        /** GET a file from the FTP server in Ascii mode*/
        public BufferedReader getAscii(String filename) throws IOException
            m_bGettingFile = true;
            Socket  s = null;
            try  {
              s = openDataConnection("RETR " + filename);
                catch (FileNotFoundException fileException)  {
               throw new FileNotFoundException();
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        /** GET a file from the FTP server in Binary mode*/
        public BufferedInputStream getBinary(String filename) throws IOException
            m_bGettingFile = true;
            Socket  s = null;
            try  {
              s = openDataConnection("RETR " + filename);
              catch (FileNotFoundException fileException)  {
               throw new FileNotFoundException();
            return new BufferedInputStream(s.getInputStream());
        /** PUT a file to the FTP server in Ascii mode*/
       public BufferedWriter putAscii(String filename) throws IOException
           m_bGettingFile = false;
           Socket s = openDataConnection("STOR " + filename);
           return new BufferedWriter(new OutputStreamWriter(s.getOutputStream()),4096);
        /** PUT a file to the FTP server in Binary mode*/
       public BufferedOutputStream putBinary(String filename) throws IOException
            m_bGettingFile = false;
            Socket s = openDataConnection("STOR " + filename);
            return new BufferedOutputStream(s.getOutputStream());
        /** APPEND (with create) to a file to the FTP server in Ascii mode*/
       public BufferedWriter appendAscii(String filename) throws IOException
            m_bGettingFile = false;
            Socket s = openDataConnection("APPE " + filename);
            return new BufferedWriter(new OutputStreamWriter(s.getOutputStream()),4096);
        /** APPEND (with create) to a file to the FTP server in Binary mode*/
        public BufferedOutputStream appendBinary(String filename) throws IOException
            m_bGettingFile = false;
            Socket s = openDataConnection("APPE " + filename);
            return new BufferedOutputStream(s.getOutputStream());
       /** NLIST files on a remote FTP server */
        public BufferedReader nlist() throws IOException
            Socket s = openDataConnection("NLST");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        /** LIST files on a remote FTP server */
        public BufferedReader list() throws IOException
            Socket s = openDataConnection("LIST");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        public BufferedReader ls() throws IOException
            Socket s = openDataConnection("LS");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        public BufferedReader dir() throws IOException
            Socket s = openDataConnection("DIR");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        /** CD to a specific directory on a remote FTP server */
        public void cd(String remoteDirectory) throws IOException
            issueCommandCheck("CWD " + remoteDirectory);
        public void cwd(String remoteDirectory) throws IOException
            issueCommandCheck("CWD " + remoteDirectory);
        /** Rename a file on the remote server */
        public void rename(String oldFile, String newFile) throws IOException
             issueCommandCheck("RNFR " + oldFile);
             issueCommandCheck("RNTO " + newFile);
        /** Site Command */
        public void site(String params) throws IOException
             issueCommandCheck("SITE "+ params);
        /** Set transfer type to 'I' */
        public void binary() throws IOException
            issueCommandCheck("TYPE I");
            binaryMode = true;
        /** Set transfer type to 'A' */
        public void ascii() throws IOException
            issueCommandCheck("TYPE A");
            binaryMode = false;
        /** Send Abort command */
        public void abort() throws IOException
            issueCommandCheck("ABOR");
        /** Go up one directory on remots system */
        public void cdup() throws IOException
            issueCommandCheck("CDUP");
        /** Create a directory on the remote system */
        public void mkdir(String s) throws IOException
            issueCommandCheck("MKD " + s);
        /** Delete the specified directory from the ftp file system */
        public void rmdir(String s) throws IOException
            issueCommandCheck("RMD " + s);
        /** Delete the file s from the ftp file system */
        public void delete(String s) throws IOException
            issueCommandCheck("DELE " + s);
        /** Get the name of the present working directory on the ftp file system */
        public void pwd() throws IOException
          issueCommandCheck("PWD");
        /** Retrieve the system type from the remote server */
        public void syst() throws IOException
          issueCommandCheck("SYST");
        /** New FTP client connected to host <i>host</i>. */
       public CFtp(String host) throws IOException
          openServer(host, FTP_PORT);
        /** New FTP client connected to host <i>host</i>, port <i>port</i>. */
       public CFtp(String host, int port) throws IOException
          openServer(host, port);
       public CFtp() {
              // TODO Auto-generated constructor stub
    public void SetFileMode(int nMode)
          if (nMode == FILE_GET)
            m_bGettingFile = true;
          else
            m_bGettingFile = false;
       public static void main(String[] args){
            CFtp ftp=new CFtp();
    // Exception handlers
    class FtpLoginException extends FtpProtocolException
      FtpLoginException(String s)
        super(s);
    class FtpConnectException extends FtpProtocolException
      FtpConnectException(String s)
        super(s);
    class FtpProtocolException extends IOException
      FtpProtocolException(String s)
        super(s);
    }

    It's jakarta :)
    The jakarta class:
    /* <!-- in case someone opens this in a browser... --> <pre> */
    import org.apache.commons.net.ftp.*;
    import java.util.Vector;
    import java.io.*;
    import java.net.UnknownHostException;
    /** This is a simple wrapper around the Jakarta Commons FTP
      * library. I really just added a few convenience methods to the
      * class to suit my needs and make my code easier to read.
      * <p>
      * If you want more information on the Jakarta Commons libraries
      * (there is a LOT more you can do than what you see here), go to:
      *          http://jakarta.apache.org/commons
      * <p>
      * This Java class requires both the Jakarta Commons Net library
      * and the Jakarta ORO library (available at http://jakarta.apache.org/oro ).
      * Make sure you have both of the jar files in your path to compile.
      * Both are free to use, and both are covered under the Apache license
      * that you can read on the apache.org website. If you plan to use these
      * libraries in your applications, please refer to the Apache license first.
      * While the libraries are free, you should double-check to make sure you
      * don't violate the license by using or distributing it (especially if you use it
      * in a commercial application).
      * <p>
      * Program version 1.0. Author Julian Robichaux, http://www.nsftools.com
      * @author Julian Robichaux ( http://www.nsftools.com )
      * @version 1.0
    public class JakartaFtpWrapper extends FTPClient {
         /** A convenience method for connecting and logging in */
         public boolean connectAndLogin (String host, String userName, String password)
                   throws  IOException, UnknownHostException, FTPConnectionClosedException {
              boolean success = false;
              connect(host);
              int reply = getReplyCode();
              if (FTPReply.isPositiveCompletion(reply))
                   success = login(userName, password);
              if (!success)
                   disconnect();
              return success;
         /** Turn passive transfer mode on or off. If Passive mode is active, a
           * PASV command to be issued and interpreted before data transfers;
           * otherwise, a PORT command will be used for data transfers. If you're
           * unsure which one to use, you probably want Passive mode to be on. */
         public void setPassiveMode(boolean setPassive) {
              if (setPassive)
                   enterLocalPassiveMode();
              else
                   enterLocalActiveMode();
         /** Use ASCII mode for file transfers */
         public boolean ascii () throws IOException {
              return setFileType(FTP.ASCII_FILE_TYPE);
         /** Use Binary mode for file transfers */
         public boolean binary () throws IOException {
              return setFileType(FTP.BINARY_FILE_TYPE);
         /** Download a file from the server, and save it to the specified local file */
         public boolean downloadFile (String serverFile, String localFile)
                   throws IOException, FTPConnectionClosedException {
              FileOutputStream out = new FileOutputStream(localFile);
              boolean result = retrieveFile(serverFile, out);
              out.close();
              return result;
         /** Upload a file to the server */
         public boolean uploadFile (String localFile, String serverFile)
                   throws IOException, FTPConnectionClosedException {
              FileInputStream in = new FileInputStream(localFile);
              boolean result = storeFile(serverFile, in);
              in.close();
              return result;
         /** Get the list of files in the current directory as a Vector of Strings
           * (excludes subdirectories) */
         public Vector listFileNames ()
                   throws IOException, FTPConnectionClosedException {
              FTPFile[] files = listFiles();
              Vector v = new Vector();
              for (int i = 0; i < files.length; i++) {
                   if (!files.isDirectory())
                        v.addElement(files[i].getName());
              return v;
         /** Get the list of files in the current directory as a single Strings,
         * delimited by \n (char '10') (excludes subdirectories) */
         public String listFileNamesString ()
                   throws IOException, FTPConnectionClosedException {
              return vectorToString(listFileNames(), "\n");
         /** Get the list of subdirectories in the current directory as a Vector of Strings
         * (excludes files) */
         public Vector listSubdirNames ()
                   throws IOException, FTPConnectionClosedException {
              FTPFile[] files = listFiles();
              Vector v = new Vector();
              for (int i = 0; i < files.length; i++) {
                   if (files[i].isDirectory())
                        v.addElement(files[i].getName());
              return v;
         /** Get the list of subdirectories in the current directory as a single Strings,
         * delimited by \n (char '10') (excludes files) */
         public String listSubdirNamesString ()
                   throws IOException, FTPConnectionClosedException {
              return vectorToString(listSubdirNames(), "\n");
         /** Convert a Vector to a delimited String */
         private String vectorToString (Vector v, String delim) {
              StringBuffer sb = new StringBuffer();
              String s = "";
              for (int i = 0; i < v.size(); i++) {
                   sb.append(s).append((String)v.elementAt(i));
                   s = delim;
              return sb.toString();
    and then there is the jar file:
    http://jakarta.apache.org/site/downloads/
    so for the wrapper.listfiles() you have to declare the wrapper as JakartaFtpWrapper.

  • NullPointerException while uploading wrong file in af:inputfile

    Hi All,
    I am uploading excel sheet data into jspx Page(database table) by using af:inputFile.After uploading file af:inputFile need to be refresh.It is getting refresh for right file(excel file),but it is not refreshing for wrong file upload.
    it showing following error.
    UIComponent is null
    ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #2
    i had refer frank's blog https://blogs.oracle.com/jdevotnharvest/entry/how_to_reset_adf_faces.
    Could any one help on this!!
    Thanks in advance!!

    here is my jspx source code.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:h="http://java.sun.com/jsf/html">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document title="ExcelToTable.jspx" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1" usesUpload="true">
    <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx" id="pt1">
    <f:facet name="center">
    <af:panelSplitter id="ps1" orientation="vertical" splitterPosition="146">
    <f:facet name="first">
    <af:panelFormLayout id="pfl2">
    <af:panelLabelAndMessage label="#{bindings.Deptno.hints.label}" id="plam1">
    <af:outputText value="#{bindings.Deptno.inputValue}" id="ot1">
    <af:convertNumber groupingUsed="false" pattern="#{bindings.Deptno.format}"/>
    </af:outputText>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="#{bindings.Dname.hints.label}" id="plam2">
    <af:outputText value="#{bindings.Dname.inputValue}" id="ot2"/>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="#{bindings.Loc.hints.label}" id="plam3">
    <af:outputText value="#{bindings.Loc.inputValue}" id="ot3"/>
    </af:panelLabelAndMessage>
    <f:facet name="footer">
    <af:panelGroupLayout layout="vertical" id="pgl2">
    <af:panelGroupLayout layout="horizontal" id="pgl3">
    <f:facet name="separator">
    <af:spacer width="10" height="1" id="s1"/>
    </f:facet>
    <af:commandButton actionListener="#{bindings.First.execute}"
    text="First" disabled="#{!bindings.First.enabled}"
    partialSubmit="true" id="cb1"/>
    <af:commandButton actionListener="#{bindings.Previous.execute}"
    text="Previous"
    disabled="#{!bindings.Previous.enabled}"
    partialSubmit="true" id="cb4"/>
    <af:commandButton actionListener="#{bindings.Next.execute}" text="Next"
    disabled="#{!bindings.Next.enabled}"
    partialSubmit="true" id="cb5"/>
    <af:commandButton actionListener="#{bindings.Last.execute}" text="Last"
    disabled="#{!bindings.Last.enabled}"
    partialSubmit="true" id="cb6"/>
    </af:panelGroupLayout>
    <af:commandButton text="Submit" id="cb7"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelFormLayout>
    </f:facet>
    <f:facet name="second">
    <af:panelCollection id="pc1">
    <f:facet name="menus"/>
    <f:facet name="toolbar">
    <af:toolbar id="t2">
    <af:commandButton actionListener="#{bindings.CreateInsert.execute}"
    text="InsertRow"
    disabled="#{!bindings.CreateInsert.enabled}" id="cb2"
    immediate="true"/>
    <af:commandButton actionListener="#{bindings.Delete.execute}"
    text="DeleteRow"
    disabled="#{!bindings.Delete.enabled}" id="cb3"
    immediate="true"/>
    </af:toolbar>
    </f:facet>
    <f:facet name="statusbar"/>
    <af:table value="#{bindings.EmpView3.collectionModel}" var="row"
    rows="#{bindings.EmpView3.rangeSize}"
    emptyText="#{bindings.EmpView3.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.EmpView3.rangeSize}" rowBandingInterval="0"
    filterModel="#{bindings.EmpView3Query.queryDescriptor}"
    queryListener="#{bindings.EmpView3Query.processQuery}"
    filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.EmpView3.collectionModel.selectedRow}"
    selectionListener="#{bindings.EmpView3.collectionModel.makeCurrent}"
    rowSelection="single" id="t1" partialTriggers="::cb2 ::cb3">
    <af:column sortProperty="#{bindings.EmpView3.hints.Empno.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.EmpView3.hints.Empno.label}" id="c1">
    <af:inputText value="#{row.bindings.Empno.inputValue}"
    label="#{bindings.EmpView3.hints.Empno.label}"
    required="#{bindings.EmpView3.hints.Empno.mandatory}"
    columns="#{bindings.EmpView3.hints.Empno.displayWidth}"
    maximumLength="#{bindings.EmpView3.hints.Empno.precision}"
    shortDesc="#{bindings.EmpView3.hints.Empno.tooltip}" id="it1">
    <f:validator binding="#{row.bindings.Empno.validator}"/>
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.EmpView3.hints.Empno.format}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="#{bindings.EmpView3.hints.Ename.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.EmpView3.hints.Ename.label}" id="c2">
    <af:inputText value="#{row.bindings.Ename.inputValue}"
    label="#{bindings.EmpView3.hints.Ename.label}"
    required="#{bindings.EmpView3.hints.Ename.mandatory}"
    columns="#{bindings.EmpView3.hints.Ename.displayWidth}"
    maximumLength="#{bindings.EmpView3.hints.Ename.precision}"
    shortDesc="#{bindings.EmpView3.hints.Ename.tooltip}" id="it2">
    <f:validator binding="#{row.bindings.Ename.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="#{bindings.EmpView3.hints.Job.name}" filterable="true"
    sortable="true" headerText="#{bindings.EmpView3.hints.Job.label}"
    id="c3">
    <af:inputText value="#{row.bindings.Job.inputValue}"
    label="#{bindings.EmpView3.hints.Job.label}"
    required="#{bindings.EmpView3.hints.Job.mandatory}"
    columns="#{bindings.EmpView3.hints.Job.displayWidth}"
    maximumLength="#{bindings.EmpView3.hints.Job.precision}"
    shortDesc="#{bindings.EmpView3.hints.Job.tooltip}" id="it3">
    <f:validator binding="#{row.bindings.Job.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="#{bindings.EmpView3.hints.Mgr.name}" filterable="true"
    sortable="true" headerText="#{bindings.EmpView3.hints.Mgr.label}"
    id="c4">
    <af:inputText value="#{row.bindings.Mgr.inputValue}"
    label="#{bindings.EmpView3.hints.Mgr.label}"
    required="#{bindings.EmpView3.hints.Mgr.mandatory}"
    columns="#{bindings.EmpView3.hints.Mgr.displayWidth}"
    maximumLength="#{bindings.EmpView3.hints.Mgr.precision}"
    shortDesc="#{bindings.EmpView3.hints.Mgr.tooltip}" id="it4">
    <f:validator binding="#{row.bindings.Mgr.validator}"/>
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.EmpView3.hints.Mgr.format}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="#{bindings.EmpView3.hints.Hiredate.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.EmpView3.hints.Hiredate.label}" id="c5">
    <f:facet name="filter">
    <af:inputDate value="#{vs.filterCriteria.Hiredate}" id="id1">
    <af:convertDateTime pattern="#{bindings.EmpView3.hints.Hiredate.format}"/>
    </af:inputDate>
    </f:facet>
    <af:inputDate value="#{row.bindings.Hiredate.inputValue}"
    label="#{bindings.EmpView3.hints.Hiredate.label}"
    required="#{bindings.EmpView3.hints.Hiredate.mandatory}"
    columns="#{bindings.EmpView3.hints.Hiredate.displayWidth}"
    shortDesc="#{bindings.EmpView3.hints.Hiredate.tooltip}"
    id="id2">
    <f:validator binding="#{row.bindings.Hiredate.validator}"/>
    <af:convertDateTime pattern="#{bindings.EmpView3.hints.Hiredate.format}"/>
    </af:inputDate>
    </af:column>
    <af:column sortProperty="#{bindings.EmpView3.hints.Sal.name}" filterable="true"
    sortable="true" headerText="#{bindings.EmpView3.hints.Sal.label}"
    id="c6">
    <af:inputText value="#{row.bindings.Sal.inputValue}"
    label="#{bindings.EmpView3.hints.Sal.label}"
    required="#{bindings.EmpView3.hints.Sal.mandatory}"
    columns="#{bindings.EmpView3.hints.Sal.displayWidth}"
    maximumLength="#{bindings.EmpView3.hints.Sal.precision}"
    shortDesc="#{bindings.EmpView3.hints.Sal.tooltip}" id="it5">
    <f:validator binding="#{row.bindings.Sal.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="#{bindings.EmpView3.hints.Comm.name}" filterable="true"
    sortable="true" headerText="#{bindings.EmpView3.hints.Comm.label}"
    id="c7">
    <af:inputText value="#{row.bindings.Comm.inputValue}"
    label="#{bindings.EmpView3.hints.Comm.label}"
    required="#{bindings.EmpView3.hints.Comm.mandatory}"
    columns="#{bindings.EmpView3.hints.Comm.displayWidth}"
    maximumLength="#{bindings.EmpView3.hints.Comm.precision}"
    shortDesc="#{bindings.EmpView3.hints.Comm.tooltip}" id="it6">
    <f:validator binding="#{row.bindings.Comm.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="#{bindings.EmpView3.hints.Deptno.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.EmpView3.hints.Deptno.label}" id="c8">
    <af:inputText value="#{row.bindings.Deptno.inputValue}"
    label="#{bindings.EmpView3.hints.Deptno.label}"
    required="#{bindings.EmpView3.hints.Deptno.mandatory}"
    columns="#{bindings.EmpView3.hints.Deptno.displayWidth}"
    maximumLength="#{bindings.EmpView3.hints.Deptno.precision}"
    shortDesc="#{bindings.EmpView3.hints.Deptno.tooltip}"
    id="it7">
    <f:validator binding="#{row.bindings.Deptno.validator}"/>
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.EmpView3.hints.Deptno.format}"/>
    </af:inputText>
    </af:column>
    </af:table>
    </af:panelCollection>
    </f:facet>
    </af:panelSplitter>
    </f:facet>
    <f:facet name="header"/>
    <f:facet name="start">
    <af:panelGroupLayout id="pgl1">
    <af:panelFormLayout id="pfl1">
    <f:facet name="footer">
    <af:commandButton text="Upload" id="uploadButton"
    actionListener="#{FileProcessor.checkFile}" partialSubmit="true"/>
    </f:facet>
    <af:inputFile label="EmpFile" id="if1" value="#{FileProcessor.uploadedFile}"
    partialTriggers="uploadButton" binding="#{FileProcessor.inputFile}"/>
    <af:messages id="m2"/>
    </af:panelFormLayout>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="branding"/>
    <f:facet name="copyright"/>
    <f:facet name="status"/>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    and bean class code is as follows.
    package xxorn.model.view;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.component.UIViewRoot;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    import oracle.adf.view.rich.component.rich.input.RichInputFile;
    import oracle.adf.view.rich.component.rich.output.RichMessages;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import org.apache.myfaces.trinidad.model.UploadedFile;
    import org.apache.myfaces.trinidad.util.ComponentUtils;
    public class FileProcessor {
    private CSVtoADFTableProcessor tablecreator;
    private UploadedFile uploadedFile;
    private String filename;
    private long filesize;
    private String filecontents;
    private String filetype;
    private RichMessages errorMsg;
    private RichInputFile inputFile;
    public FileProcessor() {
    public void setUploadedFile(UploadedFile uploadedFile) {
    this.uploadedFile = uploadedFile;
    this.filename = uploadedFile.getFilename();
    this.filesize = uploadedFile.getLength();
    this.filetype = uploadedFile.getContentType();
    try {
    if (filename.endsWith(".csv"))
    tablecreator.processCSV(uploadedFile.getInputStream());
    else if(filename.endsWith(".xls")){
    System.out.println("uploaded file is ********"+uploadedFile);
    tablecreator.fileSubmit(uploadedFile.getInputStream());
    //tablecreator.WriteXLS(uploadedFile.getInputStream());
    else if (filename.endsWith(".xlsx")){
    tablecreator.fileSubmitXSSF(uploadedFile.getInputStream());
    //wrong file upload
    else{
    String msg="this is a global message.";
    FacesContext ctx =FacesContext.getCurrentInstance();
    FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, "Please Upload proper file");
    ctx.addMessage(null,fm);
    } catch (IOException e) {
    e.printStackTrace();
    public void convertStreamToString(InputStream is) throws IOException {
    StringBuilder sb = new StringBuilder();
    String line;
    BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
    while ((line = reader.readLine()) != null) {
    sb.append(line).append("\n");
    System.out.println(sb.toString());
    public UploadedFile getUploadedFile() {
    return uploadedFile;
    public void setFilename(String filename) {
    this.filename = filename;
    public String getFilename() {
    return filename;
    public void setFilesize(long filesize) {
    this.filesize = filesize;
    public long getFilesize() {
    return filesize;
    public void setFilecontents(String filecontents) {
    this.filecontents = filecontents;
    public String getFilecontents() {
    return filecontents;
    public void setFiletype(String filetype) {
    this.filetype = filetype;
    public String getFiletype() {
    return filetype;
    public void setTablecreator(CSVtoADFTableProcessor tablecreator) {
    this.tablecreator = tablecreator;
    public CSVtoADFTableProcessor getTablecreator() {
    return tablecreator;
    public void setErrorMsg(RichMessages errorMsg) {
    this.errorMsg = errorMsg;
    public RichMessages getErrorMsg() {
    return errorMsg;
    public String checkFile(ActionEvent actionEvent) throws Exception {
    // Add event code here...
    System.out.println("in upload action event");
    /* RichInputFile vTheInputFileComponent = getInputFile();
    vTheInputFileComponent.resetValue();*/
    FacesContext vFacesContext = FacesContext.getCurrentInstance();
    UIViewRoot vUIViewRoot = vFacesContext.getViewRoot();
    RichInputFile vTheInputFileComponent =
    (RichInputFile)vUIViewRoot.findComponent("if1");
    vTheInputFileComponent.resetValue();
    AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
    adfFacesCtx.addPartialTarget(inputFile);
    return null;
    public void setInputFile(RichInputFile inputFile) {
    this.inputFile = inputFile;
    inputFile=null;
    public RichInputFile getInputFile() {
    return inputFile;
    }

  • IPhone photo/video library glitch - wrong file extensions, name shift, lost files etc [LONG story - sorry]

    I have a 5s running 7.0.4. and my computer is running Windows 8.1.
    We had a baby and my phone filled up fast with pictures and videos, so I decided to offload them onto my PC. I connected my phone to the usb port, and directly copied from the DCIM folder to my hard drive.
    Something happened during the first attempt, and the process was interrupted. So I went into each of the sub folders, and selected all files, and started the copy process again. I told the computer to skip any existing files.
    So all the file counts matched in each folder, and I figured it was safe to start deleting from my iPhone.
    On my hard drive, I separated all the MOV files into my Videos folder. But in Windows Explorer, the thumbnail view showed several MOV files with no thumbnail - just the generic icon.
    As I sorted my photos into various folders, I also noticed a lot of generic icons instead of thumbnails for the JPGs. I started to feel concerned that my files had become corrupt during the transfer. But then I noticed a PNG file that was a few hundred megabytes. This was odd, so I added the MOV extension to it. Sure enough, it was a video with the wrong extension.
    I renamed every PNG and JPG file that had no thumbnail to add the MOV extension. Every one was a video with the wrong file extension.
    Then I went to the video folder, and all the MOV files that had the generic icon were actually JPG files.
    Well I was just happy to see that the files were not corrupt.
    One more time before I deleted things from my iPhone, I did a spot check to see that the largest videos were on my hard drive. I found a few videos that were not copied over, despite the file counts having been accurate. So I copied the videos again, and compared file sizes and date/times when there was an overwrite prompt. Most were matches, but several were the same file name with different sizes and dates.
    I didn't know what was going on, but I just wanted to get the files on my computer. So I renamed my local copy where there was a name collision, and copied the videos. I deleted the videos from my phone as I went along.
    I felt pretty confident that I had all the files copied now, so I began mass deleting my photos.
    I went to the Photos app on the phone, and watched the thousands of pictures disappear, and the glorious free space grow on my phone.
    But wait... there was still 1 video in the Photos app. I thought I had gotten all the MOV files off the phone...
    I have a photo info app installed, so I was able to see the file name of the video. I searched for that file name in the DCIM subfolders, but the folder that had that series of files (the IMG_3000-3999 files) listed the files with that particular video skipped. It was clearly still on my phone, because I could play it.
    Then I noticed it was a 45 minute long video of my baby. About 5 GB. So I figured it must be due to the file size that it wasn't visible from explorer. (Can't explain why that would be, but M$ keeps changing crap too. I never freaking know what to expect from them either.)
    After having deleted all the jpg, png and mov files from the DCIM folder, there were still about 26 files in my camera roll on the iPhone. And I could still view the video.
    I decided I wasn't concerned about the photos, I just wanted to figure out how to get the video onto my computer.
    So I selected all the photos in the photo app (skipping the 1 remaining video) and tapped the trash can.
    Poof! One item remained, and it was one of the garbage photos. My video is GONE! ^#@*&#($^@Q&%( And no, I didn't fat-finger it. I was very careful to select the correct thumbnails.
    Looking back, I know that I should have just started the entire file copy process from scratch when funny stuff started happening like mismatched file names. But I am a sleep-deprived new mom and just wasn't thinking clearly. It would be nice if I could have used my file/directory compare program to check the iPhone against my laptop, but it is not compatible with devices, only removable drives.
    And no, I don't use iTunes. I stopped using iTunes years ago when it would randomly decide to delete contacts from my phone just because they didn't exist on my computer or some sh-- like that. I have always just manually synced all my stuff and have never had an issue like this. To say I am sad to lose that video is an understatement.
    I googled "iPhone undelete" and "iPhone data recovery" and downloaded a trial for one of the likely candidates. It turned up a bunch of garbage, but not my video.
    Anyways... I am wondering if anyone else has experienced this type of scenario? Has anybody identified what could cause this to happen? I would like to avoid this in the future. (I will avoid this type of loss, because I know now what I could have done differently to be more careful. But it would be nice if I didn't have to get all neurotic about checking 60GB of photos/videos side by side each time I copy them to my computer...)
    I have seen other threads on the forum here regarding corrupted libraries and such, but I am not sure this is the same thing.
    One suspicion I have is that it might have to do with the iPhoto app being installed on the phone. I can't articulate why I think that is worth considering. But when I looked at my Video folder, I ended up with many duplicate videos, and all the duplicated videos' file names were 2 numbers apart. As if all the file names got shifted at some point. Very strange.
    Thanks for listening to my rant. If anybody has an idea, I am interested. If anybody else has lost precious memories due to this, we should talk. If it is a widespread problem, maybe we can all get together and pound down Apple's door?
    As an aside: Why am I unable to select Apple Support Community to post this question to?

    In my case number of weird things happen whenever I try to copy pictures/videos from my iPhone from direct USB...
    1. JPG files are wrongly named as MOV and vice versa.
    2. I copy only folders but in addition files with no extension are copied in the main folder, very strange.
    3. Whenever I open one of the folders, strange icons like this () start appearing which cannot be copied even.
    Unfortunately I used to delete a lot of files with wrong extensions in the past because I never new they could be fixed.
    Apple should answer this!
    Note: I am using Windows 8.1 and use a direct USB cable without iTunes to copy the media files directly from My Computer.

  • Issues showing PDF files in web-browser (Windows 7 x64, 32-bit version of AdobeReader X)

    I'm not sure if this is the right way to share my experience, but at least I know Google will discover this thread eventually and maybe someone else will find what I have been looking for the past 3 hours
    I'm deploying the 32-bit based AdobeReader X (http://www.adobe.com/support/downloads/detail.jsp?ftpID=4950) to Windows7 32-bit and 64-bit based machines. This is a MSI deployement done through our Active Directory. Everything goes well - no errors. Except for the x64-based machines having trouble showing PDF-files in the web-browser.
    I used Adobe Customization Wizard X to customize our MSI installation - this showed out to be the solution once again.
    Common for the installation on Windows7 32-/64-bit were that the value in the registry database for HKCR\Software\Adobe\Acrobat\Exe (Default) was set to "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe". This is valid for the 32-bit installation as Program Files is situated in C:\Program Files, but since it's a 32-bit edition of AdobeReader that I'm installing on the 64-bit based system as well, it's installed in C:\Program Files (x86) and the reference in the registry database to "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" is therefore not valid - which explains why PDF files could not be displayed in the web browser. Changing the registry to "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe" solved it. Now this is a manual solution which might be useful on 1-2 machines but on a bigger scale it's not the right way to do it.
    I could change it with a batch/vbs script but still this is only a solution of the symptom and not a solution to the core issue. I therefore focused on Adobe Customization Wizard X again.
    The problem was easily solved. I opened the MSI file, loaded the transform file that I've made previously. Went to Registry > HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe . I then changed the (Default) value from "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" to "[INSTALLDIR]Reader\AcroRd32.exe", generated the MST file and replaced my current one for distribution. Problem solved! :-) The entry in the registry now shows : "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe" and PDF files are open without any issues.
    I hope someone can save a bit of time on this one.
    Best regards!
    Alex Mikkelsen

    I was able install and view the files in adobe reader 10.1.1 and in web browser window 7 64 bit machine.  But when I go to Edit-preferences-internet and  unchecking "display PDF in Browser" , I am not able to view the pdf files in ie 9 browser.  I have used this javscript to check for pdf version.
    Immediately after installing adobe--
    when I do adobe test in ie 9---https://courses.worldcampus.psu.edu/public/diagnostics/Acrobat.html--  launches a test pdf file--Acro_Test.pdf
    After unchecking-- it stays in the  https://courses.worldcampus.psu.edu/public/diagnostics/Acrobat.html instead of showing test pdf file--Acro_Test.pdf
    Tried to go back to "display PDF in Browser"--it is showing it is checked(eventhough I did not check it)
    and in ie
    it stays in the https://courses.worldcampus.psu.edu/public/diagnostics/Acrobat.html instead of showing test pdf file--Acro_Test.pdf

  • CS3: Bridge does not show dng-files

    First it started to refuses to show NEF files, and now, it will not show dng files - or at least some of my dng files.
    What the H.... is wrong with this crap?

    But I do not understand, why Bridge suddenly cannot see them - when it could a couple of days ago
    CS3 is known for being the worst version of Bridge with very strange behavior. Might be preferences or cache related or some other strange reason. Fact is that using old software for new digital cameras has the only advantage as being cheap. You do miss a lot of functions, options and especially quality for developing your Raw files. CS6 has a complete new Raw process version called 2012. And since you use CS3 you still will be at process 2003 and already missed process version 2010.
    So you seriously should consider buying CS6 ( you missed the option for an upgrade since this was shut down per december last year due to new upgrade policy) if you want to get the most out of your expensive new dSLR

Maybe you are looking for

  • IPhone 4S - Syncing issues with a Mac

    I've tried almost everything! I have the latest versions of Itunes, iOS7, and running OS x 10.9. I cant sync music between my iPhone 4S and my Mac or my wife's iPhone4 and the Mac. Very frustrating, I don't manually manage music I sync my playlists a

  • Original and transferred calls

    Hi All, In TCD what is the common field between an original inbound call and a transferred one by the agent. Agent ID is not displayed in transferred call field. Regards,

  • Does IT services sales experience can be counted as a domain experience for SAP SD Fresher?

    Hello All, I am new to SCN and i need your help. I am currently working as a Sales Executive with an IT consulting firm specialized in SAP & Oracle consulting services. I want to enter into SAP world and i thought that SAP SD is best for me because o

  • Position of Canvas in Applet

    Hello, I am creating a simple shoot 'em up game where the player has to blast the meteors. The meteors are instances of Canvas's and the location of each is set by using the setLocation() method. When I press the refresh button on IE, the meteors som

  • OWB repository on mysql

    hello is it possible to have OWB repository on mysql database ? if not is it possible on oracle xe ? many thanks