Problem with while loop in thread: starting an audiostream

Hello guys,
I'm doing this project for school and I'm trying to make a simple app that plays a number of samples and forms a beat, baed on which buttons on the screen are pressed, think like fruity loops. But perhaps a screenshot of my unfnished GUI makes things a bit more clear:
[http://www.speedyshare.com/794260193.html]
Anyway, on pressing the play button, I start building an arraylist with all the selected samples and start playing them. Once the end of the "screen" is reached it should start playing again, this is the while loop:
public void run(){
        //System.out.println("Wavfiles.size =" + getWavfiles().size());
        System.out.println(repeatperiod);
        if (getWavfiles() == null) {
            System.out.println("Error: list of Wavfiles is empty, cannot start playing.");
        else{
            if(!active) return;
            while(active){
                System.out.println("Wavfiles.size =" + getWavfiles().size());
                for (int i=0; i<getWavfiles().size(); i++){
                    Wavplayer filePlayer = new Wavplayer(getWavfiles().get(i).getStream());
                    Timer timer = new Timer();
                    //timer.scheduleAtFixedRate(filePlayer, getWavfiles().get(i).getStartTime(),repeatperiod);
                    timer.schedule(filePlayer, getWavfiles().get(i).getStartTime());
                try {
                    Thread.sleep(repeatperiod);
                } catch (InterruptedException ex) {
                    Logger.getLogger(LineBuilder.class.getName()).log(Level.SEVERE, null, ex);
    }But once the second iteration should begin, I'm getting nullpointerexceptions. These nullpointerexceptions come exactly when the second period starts so I suppose the sleep works :-) The nullpointerexception comes from the wavfile I try to play. Wavfile class:
package BeatMixer.audio;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.TimerTask;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.SourceDataLine;
import javax.sound.sampled.UnsupportedAudioFileException;
public class Wavplayer extends TimerTask {
        private SourceDataLine auline;
        private AudioInputStream audioInputStream;
     private final int EXTERNAL_BUFFER_SIZE = 524288; // 128Kb
     public Wavplayer(ByteArrayInputStream wavstream) {
          try {
               audioInputStream = AudioSystem.getAudioInputStream(wavstream);
          } catch (UnsupportedAudioFileException e1) {
               e1.printStackTrace();
               return;
          } catch (IOException e1) {
               e1.printStackTrace();
               return;
                AudioFormat format = audioInputStream.getFormat();
          DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);
                try {
               auline = (SourceDataLine) AudioSystem.getLine(info);
               auline.open(format);
          } catch (LineUnavailableException e) {
               e.printStackTrace();
               return;
          } catch (Exception e) {
               e.printStackTrace();
               return;
    @Override
     public void run() {
                System.out.println(auline);
          auline.start();
          int nBytesRead = 0;
          byte[] abData = new byte[EXTERNAL_BUFFER_SIZE];
          try {
               while (nBytesRead != -1) {
                    nBytesRead = audioInputStream.read(abData, 0, abData.length);
                    if (nBytesRead >= 0)
                         auline.write(abData, 0, nBytesRead);
          } catch (IOException e) {
               e.printStackTrace();
               return;
          } finally {
               auline.drain();
               auline.close();
}auline is null on second iteration, in fact, getAudioInputStream doesn't really work anymore, and I don't know why because I don't change anything about my list of wavfiles as far as I know... Any thoughts or extra info needed?
Edited by: Lorre on May 26, 2008 12:22 PM

Is my question not clear enough? Do you need more info? Or is nobody here familiar with javax.sound.sampled?
Edited by: Lorre on May 26, 2008 2:07 PM

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(System.in);
         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.

  • 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
    for(...)
    read in files...
         //Go through each line of the first file
              while(matchLine1.find()) {
                   CharSequence line1 = matchLine1.group();
                   //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;
                                           count++;
                             list1.add(words1[i1]);
              }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,
    Jos

  • 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.
    thanks
    htw.
    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: ");
            try
            validUnit = Integer.parseInt(unitStr);
            double[] markArray = new double[validUnit];
            validInput = false;
            for (int index = 0;index < validUnit; index++)
                do
                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]);
                System.out.println(correctMark);
                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);
                }VJ

  • Time not stopping with while loop

    Hello,
    I've attached my VI.  I am having trouble with while loops.
    I want to turn on LEDs. The first LED should turn on after 3s.  The second LED should turn on after 5s.  The third LED will turn on later. 
    The LEDs turn on based on the following conditions:
    Case 0: numeric control > 10 then led_1 off, led_2 off, led_3 off
    Case 1: numeric control <= 10 then led_1 on, led_2 on, led_3 on
    Case 2: numeric control <=5 then led_3 on
    Because of the way I'm delaying time, I have the following problems
    Case 1 --> case 2: led_3 doesn't come on right away
    Case 2 --> case 1: led_3 doesn't turn off right away
    Putting probes in certain areas leads me to believe that these problems are due to the way the time delay is being generated.
    Thanks in advance.
    EDIT: Looking at it more...it seems to be that when the stop condition is true, the loop runs one more iteration. Is there a way to keep it from running that "one more iteration."
    Attachments:
    timing.vi ‏15 KB

    One of the problems is that your VI is not able to "breathe" because it is sometimes trapped inside inner loops that consume all CPU and step on each others toes. All you need is an single outer loop and a few shift registers.
    May of your specifications are still not clear, for example what should happen to LED 1&2 in case #3? Should they remain in the state they are in, or should they turn off, for example.
    Here is a simple rewrite that spins the outer loop at a regular rate, has no inner loop, and does not need any local variables or value property nodes. See if it makes sense. Also note that your code can be simplified dramatically by using arrays. Since the stop button is read with each of the regular interations, we don't need to worry about sequencing.
    Most likely you need to do a few simple modofications, because your specs are not clear.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    timingMODCA.vi ‏15 KB

  • Trouble with while loop, not sure what to put in it in my project

    I'm making a class to a simple command line craps game. I must use a while loop to implement craps rules. The rules that i was given are:
    if your first roll is a 4, 5, 6, 8, 9, or 10, you roll again until either you get a 7 (you lose) or you get the number from your first roll. (i thought 7 or 11 wins, like in the next example)
    yeah, thats right, not very good directions. The first directions i had for a different way of doing it using if and else statements were:
    The player rolls the two dice.
    If the sum of the resulting die values is 7 or 11, the player wins.
    If the sum is 2, 3, or 12, the player loses.
    If something else is rolled, the player has to roll again to determine the outcome.
    If the sum of the second roll is the same as what the player rolled the first time, the player wins. Otherwise the player loses.
    (You might get a pair of dice and play a few rounds to try it.)
    here's my code that i have so far for my craps class, in the middle section, i have previous code that i used for if else statements, that is what im trying to replace: package games;public class Craps {
    private Dice dice1;
    private Dice dice2;
    private int gamesPlayed;
    private int gamesWon;
    private boolean lastGameWon;
    private boolean gameOver;
    private int firstRoll;
    private int secondRoll;
    public Craps() {
    dice1 = new Dice(6);
    dice2 = new Dice(6);
    gamesPlayed = 0;
    gamesWon = 0;
    lastGameWon = false;
    firstRoll = 1;
    secondRoll = 2;
         //returns firstroll
    public int getFirstRoll(){
    return firstRoll;
         //returns secondroll
    public int getSecondRoll(){
    return secondRoll;
    public int getGamesPlayed(){
    return gamesPlayed;
    public int getGamesWon(){
    return gamesWon;
    public boolean lastGameWon(){
    return lastGameWon;
         public int nextSum()
         dice1.roll();
         dice2.roll();
         return dice1.getSideUp() + dice2.getSideUp();
    public void play()
              firstRoll = nextSum();
    if (firstRoll == 7 || firstRoll == 11)
              gameOver = true;
              gamesWon++;
              if (firstRoll == 2 || firstRoll == 3 || firstRoll == 12)
              gameOver = true;
                   else{
                   gameOver = false;
              while (gameOver == false)
              secondRoll++;
    public String toString()
    return "games - " + gamesPlayed + ", won - " + gamesWon + ", last game won - " + lastGameWon + " First Roll - " + firstRoll +
    ", Second Roll - " + secondRoll;
    i'm really confused on how to get the while loop will keep starting the game over if it is false, am i using the right approach? Also i have to use a while loop, its for a school project.
    thanks.

    The code you asked for could be:
    package games;
    public class Craps {
        private Dice dice1;
        private Dice dice2;
        private int gamesPlayed;
        private int gamesWon;
        private boolean lastGameWon;
        private boolean gameOver;
        private int firstRoll;
        private int secondRoll;
        public Craps()
            dice1 = new Dice(6);
            dice2 = new Dice(6);
            gamesPlayed = 0;
            gamesWon = 0;
            lastGameWon = false;
            firstRoll = 1;
            secondRoll = 2;
         //returns firstroll
        public int getFirstRoll(){
            return firstRoll;
         //returns secondroll
        public int getSecondRoll(){
            return secondRoll;
        public int getGamesPlayed(){
            return gamesPlayed;
        public int getGamesWon(){
            return gamesWon;
        public boolean lastGameWon(){
            return lastGameWon;
        public int nextSum()
            dice1.roll();
            dice2.roll();
            return dice1.getSideUp() + dice2.getSideUp();
        public void play() {
            gamesPlayed++;
            firstRoll = nextSum();
            if (firstRoll == 7 || firstRoll == 11)
                gamesWon++;
                lastGameWon = true;
            else if (firstRoll == 2 || firstRoll == 3 || firstRoll == 12)
                lastGameWon = false;
            else
               secondRoll = nextSum();
               if (firstRoll == secondRoll)
                  gamesWon++;
                  lastGameWon = true;
               else
                  lastGameWon = false;
        public String toString()
            return "games - " + gamesPlayed + ", won - " + gamesWon + ", last game won - " + lastGameWon + " First Roll - " + firstRoll +
                    ", Second Roll - " + secondRoll;
    }I'm not sure of craps rules, the code above makes a first roll and if game isn't won or lose at once (7 and 11 wins, 2,3 or 12 lose) a second roll is done. If the second roll is equals to the first made then the game is won else the game is lose. Is it right?

  • Timing with while loop

    Hello,
    How can I do a time with while loop?. I want to read a data in the While- Loop for 1 sec and then go to B .. I added a pic,
    Attachments:
    while- loop.GIF ‏6 KB

    nichts wrote:
    Hello,
    How can I do a time with while loop?. I want to read a data in the While- Loop for 1 sec and then go to B .. I added a pic,
    I would use as GerdW has mentioned,"elapsed time.vi" in a statement 1st case structure, after set time has elapsed> goto 2nd case structure. try not to use flat sequences....this can be done with case statements with transitional coding. I have noticed young LV programmers like to use flat sequences...I think it's a trap set up by LV developers? 

  • Ending Java War game with while loop

    How would i go about ending a java war game witha while loop. I want the program to run until all of the values of one of the arrays of one of the players split decks has all null values.

    GameObject[] theArrayInQuestion;
    // populate array somehow or other
    void methodWithLoop() {
       while(arrayNotNull(theArrayInQuestion)) {
       // do stuff
    boolean arrayNotNull(Object[] array) {
      int len = array.length;
      for(int i = 0; i < len; i++) {
        if ( array[i] != null ) {
          return true;
      return false
    }

  • Problems with opening file with while loop

    Greetings everyone,
      This is probably a quick question, but I am familiarizing myself how to open data files in Labview. The attached code works if you enter a file from the folder button on the front panel. However, if the path is blank and you hit the run (arrow) button, a dialog box comes up and asks for the file.
       I select the file, but the dialog box keeps coming up. I think this has something to do with my while loop. Can anyone tell me where I am going wrong?
      Thanks!
       TheLT
    Solved!
    Go to Solution.
    Attachments:
    ReadingfromData.vi ‏27 KB

    TheLT,
    1. crossrulz was right. The Read FromSpreadsheet File.vi opens and closes the file each time it is called. If no file path is present at the input when it is called, it will pop up a file dialog.
    2. LabVIEW uses a dataflow paradigm. In your program the effect of this is that the File path control is read almost immediately when the program is started and never again after that. So, if the program is already running when the file is selected in that control, the new value is never read and the value (empty) in the control when the rpogram started is used.
    3. The fix is to use an event structure with a file path Value Changed event to detect when the control has a value entered and then read the file.
    4. Sequence structures obscure code, make it difficult to modify and extend code, and can almost always be eliminated by effective use of dataflow.  Local variables should not be used just to pass data around.  Wire is always the best way when possible. In your program adding a few wires allows elimination of the sequence structure and the local variables.
    5.  Your graph loop should have some kind of delay or wait.  No need for it to run as fast as the processor will allow - and to hog all the CPU time - to repeatedly put the same data onto the graph.  This is another place where an event structure is appropriate. Only update the graph when the X-Axis or Y-Axis selections have changed. Note: Accepted best practice is to use only one event structure in a program, although there are a few advanced cases where multiple event structures are appropriate.  You only need one.
    6. If the slected file does not contain the "endheader" string, the program will never stop.  Add a test for EOF to stop the program if the End of File is reached without finding the flag.
    Lynn
    Attachments:
    ReadingfromData.2.vi ‏27 KB

  • Problem using while loop with !=

    Hi, I'm a beginner and still learning the basics of Java!
    Right now, I have a problem creating a while loop to read in two values.
    This is what I have entered:
    while((input != 'a') || (input != 'b'))
           Screen.out.println("Invalid Input");
           Screen.out.println("Enter 'a' or 'b' to continue");
           input = Keybd.in.readChar();
    }    I'm trying to get a input from the user, either the character 'a' or 'b' to continue, where my next set of code would come in and if they did not enter the character 'a' or 'b', it would display the "Invalid Input" message.
    What I can't get to happen in my while loop is that when I enter 'a' or 'b' , I still get the "Invalid Input" message etc. Even when I enter any other character in, I still get the same "Invalid Input" message. I thought the " != " mean "not equal to" and the " || " means OR. What am I doing wrong??

    while((input != 'a') && (input != 'b'))The || operator evaluates to true if either operand is true. If you enter an 'a', (input != 'b') is true, so the code gets executed. Similarly, if you enter 'b', you obviously didn't enter an 'a', so your code gets executed.
    You want to execute the code only if (input != 'a') AND (input != 'b').
    ~

  • Problems with notify/wait on threads

    I have a few Player threads connected to some game server.
    The first player to connect ("Player1") starts a timer to 10 seconds. During this time all other connected players can't do anything. When the 10 seconds are up the game starts.
    My idea is that if the current thread is Player1 then it sleeps for 10 seconds and then calls notifyAll() to wake up all other player threads. Other player threads will wait() until they are notified by Player1. Problem is I can get Player1 to sleep and wake up but my notifyAll() calls don't wake the other players up.
    My basic server connection code:
    // a for loop to create players and add them to a vector ("players"). Run player threads as soon as they connect
    players.add( new Player( server.accept(), maze, this, i + 1);
    players.get(i).start();The run() for Players:
    public void run()
      synchronized( this)
        if( Thread.currentThread().getName.compareTo( "Player1") == 0)
          sleep( 10 * 1000);
          // game_started is a condition var, init to false
          game_started = true;
          notifyAll();
        else
          while( !game_started)
            try
              wait();
            catch( Exception e) {}
    }Somehow my others threads keep waiting even thought the notify signal has been sent. They just keep waiting.
    Any suggestions on what I'm doing wrong?

    Well the problem is that you seem a bit confused over the way wait and notify/notifyAll work.
    Wait (and notify) work with thread against an object monitor. What this means is that you need a common object shared among the threads that they are calling wait/notify on.
    Note that the Javadoc says this about wait
    wait() - Causes the current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object.And about notifyAll
    notifyAll() - Wakes up all threads that are waiting on this object's monitor.So the problem is you have these threads waiting and notifying themselves. Which isn't what you want. See this section of [_the concurrency (threading) tutorial_|http://java.sun.com/docs/books/tutorial/essential/concurrency/guardmeth.html] for more on how to use wait/notify/notifyAll.

  • Problem with deploying : SDM could not start the J2EE cluster on the host .

    Hello, All
    I have following problem with deploying the aplication I get  this messenger:
    16/09/2008 07:59:44 PM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] ERROR:
    [001]Deployment aborted
    Settings
    SDM host : 192.168.0.14
    SDM port : 50018
    URL to deploy : file:/C:/DOCUME1/PENITU1/LOCALS~1/Temp/temp47114ZChangeRequestDatabase.ear
    Result
    => deployment aborted : file:/C:/DOCUME1/PENITU1/LOCALS~1/Temp/temp47114ZChangeRequestDatabase.ear
    Aborted: development component 'ZChangeRequestDatabase'/'local'/'LOKAL'/'0.2008.05.03.04.24.17'/'0':
    SDM could not start the J2EE cluster on the host Jupiter! The online deployment is terminated. There is no cluster control instance running on host Jupiter which is described in SecureStorage . The instances, returned by MessageServer [MS host: Jupiter; MS port: 3901], are :|Name:JM_T1221612526745_0_penitus15 |Host:PENITUS15 |State:5|HostAddress:192.168.0.205||Name:JM_T1221612357814_0_Jupiter |Host:pfs |State:5|HostAddress:192.168.0.14||Name:JC_Jupiter_JTP_00 |Host:pfs |State:5|HostAddress:192.168.0.14|Please check if there is an appropriate running cluster instances.
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).STARTUP_CLUSTER)
    Deployment exception : The deployment of at least one item aborted
    I dont'n know  How do I  solver this error?
    - I reviewed the virtual memory and I increase the virtual memory
    - I restarted the server and  the system
    - I reviwed the parameter in the config tool --> cluster --> security storage it is OK
    Any suggestion for solver this  problem
    Thanks
    Regards
    DS

    I found this messenger in   Additional log information., Please si 
    17/09/2008 03:04:51 PM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] INFO:
    [004]Additional log information about the deployment
    <!LOGHEADER[START]/>
    <!HELP[Manual modification of the header may cause parsing problem!]/>
    <!LOGGINGVERSION[1.5.3.7185 - 630]/>
    <!NAME[C:\usr\sap\JTP\JC00\SDM\program\log\sdmcl20080917200328.log]/>
    <!PATTERN[sdmcl20080917200328.log]/>
    <!FORMATTER[com.sap.tc.logging.TraceFormatter(%24d %s: %m)]/>
    <!ENCODING[Cp1252]/>
    <!LOGHEADER[END]/>
    Sep 17, 2008 1:04:40 PM  Info: -
    Starting deployment -
    Sep 17, 2008 1:04:40 PM  Info: Error handling strategy: OnErrorStop
    Sep 17, 2008 1:04:40 PM  Info: Prerequisite error handling strategy: OnPrerequisiteErrorStop
    Sep 17, 2008 1:04:40 PM  Info: Update strategy: UpdateAllVersions
    Sep 17, 2008 1:04:40 PM  Info: Starting deployment prerequisites:
    Sep 17, 2008 1:04:40 PM  Info: Loading selected archives...
    Sep 17, 2008 1:04:40 PM  Info: Loading archive 'C:\usr\sap\JTP\JC00\SDM\program\temp\temp62604ZIssueDatabase.ear'
    Sep 17, 2008 1:04:41 PM  Info: Selected archives successfully loaded.
    Sep 17, 2008 1:04:41 PM  Info: Actions per selected component:
    Sep 17, 2008 1:04:41 PM  Info: Initial deployment: Selected development component 'ZIssueDatabase'/'local'/'LOKAL'/'0.2008.04.17.10.53.03'/'0' will be deployed.
    Sep 17, 2008 1:04:41 PM  Info: Ending deployment prerequisites. All items are correct.
    Sep 17, 2008 1:04:43 PM  Error: Unable to compare host[Jupiter] and host[PENITUS15] Throwable: java.net.UnknownHostException Throwable message: PENITUS15: PENITUS15
    Sep 17, 2008 1:04:45 PM  Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs: pfs
    Sep 17, 2008 1:04:45 PM  Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs
    Sep 17, 2008 1:04:45 PM  Info: Saved current Engine state.
    Sep 17, 2008 1:04:45 PM  Info: Starting: Initial deployment: Selected development component 'ZIssueDatabase'/'local'/'LOKAL'/'0.2008.04.17.10.53.03'/'0' will be deployed.
    Sep 17, 2008 1:04:45 PM  Info: SDA to be deployed: C:\usr\sap\JTP\JC00\SDM\root\origin\local\ZIssueDatabase\LOKAL\0\0.2008.04.17.10.53.03\temp62604ZIssueDatabase.ear
    Sep 17, 2008 1:04:45 PM  Info: Software type of SDA: J2EE
    Sep 17, 2008 1:04:45 PM  Info: ***** Begin of SAP J2EE Engine Deployment (J2EE Application) *****
    Sep 17, 2008 1:04:45 PM  Error: Unable to compare host[Jupiter] and host[PENITUS15] Throwable: java.net.UnknownHostException Throwable message: PENITUS15
    Sep 17, 2008 1:04:45 PM  Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs
    Sep 17, 2008 1:04:45 PM  Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs
    Sep 17, 2008 1:04:45 PM  Info: Starting cluster instance processes.
    Sep 17, 2008 1:04:45 PM  Error: Unable to compare host[Jupiter] and host[PENITUS15] Throwable: java.net.UnknownHostException Throwable message: PENITUS15
    Sep 17, 2008 1:04:45 PM  Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs
    Sep 17, 2008 1:04:45 PM  Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs
    Sep 17, 2008 1:04:45 PM  Error: An error occured while starting a cluster instance.
    Sep 17, 2008 1:04:45 PM  Error: There is no clutser control instance running on host Jupiter which is described in SecureStorage .
    The instances, returned by MessageServer [MS host: Jupiter; MS port: 3901], are :
    Name:JM_T1221672404781_2_penitus15
    Host:PENITUS15
    State:5
    HostAddress:192.168.0.215
    Name:JM_T1221679486171_0_Jupiter
    Host:pfs
    State:5
    HostAddress:192.168.0.14
    Name:JC_Jupiter_JTP_00
    Host:pfs
    State:5
    HostAddress:192.168.0.14
    Please check if there is an appropriate running cluster instances.
    Sep 17, 2008 1:04:45 PM  Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
    Sep 17, 2008 1:04:45 PM  Error: Aborted: development component 'ZIssueDatabase'/'local'/'LOKAL'/'0.2008.04.17.10.53.03'/'0':
    SDM could not start the J2EE cluster on the host Jupiter! The online deployment is terminated.
    There is no clutser control instance running on host Jupiter which is described in SecureStorage .
    The instances, returned by MessageServer [MS host: Jupiter; MS port: 3901], are :
    Name:JM_T1221672404781_2_penitus15
    Host:PENITUS15
    State:5
    HostAddress:192.168.0.215
    Name:JM_T1221679486171_0_Jupiter
    Host:pfs
    State:5
    HostAddress:192.168.0.14
    Name:JC_Jupiter_JTP_00
    Host:pfs
    State:5
    HostAddress:192.168.0.14
    Please check if there is an appropriate running cluster instances.
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).STARTUP_CLUSTER)
    Sep 17, 2008 1:04:45 PM  Info: Starting to save the repository
    Sep 17, 2008 1:04:46 PM  Info: Finished saving the repository
    Sep 17, 2008 1:04:47 PM  Info: J2EE Engine is in same state (online/offline) as it has been before this deployment process.
    Sep 17, 2008 1:04:47 PM  Error: -
    At least one of the Deployments failed -
    Any help will be well received about this problema
    Thk
    Regards
    DS

  • Problem with one loop in another one

    When I drag and move cursor, X scale position will be show below. And then I click “add data in array”, the data should be put into array. I can move cursor again to add the second , the third ….into array.
    My problem is:
    In block diagram, once loop2 is outside of loop 1, it works. But I really want loop2 is in loop1 regarding to the rest part of the program. However, we I move loop2 into loop1, when I move cursor, nothing happens.
    Please help to make it work or you have different way to do this job.
    Thank you very much
    Liming
    Attachments:
    yxxx.vi ‏29 KB

    Hey, no need to make it so complicated.  Just add an indicator on the CursLoc.X wire in the  "0 To 5 MHz": Cursor Move  case.
    To answer your questions:
    1) The indicator does not react because you are still within the inner while loop.  It will not change until that loop completes. I.e. the stop button is pressed.
    2) Similarly, the stop 2 button will press, but nothing will happen until the inner loop is done.
    Generally, when I am using an event structure, I try to keep all the changing UI inputs and outputs in the same while loop with the event structure, if not in the event structure itself.  Local variables and property nodes can get the job done, but they are inefficient and can be difficult to debug.  As I am sure you are discovering
    Message Edited by jasonhill on 04-07-2006 12:40 PM
    Attachments:
    cursor position indicator.PNG ‏7 KB

  • SubVI with while loop + event structure not working in multi tab VI

    Hello Everyone,
    I am developing an interface for the control of a prober using Labview 2012, and I am stuck with some issue.
    To start with I provide you with a simplified version of my control interface VI, and with the sub-VI used to build and manage the wafer maps.
    The VI consists of several tabs: Prober Initialization, Wafer Handling, Wafer Map, Status, Error.
    The sub-VI can:
    1/ initialize the grid to display the map (sub VI Init Grid not provided here)
    2/ import XY coordinates from a txt file (sub VI Wafer Map Import)
    3/ display the coordinates and index of the die below the cursor
    4/ and when a die position is double clicked, and the boolean "Edit Wafer Map" is true, then the user can change the state (color) of the die between On-wafer die and Selected Die
    My issue:
    If I use the sub-VI by itself, it works fine. However when I use it as a sub-VI in the tab "Wafer Map", the map does not build up and I can no further use the embedded functionalities in the sub-VI.
    I suspect the while loop + event structure of the sub-VI to be the bottleneck here.
    However I don't know which way to go, that's why I'd be glad to have some advice and help here.
    Thank you.
    Florian
    Solved!
    Go to Solution.
    Attachments:
    Control Interface.zip ‏61 KB

    Hi NitzZ,
    Thank you for your reply.
    I tried to save the VIs in LV10, please tell me if you can open them now.
    Inside he event structure there is quite some code, and since I don't want to make the main vi too bulky, I would like to keep it as a sub-VI. 
    As you can see from the sub-VI, the event structure is used for extracting cursor position and tracking the double click action. These events are linked, through a property node, to the image "Wafer Map" which is passed to the main vi through connector pane.
    All values are passed this way as well (through connector pane). Is there another way?
    Maybe "refnum", but I don't really understand how to use them...
    If I use the event structure in the main vi, the wafer map is still not working. I tried it earlier.
    To implement the multi tab front panel, I used a tab control, and a for loop + case structure. For each element of the case structure, there is a corresponding action.
    For the case where I put the code (element=2) for Wafer Map, I also control the execution of the code with a case structure activated by the button "REFRESH". Otherwise I end up with a freezing of the panel right after the start.
    I hope these comments help you understand better.
    Regards,
    Florian
    Attachments:
    Control Interface.zip ‏104 KB

  • Problems with using Option key when starting up

    I have 3 internal drives using a PCI card (2 slots) that allows me to use large drives with more capacity than stock allowance on my G4 Quicksilver 867 mhz 1.5 GB RAM tower.
    All drives are Seagate Baracudas ATA: 2-400GBs and 1-200GB. I bought the 400s at the same time.
    My main drive has OSX 10.4.11 (#1), and it is backed up to Baracuda #2 (400GB) which is a slave to my Main drive (using SuperDuper All files for a mirror bootable copy). The 3rd drive has Leopard 10.5.1 for learning and trying Leopard.
    On the second PCI slot is the smaller 200GB Baracuda.
    After backing up using SuperDuper (Main to #2) as a mirror, I see #2 in the Apple > Prefs > Start Up Disk.
    After the first backup I can see all 3 drives when using Option key at startup, but instead of seeing the names of each drive under the normal hard disk icons, #2 has a SCSI icon underneath the hard drive icon, it's name (Mac BU) is missing and I can't start up to it. The other #1 and #3 looked as expected. I chose #1, it launched, fine.
    On second backup, #2 is still in Prefs > Start up Disk panel, but this time doesn't show up on when using the Option key at start up. I have replicated this, but erasing #2, rebacking up twice.
    With only the #1 and #3 drives showing at start up with Option key and #1 selected in the Start up Disk panel, I chose #3 (Leopard) in the Option window view, and my G4 froze at the gray apple screen. I hard shut downed, powered up and the G4 defaulted to Main (10.4.11)
    I selected #3 Leopard in Prefs > Start Up Disk, restarted OK.
    I restarted with the Option key (only #1 and #3 show) and now my main drive didn't have it's name only the SCSI icon under the normal hard disk icon like #3 was doing. UGH!
    Nervously, I chose #3 with Leopard and the G4 started up to it OK.
    I then reselected my Main #1 drive in the Start Up Disk panel, restarted to #1 OK.
    OK, problems summary:
    1) I can't use SuperDuper to create a blessed bootable #2 drive at Option start up, but I mention this for more info about a possible problem at Option startup, more than I want comment on SuperDuper potential bug / conflict.
    2) I didn't try choosing #3 in the Start Up Disk panel, as I was affraid the G4 would freeze and then I might not be able to select either of the other #1 or #3 at Option start up as something is wrong with using Option key start up, and #3 would have been selected in Start Up Panel, which I was afraid I might not be able to get to again.
    2) When I start up either of #1 or #3, I get momentary black screens after the gray apple screen at Option key start up and then again after the apple progress bar. This doesn't happen when I start up directly either drive when the drives are selected using the Start Up Disk panel
    When using the Option startup, I am experiencing the above problems.
    Whew, I know, but does anyone have any input and fixes?
    Thanks, in advance,
    Steven

    Hi Dave.
    Well... good news / bad news
    Turns out, I have an Acard 6280M and have 3 drives connected to it as mentioned (#1 & 2 are mirrored using SuperDuper with 10.5.1, #3 is a clean install off a new Apple OSX disk 10.5, then updated to 10.5.1)
    I also have a Firewire external drive, that I used SuperDuper to make it a mirror of #1, using the same procedure backing up #1 to #2, to test SuperDuper.
    The firmware update directions tells you to start up off a drive not on the PCI card, I used #4.
    While running off #1, I selected #4 in the Start Up disk pref and it booted OK! This seems to rule out SuperDuper being the problem - of creating a mirror from #1 to #2 (both on the Acard) and then not seeing #2 in the Option key boot screen.
    I applied the firmware, which directs you to first update the Acard driver to 2.06, which is included in the folder with the firmware updater.
    I did this and then applied the firmware updater.
    I then applied the driver upgrade to drives #1 and #2 (10.4.11) while running off #4. I did not apply the driver update to #3 (10.5.1) and restarted, using Option key.
    All 4 drives appeared successfully on screen as expected with their names!
    Then I selected each drive one by one:
    #1 = kernal panic. Hard shut down, used Option key again
    #2 = kernal panic, same as #1
    #3 = froze at gray Apple screen - no spinning gear. Hard shut down.
    Tthankfully, left Start Up disk pref to be #4 external and on restart, let the system boot off without going to the Option screen. #4 booted OK. Whew...
    So all 3 drives on the Acard, won't boot. I was concerned it was the 2.06 driver, but since it wasn't applied to #3 Leopard drive, I'm assuming the firmware is the issue and perhaps not compatible with 10.4.11 or 10.5.1?
    Two things I've not tried:
    1) With #4 selected in Sys Prefs, then using Option key and selecting #4 there too to see if using the Option key selector is a problem too.
    2) Selecting any of #1, #2, or #3 drives in Sys Prefs and restarting without Option key selector.
    My fear is that if my last working drive #4 isn't the default drive set in Sys Prefs, if Acard isn't the problem alone and there is also a problem selecting any drive using the Option key - even #4, then if #4 isn't the default and all 3 Acard drives panic on regular boot (non-Option key) and I have to hard restart, will keep defaulting to whatever drive I set in the Sys Prefs and not be able to get back to #4.
    Should I just go to my local computer store and see if they have a newer model PCI card and trash my existing one as I may have ruined it with the firmware updater?
    Thoughts?

Maybe you are looking for

  • VGA but no DVI?

    I have a 975x Power Up Edition mobo and was running a Geforce FX1400 dual screen till the card died. So far, I have tried an MSI card (Radeon x1650) and another Radeon X4350 but can't get a DVI signal. I can get VGA out of both ports. All drivers etc

  • Channel Entitlement

    Hi guys, Is there any way on the website of telling exaxtly which channels I am entitled to on BT Vision? The short and tall of it is I ordered BT Vision Essentials to go alongside my BT Infinity package, I could get all of the 'Essential' channels b

  • MacBook Pro Retina (rMBP) Running Slow; System Resources unused.

    Hey! My Mac runs extremely slow in certain applications such as Final Cut Pro and GarageBand, to the point that the applications are relatively unusable, e.g. waiting 10 seconds for music in GarageBand to start playing after pressing play. However, w

  • How to create L-Shaped Array?

    For example, Im trying to create an array that has 1 column of 4 elements with 1 row of 4 elements hence 'L-shaped' but this doesn't seem possible unless you fill the rest of the array with 0s? Which I don't want. I tried using 'replace array subset'

  • HTML DB 1.6: Production or Release Candidate?

    Hi, an Oracle consultant in Germany told me that 1.6 is not yet production. Is that right? We're currently considering to upgrade our customer's environment from 1.5 to 1.6. If 1.6 is still an RC, when will production be available? Thanks, Kai