Why inconsistency in the naming of the directory for OVD?

Hello,
A consulting firm installed OVD for our company and the directory for the 2 nodes were set up as follows:
cd /u01/app/oracle/Middleware/ovd_inst1/diagnostics/logs/OVD/ovd1
cd /u01/app/oracle/Middleware/ovd_inst2/diagnostics/logs/OVD/ovd1
On the first node, the directory was named ovd_inst1 and down into the logs directory, the subdirectory was named ovd1.
For consistency why wasn't the second node logs directory named ovd2? Instead it was named ovd1.
When I asked the consultant who did the installation/configuration, I was told he was not given an option by oracle to name the logs directory on the second node as ovd2.
Is this correct?
When I compared the installation/configuration to the one done for OID, this is what I noticed.
/u01/app/oracle/Middleware/oid_inst1/diagnostics/logs/OID/oid1
/u01/app/oracle/Middleware/oid_inst2/diagnostics/logs/OID/oid2
Why can't we make the OVD installation/configuration naming the same way as OID?
Thanks
Edited by: user12049102 on Aug 24, 2012 3:55 PM

no, you should be able to handle these instances thru 'Oracle Process Manager Control' opmnctl in parallel, example:
To start the first Oracle Virtual Directory component, use the following:
$ORACLE_INSTANCE/bin/opmnctl startproc ias-component=ovd1
$ORACLE_INSTANCE/bin/opmnctl startproc ias-component=ovd2
To start all Oracle Virtual Directory components, use the following:
$ORACLE_INSTANCE/bin/opmnctl startproc process-type=OVD
maybe he did registration into both nodes for the same ovd hostname, so it will show into logs only values of one host.
Example of registration process:
Execute the opmnctl registerinstance command on both OVDHOST1 and OVDHOST2:
ORACLE_INSTANCE/bin/opmnctl registerinstance -adminHost WLSHostName -adminPort
WLSPort -adminUsername adminUserName
For example, on OVDHOST1 and OVDHOST2:
ORACLE_INSTANCE/bin/opmnctl registerinstance -adminHost idmhost1.mycompany.com
-adminPort 7001 -adminUsername weblogic
Command requires login to weblogic admin server (idmhost1.mycompany.com)
Username: weblogic
Password: *******
I hope this helps,
Thiago Leoncio.

