Problem with while loops, please help!

I am having quite a bit of trouble with a program im working on. What i am doing is reading files from a directory in a for loop, in this loop the files are being broken into words and entered into a while loop where they are counted, the problem is i need to count the words in each file seperately and store each count in an array list or something similar. I also want to store the words in each file onto a seperate list
read in files...
     //Go through each line of the first file
          while(matchLine1.find()) {
               CharSequence line1 =;
               //Get the words in the line
               String words1[] = wordBreak.split(line1);
               for (int i1 = 0, n = words1.length; i1 < n; i1++) {
                    if(words1[i1].length() > 0) {
                         int count= 0;
          }This is what i have been doing, but with this method count stores the number of words in all files combined, not each individual file, and similarly list1 stores the words in all the files not in each individual file. Does anybody know how i could change this or what datastructures i could use that would allow me to store each file seperately. I would appreciate any help on this topic, Thanks!

Don't try to construct complicated nested loops, it makes things a
tangled mess. You want a collection of words per file. You have at least
zero files. Given a file (or its name), you want to add a word to a collection
associated with that file, right?
A Map is perfect for this, i.e. the file's name can be the key and the
associated value can be the collection of words. A separate simple class
can be a 'MapManager' (ahem) that controls the access to this master
map. This MapManager doesn't know anything about what type of
collection is supposed to store all those words. Maybe you want to
store just the unique words, maybe you want to store them all, including
the duplicates etc. etc. The MapManager depends on a CollectionBuilder,
i.e. a simple thing that is able to deliver a new collection to be associated
with a file name. Here's the CollectionBuilder:public interface CollectionBuilder {
   Collection getCollection();
}Because I'm feeling lazy today, I won't design an interface for a MapManager,
so I simply make it a class; here it is:public class MapManager {
   private Map map= new HashMap(); // file/words association
   CollectionBuilder cb; // delivers Collections per file
   // constructor
   public MapManager(CollectionBuilder cb) { this.cb= cb; }
   // add a word 'word' given a filename 'name'
   public boolean addWord(String name, String word) {
      Collection c= map.get(name);
      if (c == null) { // nothing found for this file
         c= cb.getCollection(); // get a new collection
         map.put(name, c); // and associate it with the filename
      return c.add(word); // return whatever the collection returns
   // get the collection associated with a filename
   public Collection getCollection(String name) { return map.get(name); }
}... now simply keep adding words from a file to this MapManager and
retrieve the collections afterwards.
kind regards,

Similar Messages

  • Probably simple problem with while loops

    I was programming something for a CS class and came across a problem I can't explain with while loops. The condition for the loop is true, but the loop doesn't continue; it terminates after executing once. The actual program was bigger than this, but I isolated my problem to a short loop:
    import java.util.Scanner;
    public class ok {
    public static void main(String[] args){
         Scanner scan = new Scanner(;
         String antlol = "p";
         while(antlol == "p" || antlol == "P"){
              System.out.println("write a P so we can get this over with");
              antlol = scan.nextLine(); 
    //it terminates after this, even if I type "P", which should make the while condition true.

    Thanks, that worked.
    I think my real problem with this program was my CS
    teacher, who never covered how to compare strings,Here's something important.
    This isn't just about comparing Strings. This applies to comparing ANY objects. When you use == that compares to see if two references refer to the same instance. equals compares objects for equality in the sense that equality means they have equal "content" as it were.

  • Weirdest problem with ipod!PLEASE HELP ME!!!

    Okay, i tried to load a playlist that had about 100 songs on it. While its loading, the update just stops. My ipod starts going crazy.The apple logo keeps lighting up and then the light doesnt come on but the logo is still there. You can hear the inside of it like trying to come on but then it just keeps doing the same thing til the battery life runs out! I really need help on this! I've tried to reset but everytime I do it it just keeps doing the same thing. I dont know if i should wipe all my songs off of itunes or what but im so confused and so aggravated with it. PLEASE HELP ME! I'D REALLY APPRECIATE IT!
      Windows XP  

    Welcome to Apple Discussions!
    See if any of these help...
    iPod Only Shows An Apple Logo and Will Not Start Up
    iPod Only Shows An Apple Logo

  • Help needed with while loops please :)

    I'm beginning to study java at School.
    My assignment using while loops, to ask user to input 2 numbers.
    I have to output all odd number between the two.
    I have to output the sum of all even numbers between the two.
    Output all the numbers and their squares between 1-10.
    Output the squares of the odd numbers between the 2 numbers the user entered.
    Output all uppercase letters.
    If anyone can give me any help, I would appreciate it greatly.
    Thank you.

    It would help if you put aside your code, and wrote out some pseudo-code first so that you understand the steps you will need to take. for example
    get input from user
    set counter to first number entered
    while counter less than/ equal to second number
          check if number is even
               if even, add to even_sum
               else output counter, along with its square
          increment counter by one
    end while
    output sum of evensthat block, when coded, will solve 3 of the problems, the other 2 will require separate loops
    Good Luck

  • I suppose it is the problem with socket connection,Please help

    I'm trying to build a chat server in Java on Linux OS.I've created basically 2 classes in the client program.The first one shows the login window.When we enter the Login ID & password & click on the ok button,the data is sent to the server for verification.If the login is true,the second class is invoked,which displays the messenger window.This class again access the server
    for collecting the IDs of the online persons.But this statement which reads from the server causes an exception in the program.If we invoke the second class independently(ie not from 1st class) then there is no problem & the required data is read from the server.Can anyone please help me in getting this program right.I'm working on a p4 machine with JDK1.4.
    The Exceptions caused are given below Connection reset by peer: Connection reset by peer
    at Method)
         at$CharsetFiller.readBytes( :339)
         at Login.LoginData(
         at Login.test(
         at Login$Buttonhandler.actionPerformed(
         at javax.swing.AbstractButton.fireActionPerformed(
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(
         at javax.swing.DefaultButtonModel.fireActionPerformed(
         at javax.swing.DefaultButtonModel.setPressed(
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(
         at java.awt.Component.processMouseEvent(
         at java.awt.Component.processEvent(
         at java.awt.Container.processEvent(
         at java.awt.component.dispatchEventImpl(
         at java.awt.Container.dispatchEventImpl(
         at java.awt.Component.dispatchEvent(
         at java.awt.LightweightDispatcher.retargetMouseEvent(
         at java.awt.LightweightDispatcher.processMouseEvent(
         at java.awt.LightweightDispatcher.dispatchEvent(
         at java.awt.Container.dispatchEventImpl(
         at java.awt.window.dispatchEventImpl(
         at java.awt.Component.dispatchEvent(
         at java.awt.EventQueue.dispatchEvent(
         at java.awt.EventDispatchThread.pumpOneEvent(
         at java.awt.EventDispatchThread.pumpEvents(
         at java.awt.EventDispatchThread.pumpEvents(
         My program looks somewhat like this :
    1st class definition:
    public class Login extends Jframe// Login is the name of the first class;
    Socket connection;
    DataOutputStream outStream;
    BufferedReader inStream;
    Frame is set up here
    public class Buttonhandler implements ActionListener
    public void actionPerformed(ActionEvent e) {
    String comm = e.getActionCommand();
    if(comm.equals("ok")) {
    public void test() //checks whether the login is true
    new Messenger(ID);// the second class is invoked
    public boolean LoginCheck(String user,String passwd)
    //Enter the Server's IP & port below
    String destination="localhost";
    int port=1234;
    connection=new Socket(destination,port);
    }catch (UnknownHostException ex){
    error("Unknown host");
    catch (IOException ex){
    ex.printStackTrace ();
    error("IO error creating socket ");
    inStream = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    outStream=new DataOutputStream(connection.getOutputStream());
    }catch (IOException ex){
    error("IO error getting streams");
    System.out.println("connected to "+destination+" at port "+port+".");
    BufferedReader keyboardInput=new BufferedReader(new InputStreamReader(;
    String receive=new String();
    }catch(IOException ex){ error("Error reading from server");}
    }catch (IOException ex){
    error("IO error closing socket");
    // second class is defined below
    public class Messenger
    Socket connect;
    DataOutputStream outStr;
    BufferedReader inStr;
    public static void main(String args[])
    { Messenger mes = new Messenger(args[0]);}
    Messenger(String strg)
    void setupEvents()
    fram.addWindowListener(new WindowHandler());
    login.addActionListener(new MenuItemHandler());
    quit.addActionListener(new MenuItemHandler());
    button.addActionListener(new Buttonhandle());
    public void LoginData(String name)
    //Enter the Server's IP & port below
    String dest="localhost";
    int port=1234;
    int r=0;
    String str[]=new String[40];
    connect=new Socket(dest,port);
    }catch (UnknownHostException ex){
    error("Unknown host");
    catch (IOException ex){
    ex.printStackTrace ();
    error("IO error creating socket ");
    inStr = new BufferedReader(new InputStreamReader(connect.getInputStream()));
    outStr=new DataOutputStream(connect.getOutputStream());
    }catch (IOException ex){
    error("IO error getting streams");
    String codeln=new String("\n");
    outStr.writeBytes("[email protected]*&[email protected]#$%^");//code for sending logged in users
    String check="qkpltx";
    String receive=new String();
    while((receive=inStr.readLine())!=null) //the statement that causes the exception
    }catch(IOException ex){ex.printStackTrace();error("Error reading from socket");}
    catch(NullPointerException ex){ex.printStackTrace();}
    } catch (IOException ex){ex.printStackTrace();
    error("Error reading from keyboard or socket ");
    }catch (IOException ex){
    error("IO error closing socket");
    for(int l=0,k=1;l<r;l=l+2,k++)
    stud[k]=" "+str[l];
    public class Buttonhandle implements ActionListener
    public void actionPerformed(ActionEvent e) {
    //chat with the selected user;
    public class MenuItemHandler implements ActionListener
    public void actionPerformed(ActionEvent e)
    String cmd=e.getActionCommand();
    //Disconnect from the server
    else if(cmd.equals("Change User"))
         //Disconnect from the server & call the login window
    else if(cmd.equals("View Connection Details"))
    //show connection details;
    public class WindowHandler extends WindowAdapter
    public void windowClosing(WindowEvent e){
    //Disconnect from server & then exit;
    I�ll be very thankful if anyone corrects the mistake for me.Please help.

    You're connecting to the server twice. After you've successfully logged in, pass the Socket to the Messenger class.
    public class Messenger {
        Socket connect;
        public static void main(String args[]) {
            Messenger mes = new Messenger(args[0]);
        Messenger(Socket s, String strg) {
            this.connect = s;

  • I have a problem with my microphone, please help if you can

    Hello everyone.
    I have a problem with my microphone. After i bougth Creative's sound card "Sound blaster X-Fi Xtreme Audio" and installed it, everything was allright and my microphone was working great, but this was when I used Windows XP, when i started to use Windows 7, it suddenly was very weak and i almost didn't heard it.
    Currently, I have bouth Windows XP and Windows 7 installed, so I know the microphone is working when I am switching up between the OS, because it still works good on Windows XP.
    If you can help please tell me.
    I am using Windows 7 64 bit, I made sure the flexijack settings in the Audio controll panel are set to microphone and not line in, in the Windows 7 audio controll I have set the microphone volum to maximum and made sure it is configured properly.
    Thank you for helping.

    Originally Posted by tav2000
    Hello everyone.
    I have a problem with my microphone. After i bougth Creative's sound card "Sound blaster X-Fi Xtreme Audio" and installed it, everything was allright and my microphone was working great, but this was when I used Windows XP, when i started to use Windows 7, it suddenly was very weak and i almost didn't heard it.
    Currently, I have bouth Windows XP and Windows 7 installed, so I know the microphone is working when I am switching up between the OS, because it still works good on Windows XP.
    If you can help please tell me.
    I am using Windows 7 64 bit, I made sure the flexijack settings in the Audio controll panel are set to microphone and not line in, in the Windows 7 audio controll I have set the microphone volum to maximum and made sure it is configured properly.
    Thank you for helping.
    Hi tav,
    While waiting for other forum members to post..
    Perhaps you havent installed the latest drivers yet? (link HERE)

  • Problem with While Loop.

    Hi guys,
    i'm doing a pass exam java question, below is the question criteria.
    Write a program that allows a user to enter their mark attained in each unit and displays their grade. After all marks are entered the average mark is displayed.
    The main method should:
    Prompt the user to enter the number of units taken (check for NumberFormatException)
    Write a for loop to repeat for each subject, where each iteration
    Prompts the user to enter a mark ( a double) for unit 1, unit 2 etc. This should be in a while loop so if mark entered is less than 0 or greater than 100 the prompt will be repeated.
    Pass the mark to a method called getGrade.
    Display the returned grade
    Accumulate each mark
    Print the average mark to 2 decimal places
    The getGrade method should:
    Accept the parameter passed from the main method
    Determine the grade according to the following scale
    Return the grade
    The words that i highlighted in bold is the criteria.
    As you can see from the above question, i create an array , even though the question does not prompt me to create as what i know from tackling JavaQuestions "if it does not prompt me to add a criteria, it is ok to add it" :)
    below is my program code , in which the result i get is the same as the question result. BUT, from the above question it ask me to add a while loop, so if mark entered is less than 0 or greater than 100 the prompt will be repeated.
    But instead i use a do loop. :(
    so can anyone help me or show me how to create the while loop for mark entered is less than 0 or greater than 100 the prompt will be repeated, from my program code below. cause i want to know whether it possible to have a while loop instead of do loop for the my program and the while loop can work with an array criteria.
    import javax.swing.*;
    import java.text.DecimalFormat;
    public class Mark
        public static void main (String [] args)
            String unitStr;
            String markEnterStr;
            int validUnit;
            double total = 0;
            boolean validInput = true;
            DecimalFormat fmt = new DecimalFormat("#0.00");
            while (validInput)
            unitStr = JOptionPane.showInputDialog(null,"Enter number of units: ");
            validUnit = Integer.parseInt(unitStr);
            double[] markArray = new double[validUnit];
            validInput = false;
            for (int index = 0;index < validUnit; index++)
                markEnterStr = JOptionPane.showInputDialog("Please enter mark " +(index+1) +":");           
                markArray[index] = Double.parseDouble(markEnterStr);
                while(markArray[index] < 0 || markArray[index] >100);
                String correctMark = getGrade(markArray[index]);
                total = total + markArray[index];       
            double average = (double)total / validUnit;
            System.out.println("Average = " +fmt.format(average));                   
            catch (NumberFormatException e)
            public static String getGrade(double x)
                String grade;
                if (x < 50)
                grade = "Fail";
                else if (x < 60)
                grade = "Pass";
                else if (x < 70)
                grade = "Credit";
                else if (x < 80)
                grade = "Distinction";
                else grade = "High distinction";
                return grade;

    Hope u got it.
               markArray[index] = -1;
                while(markArray[index] < 0 || markArray[index] >100);
                markEnterStr = JOptionPane.showInputDialog("Please enter mark " +(index+1) +":");           
                markArray[index] = Double.parseDouble(markEnterStr);

  • Problems with Boot Camp - PLEASE HELP!

    I'm having problems with Boot Camp. Here's what's happening. I ran Boot Camp Assistant, partitioning a 32GB BOOTCAMP drive. I insert my copy of XP and start the installation. My MBP restarts and boots into the Windows Setup. I let it run through the initial actions. I press ENTER to proceed, F8 to accept the license agreement, then when I get to the part where I should be able to select the Partition 3 BOOTCAMP drive (as it says in the Apple Boot Camp Manual) there is only a Partition 1 Unknown drive. It is the only drive to choose from and its a C: drive. I can't figure out why after I run boot camp the partitioned drive doesn't appear as an option in the windows installation. Please help!!!
    Message was edited by: CarlConti08

    Boot into Leo, start Disk Utility and you should see two partitions, your Leo partition and a Fat32 partition of 32GB at the end of the drive.
    If not, boot camp didn't create it for some reason. If it is there then check it with DU and make sure its OK.
    While your in there give it a name so you can easily identify it in your windows installer.
    If there is no partition, create one using Disk Utility at the END if the drive. make sure you create it as a msdos (Fat32) partition and give it a name. The name cannot be more than 11 characters must be comprised of numbers and/or letters (no special characters).
    Verify it before exiting DU.
    Put in windows install disk, reboot - hold option key after the chime until you see the boot screen - select windows CD to begin install.
    Don't forget to install Leo windows drivers after installing windows.

  • Problem with "Package Spec" please help.

    Hello once again.
    I'm developing a master-detail form, so I'm using a "Package Spec" variable to hold the primary key value from the master form. The primary key value for the master is generated by a sequence.
    Here's the package spec:
    PACKAGE primary_keygen IS
    pkey varchar2(15); 
    END;Now the master table has the following "Before Insert" Trigger .
    primary_key_value varchar2(15);
    select lpad(to_char(ref_gen.nextval), 4,'0')
    into primary_key_value from dual;
    END;For the detail block. I have the following "Before Insert Trigger" to generate the primary key values.
    if :new.M_ref_number is NULL THEN
    ENd if;
    END;Works quite fine if I have only one detail block. But if I have multiple detail blocks. Depending on the user's selection. i.e. After entering data into the master block, the user selects a detail block ('Letter type'- using stacked canvases for this purpose and radio buttons for selecting the view) and then Inserts data into it. here's what I do in the Detail block2.
    if :new.O_ref_number is NULL THEN
    ENd if;
    END;Now the problem is that When I enter one record into detail1, works fine, but for the second time, when I try to insert another record. the master table gets a new reference number (primary key value) while the detail block gets the previous value that was used in the first record!, so that means 'pkey_gen.master_key' is holding the old value, while in my opinion it should hold the new value, I dont know whats wrong here. If I try to insert two consecutive records into the same detail table, I get an error saying "Unique Constraint voilated", becuase the variable is holding the old values.
    And lastly after it inserts the record into the database, I get a dialog box saying, "successfuly inserted 2 records into the database" and when I click ok, the Form closes by itself, any ideas on how to stop this?
    I'm really stuck here. Please help me out on this.
    Note: I'm using Form6i with Database 10g.
    Message was edited by:

    Maybe the best way to start is to try building a new form from scratch. For simplicity I will assume that you have one master and one detail table. Master table has a primary key and the detail table has a foreign key to the master. Based on this, with the forms you can create a database block based on your master table. Use the wizard. Again using the wizard, create a second block based on the detail table. You'll see a screen to prompt to create a relationship. Create one by selecting the master table and the right foreign key relation. Now take a close look to all triggers automatically created by the form. Also check the "Relations" object found in you master block object tree. Note that the foreight key column in the detail table has the "Copy Value From Item" property set to monitor the master block's primary key.
    This is the basic. You don't need the database triggers, except (in case you want to insert through, say, SLQPlus) the one for the master table, which will look like this:
    IF :new.ref_number IS NULL THEN
    select 'ABC/'||pad(to_char(ref_gen.nextval), 4,'0')
    into :new.ref_number
    from dual;
    END IF;
    Now you have to take care about the inserts in your form. Create PRE-INSERT trigger on the master block.
    IF :master.ref_number IS NULL THEN
    SELECT 'ABC/'||pad(to_char(ref_gen.NEXTVAL), 4,'0')
    INTO :master.ref_number
    FROM dual;
    END IF;
    Run the form and explore different situations to see how the form is keeping the data integrity.
    Compile with Shift+K (incremental). Sometimes forms blow just because not all of the trigers were compiled properly.
    Hope this helps...

  • Having problems with USB cable, please HELP!

    While trying to download aim/aol I was having problems with my USB cable and my phone being connected, it was like they were showing they were conneted but when I tried to download aim it said no drivers were recognised. My phone was giving me the option when the USB cable was plugged in asking me if I wantd to do something to do with the media mass storage.
    Anyway, once the drivers were downloaded to my comp and I plugged USB cable into my phone and comp i'm no longer being asked on my blackberry about the mass storage, my phone doesn't seem to be recogniaing tht it's linked up to my computer at all even though it's showing the little plug thing in my blackberry and coming up on the computer.
    Is there anybody out there who can help me?!

    Go to Options -> Media Card -> Mass Storage Mode Support: On
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

  • Activation problems with Cingular. Please help very frustrated

    Ok, here is the deal, I live in Orlando, FL most of the time, but I am in Michigan and I bougt 2 iphones today, that was 1000 bucks, plus 200 in security deposits. I went to cingular, payed the deposit, and now that im at home, i cant register the product. I have been on the phone with cingular suppost getting different reasons why i cant answer but i still want to check it out here. Im getting an address verification problem. The guy is saying that when we payed the sucurity deposit, we put our florida market address on file with the Pre Approved Credit Check Number. THere saying our sim cards are michigan sim cards, and its not letting me register because of the sim cards are not in the same market as the credit check number. I tunes keeps giving me an error of address though. Is anyone receiving this same problem? The error is saying that they cannot verify the address on file, as the address that im typing in, even though it is the same address. We tried changing everything to michigan, and still got the same problem. We changed the address on the credit check number, and the address that im trying to register in michigan.
    Please Help
    Thanks guys
    You can only imagine that im upset not being able to even power the thing up. It wont let you go past the emergency call feature since its not activated.

    Heres what you have to do Rodd...I used to be a RSM for Cingular.
    First you need to cancel your first activation because your sim cards have been set up with activation in Michigan you will get a Michigan area code, prefix, etc. If you did not set it up with the exact are that you paid the deposit in, then you will not be able to activate it.
    Ex: if I live in Texas, but want a California number, I have to go to Cali and set up my account, and then come back to Texas and I will have my Cali number while living in Texas.
    If you tried to set it up wrong to many times it flags your account.
    Either go back to the store you got them in and pay the security deposit again, or go to the closest ATT store in the area you would like to have your area code, prefix, etc. in.
    Example: if you want a Michigan number, then go to Michigan..and set up your account all in the same place that you want your number....Billing addresses can be different but the activation address will be where the iPhone number is given from.
    Hope this helps..God bless

  • Immportand. Problems with MB. Please help.

    Im having a problem with my PC in the moust unpleasent moment as I can’t do my college work and I cant afford new PC in the next 4 months, so any help with my problem will be grealty appriciated.
    Here is my problem.
    When I work and that’s usualy using Internet and Office XP my PC is starting to slow down (mouse cursor is scroling very slow, I cant close windows) and afther a while its turning off. Whell its not turn off exactly because CPU, GPU and PSU fans are still working but the monitor is turing on stand by. When this happens I can’t do restart so I have to puss power on/off button on the case of the PC to turn the PC off. If I try to turn in on afther that NumLock and CapsLock indicators on the keyboard will flash for a second as well as monitor and again only CPU, GPU and PSU fans works but the system is not starting. This happened several times and every time till now I waited for a day to start my PC again. That was till the last time. Now afther 4 days I still can’t to start my PC.
    When I opned the case four led diodes that are on my MSI mainboards were lightning red. In the manual explanation for this is “The procesor might be damage or not instaled properly. Damage/discharge lithium batery”
    I doubt that the problem is procesor because the PC will never start if the procesor is damaged of instaled properly.
    Iv also changed lithium batery but the problem remained.
    And another thing. PC Alert 4 somethimes showd that CPU and system tempetarure were 78 C. Afther this restart the system and went in bios to see if that was the real temperature but the bios showed 32 C for procesor and 22 for system.
    I have the latest drivers, bios and updates for windows. Iv checked for viruses with the latest updates for Pc-cillin 2002 and I didn’t find any viruses. Iv cheked every componets on other configuratios and they worked fine.
    Now a frend of me told me that the cause of problem are condenzator on mainboard araund the procesor.
    If you know whats is the problem please help me to resolve it.
    Thank you..

    Please tell us more about your system, including PSU.
    It sounds very, very much like a melted condensator. It is not hard to check:
    Open case and look for brown or darkcoloured... yecch... on the motherboard. Another symtom will be harder and harder to start and more and more frequent shut downs.
    There are people here I believe that can guide you to change them. I would get another board because the problem might happen again. In either case, save all important work, logins, etc. to an external unit. Mail it to a friend if nothing else is available.


    I've had it with the framework. It's been 20 hours and counting that I am trying to insert/validate a new record.
    Things just don't work as advertised.
    Here's the situation:
    I have an entity object with various validation rules in the validate() method.
    Then I have a simple JSP page to insert new records.
    At submit of button, I follow the framework's default
    create new row and fill it up, with the difference
    that i need to validate the row as soon as I fill it up
    with data from the http request:
    <jbo:OnEvent name="Create">
    <jbo:Row id="newrow" datasource="ds" action="CreateInRange" >
    <% try { %>
    <jbo:SetAttribute dataitem="*" />
    newrow.validate(); //******* NOTICE HERE THAT I VALIDATE
    } catch (JboException ex) {
    throw ex;
    } %>
    Unexpected behavior 1: If the validation fails,
    newrow DOES NOT GET REMOVED!!!! I know this
    since when I view data thru a data table component,
    the row is there WITH THE ERROR INFORMATION set!!.
    If I do a commit transaction, then the erroneous information ENDS UP IN THE DATABASE!!!!!
    Unexpected behavior 2: If I do a rollback, every
    call to subsequent pages results in a jsp error:
    java.lang.ClassCastException: oracle.jbo.html.jsp.datatags.OnEventTag
    Chris Lambrou

    I have (hopefully) found a solution to my part of this problem. I was getting the ClassCastExceptions on any page with a <jbo:row> tag after doing a failed DML action. I have tested this with the delete event. (btw, I am using jdev9.0.3.3 w/ BC4J/JSP) Before what I was doing was this:
    <% try { %>
    <jbo:Row id="delrow" datasource="ds" rowkeyparam="jboRowKey" action="Delete" />
    <% } catch (JboException jboEx) { %>
    do something
    <% } catch (Exception ex) { %>
    uh-oh, this is bad
    <% } %>
    If I removed the try/catch block everything worked fine. Unfortunatlely, I need to try/catch block here. To work around the problem I changed the code to this:
    <% Row rowDelete = ds.getRowFromKey(params.getParameter("jboRowKey")); %>
    <% try { %>
    <% } catch (JboException jboEx) { %>
    do something
    <% } catch (Exception ex) { %>
    uh-oh, this is bad
    <% } %>
    The second bit of code does the same thing (but it doesn't use a bean like I think <jbo:Row> does) and it doesn't cause the ClassCastError on subsequent errors.
    I really hope this helps someone else because it took me forever to get a workaround!
    ~Rob Lundeen

  • Having problems with Frontrow. Please help!

    i've been trying to figure this out all day today but i haven't found any solution. hopefully you Mac Geniuses can help. now, my problem isn't that my videos won't play, because they do. they all play perfectly. okay, so when i launch Frontrow, all my video files appear under their respective folders; my TV Shows appear under the TV Shows folder and my Music Videos appear under the Music Videos folder. however, for some strange reason, these files also want to appear under the Movies folder. That means they're showing up twice! -under the Movies folder and TV Shows/Music Videos. is there anyway to fix this, because it's really cluttering my Movies folder and i admit i'm a really anal neat-freak.
    Also, i have correctly labeled the video files as Movie, TV Show or Music Video under iTunes. Everything is organized well under iTunes, so i doubt it's that.
    please help!!
    Message was edited by: ec84

    It might be because with the new update, it seems as though anything stored in the MOVIES folder , shows up under movies in Front Row. I have a folder of Transformers AVI'S in my movie folder, now it shows up in the movie directory of front row

  • Messaging Problem with 3.0 Please Help

    I upgraded to 3.0 and now 3GS. Prior to this my wife was able to text me from her verizon blackberry, no issues and it came in on the iphone messaging. Now, somehow the iphone is changing it into an "email". The text appears as her [email protected] It's not a real email because it's not appearing in my home outlook server which is where the iphone pulls my emails from. This is way inconvient since the text doesn't appear till i go manually pull email. Anyone else have these issues. She didn't do anything different, just texts to my phone #? Techies please help.
    Paul in San Diego

    Hi Omid,
    As far as I am aware of you will need to have a two way trust to proceed with the integration.
    Cheers! Happy troubleshooting !!! Dinesh S. Rai - MSFT Enterprise Project Management Please click Mark As Answer; if a post solves your problem or Vote As Helpful if a post has been useful to you. This can be beneficial to other community members reading
    the thread.

Maybe you are looking for

  • IDES Installation error (RFC connection error)

    Hi Would someone help me? I have a problem while installing the IDES ,ECC 6.0 with MaxDB. (Linux) The installaiton of CI is holding in the phase " Checking the DDIC password "  and it seems a loop. Looking through sapinst.log ,  there is some message

  • Vendor Consignment - Account assignment

    My client wants to settle vendor consignments in two steps: 1. In the first step, they want to post the consignment to an interim G/L Account, instead of the vendor recon account as follows: Credit Interim G/L Account (instead of the vendor recon acc

  • Multithreading in Flash 11.4?

    Flash Player "Dolores" Adobe is planning an additional Flash Player release in the second half of 2012. Code-named "Dolores", this release focuses on enabling features and functionality for the gaming market, as well as improvements for general Flash

  • RTMT Specific PRI Active Channel Graph

    Is there a way in RTMT to see the active MGCP PRI B channels for a specific span?  It appears the only real time graph is a total count of all the active B channels registered to the cluster consisting of multiple PRIs, nothing span specific.  Any po

  • Trouble with making slide show VCD or copying photos to CD

    I have saved approximately 200 photos and made a copy of the photos on a cd.  The problem is that some of the photos copied horizontally instead of in vertical format.....the photos where all properly showing on the PSE7 organizer...but about 13 copi