Similar Messages

  • What is the web server instance directory for uninstalling access manager

    when access manager is installed on java application server?
    Thanks!
    glx

    Well, the app server instance should be in /var/opt/SUNWappserver/domains/domain1 on Solaris by default (similar paths on other platforms), but the reality is if you want to uninstall it you should run the Java ES uninstaller. The reason is the installation of Access Manager also modifies the classpath in the domain.xml amongst other things.
    The uninstaller is in /var/sadm/prod/<Java ES specfic dir> on Solaris, and somewhere similar on other platforms.
    Good luck,
    - Matt

  • How to recover/reinstall deleted the /sharepoint/sites/PWA directory for Project Online (Hosted Solution)?

    Hi all, Am really hoping someone can assist me.  I accidentally deleted the PWA web directory on our Project Online (online MS hosted) which includes all the reference web pages and services.
    How do I reinstall/recover this?
    Thanks

    Hello lethalleigh03,
    There are few points to note down here.
    1. If you simply clicked on delete the site you can restore that site by going to Recyle bin.
    2. If you remove the feature and then delete the site in that case your PWA feature is removed so all your data will be deleted.
    Either of the case you can approch Microsoft support to restore the site. After deleting the site data will be still there with Microsoft for 14days post that it will be deleted Permanently.
    Amol

  • On my iTunes for Windows, I keep getting the error message, "check directory for CTDFMRES.DLL", and then the program freezes.

    I'm having trouble importing an audio book.

    Repair your Apple software update.
    Go to START/ALL PROGRAMS/Apple Software Update. If it offers you a newer version of Apple Software Update, do it but Deselect any other software offered at the same time. Once done, try another iTunes install
    If you don't find ASU, go to Control Panel:
    START > CONTROL PANEL > Programs n Features / highlight ASU and click CHANGE then REPAIR,

  • Error: Select directory for export- ERP integrator

    Hi,
    I try to export member mappings from ERP integrator 11.1.2.1.501. It Showing the error, "Error: Select directory for export".
    Which directory should be selected here.
    Pls anyone give me a solution to solve this issue.
    Thanks
    Edited by: 3088 on Jun 19, 2012 9:33 PM

    You can choose a directory local to the ERPi server in the environment.

  • I have downloaded the tv shows Homeland and Dexter. They have ended up in different places. Dexter is where is "belongs" in my itunes library on my NAS drive. Homeland ended up on my hard drive in the itunes/music/tvshows directory. Anyone know why?

    Several months ago I bought and downloaded Homeland. Earlier this month I bought
    Dexter Season 7. They have ended up in different directories. My iTunes library is
    on a NAS drive and Dexter was stored there (where it belongs). For some reason,
    Homeland got saved to my Mac hard drive in the itunes/music/tvshows directory.
    This seems odd everything else I have downloaded, music, other tv shows, movies
    have been saved to the proper place. I haven't changed the path to my iTunes
    library in years.
    Now, iTunes has kept track of these two tv shows and I synced them both
    to my iPad. The only reason I know they are in different places
    is because my wife couldn't find them on the NAS drive.
    Mostly out of curiosity, I'd like to know why this happened and how to keep it from
    happening again.
    Oh, it's iTunes 11.0.3 running on a MacBook Pro with OS X 10.6.8.
    Thanks
    Bob

    I don't think it is easy to move part of a collection unless you don't care about the metadata such as date added, etc.  You can copy the files to the other drive, delete in iTunes the references to the copies still on your computer, then hold down the option key while dragging the files on the external to iTunes so it doesn't copy them back to your internal but just references them where they are.  You have to remember to do this each time.  Either that, or set preferences so iTunes does not automatically copy any file to your media folder when added but leaves them all where they land on your computer.  You can move them by hand around the computer, but not between drives.
    You could try Dougscript "Move Files To Folder" but I don't know if this enables iTunes to track items moved to a different drive.  iTunes doesn't really like using multiple drives.
    As for using Time Capsule, I have seen various takes on this.  I recall reading somebody saying it isn't a good idea to have a backup drive competing for dual purposes.  My take on it is, TC is a backup, period.  If you keep your movies on it and the TC drive dies, you lose your only copy of the movies.
    How often do you really watch these movies?  Yes, it is nice having them appear in iTunes, but unless you are watching them every day then it isn't a huge burden to have them on another drive.  Frankly, if I had iTunes movies I would probably make a whole different library for them and start from it with the external drive turned on when I was in a movie mood.

  • Why rmiregistry & Server must start in the same directory.

    I have 2 servers & one rmiregisty for both. I want to start this servers separetely from different directories.
    But if I try to start server from the directory other than where I've already started rmiregistry the server doesn't bind.
    Please, can anyone explain why rmiregisty & server must start from the same directory?

    Are you sure the classpath when rmiregistry is started includes jar/directories where rmiregistry can find your server stubs ???
    rmiregistry does not need your implementation, but it needs your stubs to be able to register your server objects ...

  • When using Creative Cloud Library assets created in Illustrator why are the naming conventions I use not being pulled over into the Photoshop layers?

    I create the Creative Cloud Library asset in illustrator and give it a name such as "camera-icon". It shows up in my Creative Cloud Library pane in Photoshop as "camera-icon". When I use that asset in Photoshop the layer is randomly named "a56bd81d-d81f-4815-82b3-5795d410b527". Why is this happening? Shouldn't that layer resolve the name back to "camera-icon" so that when I extract files for use in my application the naming convention is correct. Right now I have to manually rename that layer again. Is this a bug or have I just not done something correctly?

    I think you have pasted the entire crash log. In case of such issues in future, please paste the error screenshot.
    Seems to be a permission issue. Lets follow the below suggestions:
    Solution 1: Rename the following folders on your machine:
    '/Library/ColorSync/Profiles/Profiles'
    '/Library/ColorSync/Profiles/Recommended'
    Solution 2: Rename the following files:
    '/Library/Application Support/Adobe/caps/Media_db.db'
    '/Library/Application Support/Adobe/caps/pdb.db'
    Make sure you dont touch caps.db under the same folder. Now run the installer again. Let me know if you need more help.
    Solution 3:
    Please Run following commands on terminal on the machine (this will remove the corrupt fonts and should allow you to run the installer successfully) -
    sudo mv "/Library/Fonts/ACaslonPro-Bold.otf" /tmp/
    sudo mv "/Library/Application Support/Adobe/SavedFonts/current/AdobeArabic-Bold.otf" /tmp/
    sudo mv "/Library/Application Support/Adobe/HelpCfg/de_DE/goURL_lr_photoshop_de.csv" /tmp/
    Please feel free to respond to this thread if you have any questions about the steps listed within the document.  If you could also respond with the specific error message you receive, It would be appreciated.

  • Why does the iTunes 64 installer install into the Program Files (x86) directory and run in 32 bit mode?

    I have just installed this and even tried to manually get it to install in the "Program Files" directory.  Programs installed into the "Program Files (x86)" directories are 32 bit apps.  This is where the iTunes64Setup file installs to.  Is this intended?  If so, why call it iTunes 64 bit ?  It is compatible in this mode, but iTunes actually running in 64 bit mode could drastically improve performance and processing of large libraries.
    Please advise if this is a known issue or if iTunes 64 bit even exists.

    The 64-bit version of iTunes is a mixture of 64-bit and 32-bit componentry. You'll also notice on your PC that some of the componentry for iTunes itself is installing in the iTunes folder in the Program files directory (such as the miniplayer). The GEAR drivers used for burning and importing are 64-bit. The iPod service is 64-bit. AMDS is 64-bit. Bonjour is partially 64-bit.
    It's normal to see the itunes.exe process running as 32-bit on a 64-bit system.

  • Why is the HTM file of a page saved in FF also being deleted, if one deletes the subfolder with the corresponding files?

    Alright, let me explain: When I'm saving a web page in FF, this will create a .HTM file as well as a subdirectory with matching filename plus suffix "-Dateien" (German version - I'd guess in the English version it would probably be "-files" or maybe "-data" instead...). Anyway, now if I delete that subdirectory (including all its content) with the Windows Explorer (I'm still using XP, btw), it'll also delete the corresponding .HTM file in the parent directory. Question is: Why/how does it do that? Could that be some hard or symbolic link phenomenon that escapes me?
    Greetings from Munich & thanks in advance!
    Manfred

    That is a Windows feature called connected files that connects the main file and the folder with the other files for certain file operations and HTML files among others.<br />
    If you delete one of them then the other is deleted automatically (the same for Copy).
    *http://msdn.microsoft.com/en-us/library/windows/desktop/bb776887%28v=vs.85%29.aspx
    *http://www.microsoft.com/mspress/books/sampchap/6232.aspx
    You can use the registry editor (regedit.exe) to create a NoFileFolderConnection key of type REG DWORD and set the value to 0x01 to disable this "Manipulate connected files as a unit" feature.
    *HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\NoFileFolderConnection: REG_DWORD 0x01
    Change the value to 0x00 to re enable.
    See also "Operations on an HTML file or folder apply to similarly named folder or HTML file":
    *http://support.microsoft.com/kb/252721

  • Why delete [appserverdomain]/null folder during the Livecycle Es4 configuration

    Deploying LiveCycle EARs
    This operation may take several minutes to complete. When the deployment has completed successfully, click
     Next.
    Note:  After this step, ensure that you stop the managed server, node manager, and admin server, and then start them in the reverse order. Ensure that a directory named adobe is created in [appserverdomain] after the restart. This is required so that the [appserverdomain]/null directory does not get created, which can lead to the run time issues. Delete the [appserverdomain]/null directory if it gets created.
    ❖ On the Deploy LiveCycle ES4 EARs screen, select the EAR files to deploy and then click Deploy 
    Why is that folder created if we just delete it and why do we delete it?  The null folder has an abobe folder in it that looks identicle to the [appserverdomain]/adobe.

    This issue does not occur when deploy the EARs manually.
    It occurs intermittently when deploying the EARs using LCM and it is specific to Weblogic only. Reason behind this is Weblogic (as opposed to JBoss and Websphere) does not guarantee a particular start-up order of WARs within an EAR.
    The initialization does rely on a particular start-up order.
    Thus the null folder gets created sometimes.
    Hence it is always suggested to restart the server in a particular order to ensure that intialization happens properly. In case the [appserverdomain]/null directory gets created earlier, remove it.
    Hope this answers your question.
    ~ Varun Nohria

  • How can I change the default EXPORT directory for latest iPhoto?

    Perhaps I am missing something, but I have as yet to find a way to set my default EXPORT directory. Since installing Lion and the iPhoto update, whenever I want to export it wants to put the image in 'Pictures', but I want 'Desktop' generally or somewhere else.
    I am all set with library and import location. In fact, Import is smart enough to remember where I import my stuff FROM - namely, the desktop.
    But once I have edited files and want to export them, the default jumps back to Pictures.
    Again, this is NEW and CHANGED behavior with the latest release to coincide with iOS 5 ...
    I just want it to remember my default from export to export ... heck, it even changes within the same session!

    I can certainly confirm the behaviour and have no solution to it.
    That said, in the export dialogue typing command-d will point the export to the desktop.
    Regards
    TD

  • Creating a zip file from the contents of a directory

    hi, I am having a problem as the title suggests with a zip fil creation...
    using the basic example zip.java i wished to edit it so it doesnt zip a file fro the current directory but rather a directory i inputted.
    It is able to read the first file then throws out the following error with the code below it:
    java.io.FileNotFoundException: test.jpg (The system cannot find the file specified)
    import java.io.*;
    import java.util.zip.*;
    public class Zip {
       static final int BUFFER = 2048;
       public static void main (String argv[]) {
          try
             BufferedInputStream origin = null;
             FileOutputStream dest = new FileOutputStream("C:/Documents and Settings/Phil/My Documents/My Pictures/Work/test.zip");
             CheckedOutputStream checksum = new CheckedOutputStream(dest, new Adler32());
             ZipOutputStream out = new
               ZipOutputStream(new BufferedOutputStream(checksum));
             //out.setMethod(ZipOutputStream.DEFLATED);
             byte data[] = new byte[BUFFER];
             // get a list of files from current directory
             File f = new File("C:/Documents and Settings/Phil/My Documents/My Pictures/Work/");
             f.listFiles();
             String files[] = f.list();
             for (int i=0; i<files.length; i++)
                System.out.println("Adding: "+files);
    FileInputStream fi = new FileInputStream(files[i]);
    origin = new BufferedInputStream(fi, BUFFER);
    ZipEntry entry = new ZipEntry(files[i]);
    out.putNextEntry(entry);
    int count;
    while((count = origin.read(data, 0,
    BUFFER)) != -1)
    out.write(data, 0, count);
    origin.close();
    out.close();
    catch(Exception e)
    e.printStackTrace();
    After investigation i am lead to believe this is because the method returns an array of file and directory names only but not their path and the unqualified names would have therefore be defaulted to the current working directory. Something i understand if this is the case.
    So instead i used the File.listFiles() method to return an array
    of File objects, instead of an array of Strings as shown in the snippet of the changed code below (the changed code highlighted)...but arrived at another error on the second section of highlighted code meaning i cant compile. I cant understand why this is so!
    The error is: "cannot find symbol, Symbol: Contructor ZipEntry (Java.IO.file), location: class.java.util.zip.ZipEntry"
    File f = new File("C:/Documents and Settings/Phil/My Documents/My Pictures/Work/");
             **************File g[] = f.listFiles();***************
             **************String files[] = f.list();**************
             for (int i=0; i<g.length; i++)
                System.out.println("Adding: "+g);
    FileInputStream fi = new FileInputStream(g[i]);
    origin = new BufferedInputStream(fi, BUFFER);
    **************ZipEntry entry = new ZipEntry(g[i]);************
    out.putNextEntry(entry);
    int count;
    while((count = origin.read(data, 0,
    BUFFER)) != -1)
    out.write(data, 0, count);
    origin.close();
    out.close();
    Any help and thoughts most appreciated. Thank u in advance

    I'll admit i took 1 look at that reply an thought "thats stupid that wont work"...
    then a second look an though "actually, i should work i cant believe i didnt think of that"
    Anyways i tried it and it did work
    How are the duke dollars awarded, cos u should have them ordinary_guy
    cheers!

  • Why are all the events in the XML SAX parser not activated?

    Hi everyone,
    I have written a mini server that parses XML files into SQL queries.
    Below is a segment of my code;
              try          {                                                       
                   Class.forName( JDBC_DRIVER );
                   myConnection = DriverManager.getConnection( DATABASE_URL, "username", "password");                                                  
                   EventXMLParser myEXP = new EventXMLParser(directory, myConnection);
                   File[] xmlFiles = directory.listFiles();
                   for (File xmlFile : xmlFiles)               {     
                        myEXP.XMLtoDB(xmlFile);
                        outWriter.println("File:" + xmlFile.getName() + " DONE");
              } catch (SQLException e)     {
                   System.err.println("SQLException for establishing connection");
                   e.printStackTrace();
              } catch (ClassNotFoundException e)     {
                   System.err.println("CLASS NOT FOUND EXCEPTION HERE");
                   e.printStackTrace();
              } catch (Exception e)     {
                   System.err.println(e);
                   e.printStackTrace();
              finally {
                   outWriter.println("PARSING COMPLETED");
                   outWriter.close();
         }Where the constructor EventXMLParser constructs the following:
         public EventXMLParser(File path, Connection connection)     {
              super();
              try     {
                   this.XMLpath = path;
                   this.db_connection = connection;
                   this.xr = XMLReaderFactory.createXMLReader();
                   this.XMLSAXhandler  = new DefaultHandler(); //create a new own handler
                   this.xr.setContentHandler(XMLSAXhandler);
                   this.xr.setErrorHandler(XMLSAXhandler);
                   //System.out.println("DEBUG: db_connection is " + db_connection.toString());
              catch (Exception e)     {
                   System.out.println("Constructor Error!");
                   e.printStackTrace();
         }Below are all my helper methods within EventXMLParser.java
         public void XMLtoDB(String XMLpath) throws Exception  {
              try     {
                   //Input
                   System.out.println("XMLpath is : " + XMLpath);
                   /*FileReader r = new FileReader(XMLpath); debug
                   InputSource in = new InputSource(r);
                   xr.parse(in);
                   xr.parse(XMLpath);
                   /* Note that while parsing, the end of each event, </event>
                    * will trigger sendSQL to execute the query on the database
              catch (Exception e)     {
                   throw new Exception("Error with XMLtoDB!! Exception: " + e);
         public void sendSQL(Event event, Connection sql_connection) throws SQLException     {
                   //JDBC part
                   try     {
                        System.err.println("DEBUG sendSQL");
                        Statement sql_statement = sql_connection.createStatement();
                        ResultSet resultSet = sql_statement.executeQuery( event.toSQL() );
                   catch (SQLException e)     {
                        e.printStackTrace();
         /* Parsing XML
          * From here onwards it's all designed for the SAX Parsing with different event calling methods
         public void startDocument()     {
              System.err.println("Start Document");
         public void endDocument()     {
              System.err.println("End Document");
         public void startElement(String uri, String name, String qName, Attributes atts)     {
              CurrentElement= name;
              System.out.println("This is parsing");
         public void characters(char ch[], int start, int length)     {
              SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
              StringBuffer sb = new StringBuffer();
              for (int i = start; i < start + length; i++)     
                   sb.append(ch);
              String content = sb.toString();
              if (CurrentElement.equals("eid"))
                   temp.setEventID( (Integer.valueOf(content)).intValue() ) ;
              else if (CurrentElement.equals("sd"))
                   temp.setShort_description(content);
              else if (CurrentElement.equals("ld"))
                   temp.setLong_description(content);
              else if ( (CurrentElement.equals("dt")))
                   temp.setDate_Time( formatter.parse(content, new ParsePosition(0)) );
              else if (CurrentElement.equals("repeat"))
                   temp.setRepeat_pattern( (Integer.valueOf(content)).intValue() );
              else if (CurrentElement.equals("valid"))
                   temp.setValid_period(content);
              else if (CurrentElement.equals("status"))     {
                   temp.setStatus( (Integer.valueOf(content)).intValue() );
              else {}
         public void endElement(String uri, String name, String qName)     {
              System.err.println("DEBUG" + temp.toString()); /*debug*/
              if (name.equals("event"))     {
                   try     {
                        /*debug*/ temp.setUserID(1);
                        /*debug*/ System.err.println("DEBUG: " + temp.toString());
                        sendSQL(temp, db_connection);
                        //temp = new Event();
                   catch (SQLException e)     {
                        System.err.println(e);
                   }//end catch
              }//end try
    Where event is a public class Event     {
         //fields
         private int userID = 1; // = 1 only applies for testing
         private int eventID;
         private String short_description;
         private String long_description;
         private Date date_time = null;
         private int repeat_pattern;
         private String valid_period;
         private int status;     //1 for new, 0 for modification and -1 for delete
         SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
         //Constructors
         //every event requires the following: userID eventID and short_Description
         public Event(int uID, int eID, String shortDescrp)     {
              setUserID(uID);
              setEventID(eID);
              setShort_description(shortDescrp);
         public Event(int uid, int eid, String sd,
                                  String ld, Date d_t, int r_p, String v_p, int s)     {
              setUserID(uid);
              setEventID(eid);
              setShort_description(sd);
              setLong_description(ld);
              setDate_Time(d_t);
              setRepeat_pattern(r_p);
              setValid_period(v_p);
              setStatus(s);
         //set
         public void setUserID (int x)                         { this.userID = x ;}
         public void setEventID (int x)                         { this.eventID = x ;}
         public void setShort_description (String x)          { this.short_description = x ;}
         public void setLong_description (String x)          { this.long_description = x ;}
         public void setDate_Time(Date x)                    { this.date_time = x ;}
         public void setRepeat_pattern (int x)               { this.repeat_pattern = x ;}
         public void setValid_period (String x)               { this.valid_period = x ;}
         public void setStatus (int x)                         { this.status = x; }
         //get
         public int           getUserID()                              { return this.userID;}
         public int           getEventID()                         { return this.eventID;}
         public String      getShort_description()               { return this.short_description;}
         public String      getLong_description()               { return this.long_description;}
         public Date        getDate_Time()                         { return this.date_time;}
         public int         getRepeat_pattern()                    { return this.repeat_pattern;}
         public String      getValid_period()                    { return this.valid_period;}
         public int           getStatus()                              { return this.status; }
         //Event to SQL statements;
         public String toSQL()     {
              StringBuffer sb = new StringBuffer();
              ///if ( status == 1)     {
                   sb.append( "INSERT INTO events SET" );
                   sb.append( " userID = " + userID + ", ");
                   sb.append( "eventID = " + eventID + ", " );
                   sb.append( "short_description = " + "\'" + short_description + "\'" + ", "); //String
                   sb.append( "long_description = " + "\'" + long_description + "\'"  + ", "); //String
                   sb.append( "date_time = " + "\'" + formatter.format(date_time) + "\'" + ", ");
                   sb.append( "repeat_pattern = " + repeat_pattern + ", " );
                   sb.append( "valid_period = " + "\'" + valid_period + "\'" ); //String
                   sb.append( ";");
              //} else if ( status == 2)      {
              System.err.println(sb.toString());
              return sb.toString();
    }     My question is: I have taken my SQL query generated by toSQL() method in events and it worked.
    Here is the funny thing:
    Everything is correct syntax wise: No complaints what soever
    The mysql part works: Tested separately.
    So I tend to think that the problem lies within the SAX parser. I have written SAX2 parsers on this machine before and they have worked too. I tried inserting println statements all over startElement endElement etc etc only to find out that the SAX parser did not call any of the methods that I overided!! Why is that so?
    Can you guys spot where my SAX parser fails?

    I see.
    I try to correct this problem by removing super();
    so right now my code looks like this:
         static Event temp = new Event(0, 0, "null", "null", new Date(), 0, "null", 0);
         static String CurrentElement = null;
         static File XMLpath;
         static Connection db_connection;
         static XMLReader xr;
         static DefaultHandler XMLSAXhandler; 
         //Constructor,      Build the SAX Parser
         public EventXMLParser(File path, Connection connection)     {
              try     {
                   this.XMLpath = path;
                   this.db_connection = connection;
                   this.xr = XMLReaderFactory.createXMLReader();
                   this.XMLSAXhandler  = new DefaultHandler(); //create a new own handler
                   this.xr.setContentHandler(XMLSAXhandler);
                   this.xr.setErrorHandler(XMLSAXhandler);
                   //System.out.println("DEBUG: db_connection is " + db_connection.toString());
              catch (Exception e)     {
                   System.out.println("Constructor Error!");
                   e.printStackTrace();
         }This time, I created a new instance of default handler() which can be referenced by as the objects's XMLSAXhandler. However, that did not solve the problem, why does the problem still persist?
    Right now, there is only one instance of a default handler created. So why does all my parsing event functions still get ignored?

  • How to get the file size (in bytes) for all files in a directory?

    How to get the file size (in bytes) for all files in a directory?
    The following code does not work. isFile() does NOT recognize files as files but only as directories. Why?
    Furthermore the size is not retrieved correctly.
    How do I have to code it otherwise? Is there a way of not converting f-to-string-to-File again but iterate over all file objects instead?
    Thank you
    Peter
    java.io.File f = new java.io.File("D:/todo/");
    files = f.list();
    for (int i = 0; i < files.length; i++) {
    System.out.println("fn=" + files);
    if (new File(files[i]).isFile())
         System.out.println("file[" + i + "]=" + files[i] + " size=" + (new File(files[i])).length() ); }

    pstein wrote:
    ...The following code does not work. Work?! It does not even compile! Please consider posting code in the form of an SSCCE in future.
    Here is an SSCCE.
    import java.io.File;
    class ListFiles {
        public static void main(String[] args) {
            java.io.File f = new java.io.File("/media/disk");
            // provides only the file names, not the path/name!
            //String[] files = f.list();
            File[] files = f.listFiles();
            for (int i = 0; i < files.length; i++) {
                System.out.println("fn=" + files);
    if (files[i].isFile()) {
    System.out.println(
    "file[" +
    i +
    "]=" +
    files[i] +
    " size=" +
    (files[i]).length() );
    }Edit 1:
    Also, in future, when posting code, code snippets, HTML/XML or input/output, please use the code tags to retain the indentation and formatting.   To do that, select the code and click the CODE button seen on the Plain Text tab of the message posting form.  It took me longer to clean up that code and turn it into an SSCCE, than it took to +solve the problem.+
    Edited by: AndrewThompson64 on Jul 21, 2009 8:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for