I think I have got it! (Almost)...Please take a look.

Hi - I am working on a homework assignment for my Java Programming class and I have already gotten some really good advice here. I am trying to create a program that allows me to Encode/Decode Morse Code and display the cipher text or plain text depending.
I have created one base class MorseCode and have two derived classes EncodeApp and DecodeApp to illustrate the core functionality of the MorseCode class.
I have used a variety of methods. Some directly from my own twisted little mind and others after receiving excellent instruction from some of you in this forum. (thanks)
Essentially, I now have a couple of problems that I am having trouble solving.
1. I cannot figure out how to test for the entry of invalid characters in the morse code part. I mean I do not know how to account for "." and "-" as opposed to looking for valid input with Character.isLetterOrDigit() or isWhiteSpace(). Help!
2. I recieved some help earlier and did my research on HashMaps...of course this was very enlightening. So I basically followed the guidelines given by the instructions I received. But since I am an ethical person, and this is for school, I did not copy the code I received earlier. Now of course I have a bug. Essentially, when I use the Decode() method with the following input:
...<1 Space>---<1 Space>...<3 Spaces>...<1 Space>---<1 Space>... (where <Space> means hitting the spacebar on my keyboard) I should get output of SOS SOS but instead I get SOS SSOS...Why?
I have included the code below:
MorseCode.java
import java.awt.*;
import java.util.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.Arrays.*;
import java.lang.Character.*;
public class MorseCode extends Object
     //A-Z as elements of char array
     public static char arrayAlpha[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G',
     'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
     'W', 'X', 'Y', 'Z'};
     //A-Z in Morse Code Strings (0-25 indexes in alphabetical order)
     public static String arrayAlphaMorse [] = {".-", "-...","-.-.","-..",".",
     //0-9 as elements of char array
     public static char arrayNumb[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
     //0-9 in Morse Code Strings (0-9 indexes in numberical order beginning at 0)
     public static String arrayNumbMorse [] = {"-----", ".----", "..---", "...--", "....-",
     //All of the characters and numbers with corresponding MC as a hashmap
     public static HashMap cipherKey = new HashMap();
     //String to hold output
     private String output = "";
     public void Encode ( String s )
          char messageArray[];
          String messageIn = "";
          messageIn = s;
          messageArray = messageIn.toCharArray();
          for( int i = 0; i < messageArray.length; i++)
               if(Character.isLetter(messageArray))
               output += arrayAlphaMorse[Arrays.binarySearch(arrayAlpha, messageArray[i])] + " ";
          } else
                    if(Character.isDigit(messageArray[i]))
                         output += arrayNumbMorse[Arrays.binarySearch(arrayNumb, messageArray[i])] + " ";
                    } else
                         if(Character.isWhitespace(messageArray[i]))
                              output += " ";
                         } else
                              if(!(Character.isLetterOrDigit(messageArray[i])) && !(Character.isWhitespace(messageArray[i])))
                                   JOptionPane.showMessageDialog (null, "Unsupported Characters Entered. You may only use letters, numbers and spaces.","Message as Morse Code - System Message", JOptionPane.ERROR_MESSAGE );
          }//EndForLoop
     }//EOEncode
     public void Decode ( String s )
          cipherKey.put( ".-", "A" );
          cipherKey.put( "-...", "B" );
          cipherKey.put( "-.-.", "C" );
          cipherKey.put( "-..", "D" );
          cipherKey.put( ".", "E" );
          cipherKey.put( "..-.", "F" );
          cipherKey.put( "--.", "G" );
          cipherKey.put( "....", "H" );
          cipherKey.put( "..", "I" );
          cipherKey.put( ".---", "J" );
          cipherKey.put( "-.-", "K" );
          cipherKey.put( ".-..", "L" );
          cipherKey.put( "--", "M" );
          cipherKey.put( "-.", "N" );
          cipherKey.put( "---", "O" );
          cipherKey.put( ".--.", "P" );
          cipherKey.put( "--.-", "Q" );
          cipherKey.put( ".-.", "R" );
          cipherKey.put( "...", "S" );
          cipherKey.put( "-", "T" );
          cipherKey.put( "..-", "U" );
          cipherKey.put( "...-", "V" );
          cipherKey.put( ".--", "W" );
          cipherKey.put( "-..-", "X" );
          cipherKey.put( "-.--", "Y" );
          cipherKey.put( "--..", "Z" );
          cipherKey.put( "-----", "0" );
          cipherKey.put( ".----", "1" );
          cipherKey.put( "..---", "2" );
          cipherKey.put( "...--", "3" );
          cipherKey.put( "....-", "4" );
          cipherKey.put( ".....", "5" );
          cipherKey.put( "-....", "6" );
          cipherKey.put( "--...", "7" );
          cipherKey.put( "---..", "8" );
          cipherKey.put( "----.", "9" );
          String input ="";
          String intermsg = "";
          String alphaString = "";
          String morseString = "";
          String delimiter = "#";
          input = s;
          StringBuffer buffer = new StringBuffer(input);
               Problem is that char cannot be dereferenced??? Need to fix.               
               for( int i = 0; i < buffer.length()- 1; i++)
                    if((!(buffer.charAt(i).equals("."))) ||(!(buffer.charAt(i).equals("-"))))
                    JOptionPane.showMessageDialog (null, "Unsupported Characters Entered. You may only use letters, numbers and spaces.","Morse Code as Text - System Message", JOptionPane.ERROR_MESSAGE);     
                    System.exit(0);
               for( int i = 0; i < buffer.length()- 1; i++)
                    if((Character.isWhitespace(buffer.charAt(i))) && (Character.isWhitespace(buffer.charAt(i + 1))))
                         buffer.setCharAt(i + 1, '#');
               intermsg = buffer.toString();
               StringTokenizer tokens = new StringTokenizer( intermsg );
               int length = tokens.countTokens();
               StringBuffer Output = new StringBuffer((length * 2));
               while(tokens.hasMoreTokens())
                         morseString = tokens.nextToken();
                         if(morseString.equals(delimiter))
                              Output.append(" ");
                         } else
                              alphaString = (String)cipherKey.get( morseString );
               Output.append( alphaString != null ? alphaString : delimiter );
               output = Output.toString();
     }//EODecode
     public String Output()
          return output;
}//EOF
EncodeApp.java
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class EncodeApp extends MorseCode
     public static void main(String args[] )
          String input ="";
          String intermsg = "";
          String messageIn = "";
          input = JOptionPane.showInputDialog(
"Enter Message to be Converted to Morse Code:");
          intermsg = input.trim();
          messageIn = intermsg.toUpperCase();
          MorseCode e = new MorseCode();
          e.Encode(messageIn);
          JOptionPane.showMessageDialog (null, e.Output(),
          "Message as Morse Code", JOptionPane.INFORMATION_MESSAGE );
          System.exit( 0 );
}//EOF
DecodeApp.java
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class DecodeApp extends MorseCode
     public static void main(String args[] )
          String input = "";
          String messageout = "";
          input = JOptionPane.showInputDialog(
               "Enter Morse Code to be Converted to Plain Text:");
          messageout = input;
          MorseCode d = new MorseCode();
          d.Decode(messageout);
          JOptionPane.showMessageDialog (null, d.Output(),
          "Morse Code as Plain Text", JOptionPane.INFORMATION_MESSAGE );
          System.exit( 0 );
}//EOF
Thanks for your help!

Input only <ONE SPACE> after ... --- ...
code may be taking spaces as input
or hard code a stream of " " to = a space in output

Similar Messages

  • TS1292 Hi, can you please take a look at my account and why its asking me to contact support. I have my billing address correct and everything but for some reason its not letting me to authorize my transaction

    Hi, can you please take a look at my account and why its asking me to contact support. I have my billing address correct and everything but for some reason its not letting me to authorize my transaction

    We are all fellow users here and have no way of accessing your account information; iTunes Store employees do not participate in these forums. You will need to do what it says, contact iTunes Support. Go here:
    http://www.apple.com/emea/support/itunes/contact.html
    to contact the iTunes Store.
    Regards.

  • Workaround for some W510 Audio Problems. Lenovo, please take a look at this!

    Hi all
    I believe most or all of the people are affected with poor sound quality of W510. I do believe there are some people who bring their laptops along and not convenient to get a external sound card and external speakers on the road. I am not too sure, but what I think that causes audio problem in W510, T410 or T510 is due to the implementations of Combo Audio/Mic Jack. So far, I have not heard any audio problems from X201 or W701/W701ds with a separate mic and audio jack (1 green and red, instead of 1 combo) Listed machines are using Conexant 20585 SmartAudio HD Sound Card.
    The workaround is to force install Conexant 20561 SmartAudio HD Driver through Device Manager
    http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-73721
    Problem Partially Resolved
    1. Using Audio Director - Classic mode enables you to use both internal speakers and external speakers/headphone simultaneously. (By right, this should be in Multi-Stream mode, due to this driver not programmed for W510). However, the volume of the internal speaker will be reduced by half if an external speakers/headphone is plugged.
    2. The sound quality is improved (tested with internal speakers).
    3. Solved Irregular Volume Problems.
    Drawback of using this driver
    1. Using Multi-Stream mode in this case would not enables you to use both internal speakers and external speakers/headphone simultaneously. However it would just make your internal speaker to be louder. External speaker/headphone would not work if Multi-Stream mode is selected.
    2. Custom EQ is not usable, if used, only the right channel of internal speaker, external speaker/headphone would work, and the sound quality will be like a spoilt radio.
    3. Only Voice (VoIP) EQ is optimized for external speaker/headphone. Using Off, Jazz, Dance or Concert EQ would make you feel that the vocal (singer's voice) is diffused, blurred like excessive 3D effects.
    4. Even if any preloaded EQ is selected, after system has been restarted, the selected EQ would still be saved, but the band (31Hz - 16KHz would be changed back to Off EQ) It is ok as it just affects the graphics, not the sound.
    I know that Forum Administrators, Lenovo Staff, Community Moderators, Gurus and Volunteered Moderators/Users would be surfing around and looking for new post. Please take a look and leave a post or PM to me, thank you very much.
    It is alright if Lenovo don't think that there is any problems regarding the sound in W510. However, I do believe most users/owners of W510 would appreciate if the sound system could be further improved through a better driver or new revision of hardware to something like a T400 standards or something. Some users would spent so much $ just to get all-in-a-box solution and would not want to invest further just for a external card to sacrifice portability and use more $. Finally, I still do believe that W510 audio problems can be resolved.
    Best Regards
    Peter

    Hi ckhordiasma
    Thanks for reviving ths old thread. How about trying Dolby drivers? It sounds great and could possibly resolve those issues without going through too much troubleshooting.
    The link is under my signature.
    Hope it helps!
    Happy 2012! 
    Peter
    W520 (4284-A99)
    Does someone’s post help you? Give them kudos as a reward, as they will do better to improve | Mark it as solved if the solution works for you, so it could be reference for others in the future 
    =====================================
    Sound Enthusiast and Enhancement (Post comments, share mixes, etc.)
    http://forums.lenovo.com/t5/General-Discussion/Dolby-Home-Theater-v4-for-most-Lenovo-Laptops/td-p/62...

  • CSS - Please take a look

    Hey there,
    I am just drafting a web site and I ran into a CSS issue...
    Please take a look here:
    URL:
    http://anuragdesign.com/vitaminx/layouttest.php
    In FF the float of the content / sidebar works
    In IE7 beta it works as well
    BUT in IE6 it doesn't.
    Any idea why ?
    I can't seem to be able to locate it
    Thanks in advance,
    Anurag

    The IE6 box model is to standard. It's IE5x you have to worry
    about.
    > IE 6 adds together the size of the element, the margin
    and the padding.
    > That
    > is, the padding and margin make the element bigger, in
    essence. The
    > standard
    > says that the size of the padding and margin are part of
    the size of the
    > element.
    The two sentences are the same. But the standard says that
    padding and
    border are part of the element's size.
    > So I think the content area is flowing below the sidebar
    because the
    > combined
    > size is greater than the containing area...but only in
    IE6 because of the
    > box
    > model issue.
    On a page with a valid and complete doctype, you will not
    have a box model
    problem with IE6. Its standards mode gets the box model
    right.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "DLoe" <[email protected]> wrote in message
    news:eb0p0j$59t$[email protected]..
    > This could have something to do with the IE 6 box model,
    which isn't to
    > standard.
    >
    > IE 6 adds together the size of the element, the margin
    and the padding.
    > That
    > is, the padding and margin make the element bigger, in
    essence. The
    > standard
    > says that the size of the padding and margin are part of
    the size of the
    > element.
    >
    > So I think the content area is flowing below the sidebar
    because the
    > combined
    > size is greater than the containing area...but only in
    IE6 because of the
    > box
    > model issue.
    >
    >

  • Can you please take a look at my TM Buddy log and opine on what the problem is?

    Pondini,
    Can you please take a look at my TM Buddy log and opine on what the problem is?  I'm stuck in the "Preparing Backup" phase for what must be hours now.  My last successful backup was this morning at 7:16 am.  I did do a series of Software Update this morning, one of which, a security update I believe, required a restart.
    I'm confused as to what the issue is, and how to get everything back to "it just works".
    Many thanks in advance.
    Starting standard backup
    Backing up to: /Volumes/JDub's Drop Zone/Backups.backupdb
    Error: (5) getxattr for key:com.apple.backupd.SnapshotState path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotContainer path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotState path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotContainer path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotState path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotContainer path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotState path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotContainer path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotState path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotContainer path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotState path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotContainer path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotState path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotContainer path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotState path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Error: (5) getxattr for key:com.apple.backupd.SnapshotContainer path:/Volumes/JDub's Drop Zone/Backups.backupdb/Jason Wisniowski’s iMac/2013-05-30-002104
    Event store UUIDs don't match for volume: Area 420
    Event store UUIDs don't match for volume: Macintosh HD
    Error: (5) getxattr for key:com.apple.backupd.SnapshotSt

    Time Machine can't read some data it needs from your backups (each of those date-stamps is one of your backups). 
    That's usually a problem with the drive itself, but could be the directory on it. First be sure all plugs are snug and secure, then see if you can repair it, per #A5 in Time Machine - Troubleshooting. 
    If that doesn't help, post back with the results.  Also either tell us what kind of Mac you have, what version of OSX you're running, or post that to your Profile, so it's accessible.  
    This is unrelated to the original post here, so I'm going to ask the Hosts to split it off into a new thread.  Since you've posted in the Lion forum, I'll assume that's what you're running.  You should get a notice from them

  • Please take a look at this. Attempting to make a professional brochure/bound 5-page presentation.

    Please take a look at this template I made for a Statement of Qualifications pamphlet.
    Here is a link to google drive. I made this template from scratch in Photoshop CS6.
    SOQ Page_Blank(no lettering).pdf - Google Drive
    What I am curious about, is that some of the lettering often looks blurry, although the page is 500pixels per inch 8.5x11, 76MB .psd file. What can I do about that?
    Also, I want to make it easy to write and edit the actual content that will go onto the page. Not all of us here have photoshop to edit the lettering. Is there a way I can export this to word so they can edit the content whenever? Are there better options (programs) to help me design this template? I am guessing I am somewhat pushing photoshops limit as to making a bound 5-page presentation. I am stuck and would like this to be easier. All suggestions for both of my questions as well as overall action toward making this would be great.
    Here is an example of a SOQ Pamphlet that I have been using as reference. In my eyes the design is perfect!
    http://www.ch2m.com/corporate/markets/environmental/conferences/setac-2013/assets/CH2M-HIL L-land-conservation-restoratio…
    Any help is great,
    Thanks,
    Adam

    Since photoshop can not do pages, your on the right track by using pdf format. Since it can do pages, but really requires acrobat pro to bind the pages together.
    Your best bet is InDesign then Illustrator would be the next option. Each of these can do multi page documents.
    There is absolutely no reason to use 500px/inch for the resolution anything between 150 and 300 would suffice leaning towards 300ppi.
    If the text is blurred a few things that can cause that, 1) anti-aliasing 2) document was created as a low resolution then upsampled 3) text is rasterized 4) document is rasterized.

  • An exciting question, please take a look

    This question is actually not quite exciting, but since you are here, please take a look. thank you.
    I have a question as following: I have three classes, Panel1, Panel2, and PanelPrimary, all 3 extends JPanel. Panel1 and Panel2 both have a JButton, button1 and button2 respectively. PanelPrimary has a CardLayout. In PanelPrimary, I created a Panel1 and a Panel2 and added them to PanelPrimary as the cards because i'm using CardLayout.
    I want to click on button1 so that PanelPrimary shows Panel2, and click on button2 so that PanelPrimary shows Panel1.
    But I dont know how to access PanelPrimary in Panel1 and Panel 2.
    here's what i get so far:
    public class Panel1 extends JPanel
    private JButton button;
    public Panel1()
    button=new JButton();
    button.addActionListener(new BListener())
    private class Blistener implements ActionListener
    public void actionPerformed(ActionEvent e)
    //Here's the code I dont know how to write
    class Panel2 is same as Panel1 except the actionPerformed part.
    public class PanelPrimary
    //i'm not very sure about how to write this class
    thanks for reading

    This question is actually not quite exciting, but
    since you are here, please take a look. thank you.This approach working out for you? Usually a title which actually describes your problem gets the better responses.
    And to "do tabs", you put your code within [ code ] tags (there's even a button for it).

  • Please take a look here: a lot of picture's from the Mac Pro and Upgrades.

    Just like any other Mac Pro owner, i'am really happy with it!
    Please take a look at my site: http://mac.powerbras.nl
    This is the first site i have ever made (on a Mac) so i hope you will like it!
    Before i had my Mac Pro i would really like too see a little more from the inside. But there where just a few site's with some small pictures. Now i made this site with some high resolution pictures so everyone can see the inside off the Mac Pro and how perfect it is!
    Also you can find the Xbench results from my configuration and all the Apple System Profiler specifications
    Please take a look, you will like it. Especially when you have no Mac Pro!

    Anne,
    Great job on the site.
    There are a number of third party templates available for iWeb that, with some creativity, can yield a site that looks nothing like the template-based norm. An example of one such site, "The Camera Obscura", a site created in iWeb and hosted on .Mac, demonstrates very well the limitless capabilities of iWeb. Some post-publishing html editing has been done on Obscura, but is easily accomplished with the right tools.
    Additional iWeb templates and other tools that support this great application can be found in The iWeb Tool Chest.
    Keep up the great work on your site!
    Mark

  • Mods. Please take a look at this topic

    Hi,
    Please take a look at this topic:
    http://discussions.apple.com/thread.jspa?threadID=422678&tstart=0
    It's becoming 'unfriendly'
    Thanks.
    M

    Hi Kady,
    Thanks for putting the inappropriate parts in the 'Trash'
    M

  • Someone please take a look at this

    Please take a look at this.
    This is my jsp file:
    <%@ page import="java.sql.*" %>
    <%
    String url="jdbc:mysql://localhost/ali";
    String user="root";
    String password="";
    Connection conn=null;
    String classPath="com.mysql.jdbc.Driver";
    try{
         Class.forName(classPath);
         conn = DriverManager.getConnection(url,user,password);
         }catch(Exception exc){
         out.println(exc.toString());
    %>
    <%
         Statement stm=conn.createStatement();
         String update="CREATE TABLE product(id varchar(20) PRIMARY KEY, name char(20))";
         try{
              stm.executeUpdate(update);
              out.println("Successful")
         }catch(Exception exc){
              out.println("sorry loser!!");
         stm.close();
         conn.close();
    %>
    but when I try opening it up in tomcat i get this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 16 in the jsp file: /mytest/createTable.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    /usr/java/jakarta-tomcat-4.1.31/work/Standalone/localhost/_/mytest/createTable_jsp.java:64: ';' expected
         }catch(Exception exc){
    ^
    1 error
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)

    i've repaired that one already but now i get this.Please....Help me.
    org.apache.jasper.JasperException
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:207)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    root cause
    java.lang.NullPointerException
         at org.apache.jsp.createTable_jsp._jspService(createTable_jsp.java:60)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)

  • PieroF - Can you please take a look at M.Mantovani's RT problem?

    Hi Piero.
    M.Mantovani seems to be having problems with FCE 3.5 on his MBP.
    I suspect he is new to FCE. As a fellow countryman and expert with FCE I think you would probably be his best helper.
    Could you take a look at his problems please as I have run out of ideas!
    http://discussions.apple.com/thread.jspa?threadID=570466&tstart=0
    Ian.

    Hi Ian,
    even though too late, I answered the post you pointed to.
    Piero

  • POLL, please take a look: Does your E71 lock when ...

    Hi there,
    Please make this super quick test and if possible, please report back with some additional details. This will be greatly appreciated! I have got mixed results of this test.
    How: Activate Offline Mode (press the power button and choose Offline Mode) and see if it locks your phone behind the Security Lock Code (the default password for unlocking the phone is 12345). That is, the same result as choosing 'Lock Phone' from the aforementioned menu.
    Then please report back your phone's behavior. In addition, please include:
    0. Did it lock? Yes/No
    1. Your firmware information (write *#0000* on standby screen)
    2. Your product code (it's behind the battery I'm afraid, but this information is very important.. pretty please?)
    3. Have you changed your default Security Lock of '12345' to something else? Yes/No
    (4. subscribe to this thread )
    kvirtanen.deviantart.com

    Late addition to describe the reason for the poll a bit better: The reason for asking this information is that on some E71s the Offline Mode also puts the phone to lock mode - in some it doesn't. To me the Offline Mode is equivalent to a "Flight Mode" and thus shouldn't be combined with the lock mode (many other Nokia phones don't behave this way). There's a separate option right below the Offline Mode for locking the phone.
    I've contacted Nokia Customer Care and they say the locking doesn't happen and there must be a 3rd party software conflict of some kind. They even tested it with their own E71 phone. So, according to them, the locking should NOT be happening. 
    I recently did a 3-button hard reset, didn't restore any backups, and the 'feature' is still there.
    By having your firmware version and product code in addition to your user experiences it'll be easier to pinpoint if the locking is restricted to certain regions / phone models / firmware versions. I'll relay this poll to Nokia for their evaluation.
    Thanks to all who've helped! Let's help out Nokia by debugging the E71 by ourselves and making it even better
    Message Edited by kvirtanen on 12-Mar-2009 09:14 PM
    Message Edited by kvirtanen on 12-Mar-2009 09:20 PM
    kvirtanen.deviantart.com

  • Weird behaviour of getText() ...!!!! PLEASE TAKE A LOOK!!

    Hi.
    my problem is that i have two forms named JF_ChangeAP and DisplayTree. Suppose that JF_ChangeAP has two string variables named XMLFile and ElementDesired... I try to set the value of these two variables from the form DisplayTree(after i've created an JF_ChangeAP object,of course)... Take a look at the following code :
    CODE THAT WORKS:
    ShowAncestorsFrm.XMLFile=this.txtFilePath.getText();
    ShowAncestorsFrm.ElementDesired="Logistics_person";
    CODE THAT DOESN'T WORK:
    ShowAncestorsFrm.XMLFile=this.txtFilePath.getText();
    ShowAncestorsFrm.ElementDesired=this.txtElementDesired.getText();
    (ALTHOUGH I TYPE Logistics_person in the TextField!!!!!)
    I am going crazy...!!!!!!!!!!!!!!!!!!!!!!
    When i debug the value of the ElementDesired in the JF_ChangeAP object is Logistics_person!!!! But it does not work! ! ! ! ! ! ! ! ! ! .......WHY??!?!?!?!?!?!?
    Thnx in advance Guys.!

    your code convetion is arkward..it's hard to tell what is a class and what is an object. you should try not to declar your variable public
    MyClass.myVariable = ""; is not a good idea..and not object oriented (you broke encapsulation)
    since your listing is vague and confussing, i can't really hel you debug your problem. although i'm thinking it's a reference problem..check to make sure you have pass in the correct reference..etc.
    also make sure you created the textfield correctly..
    for example:
    public class Form1 extends JFrame{
        private JTextField textField = new JTextField(10);
        public Form1(){
            JTextField textField = new JTextField(20); 
            // this is wrong..your textfield declared above is not the same one
            // as you add to the frame..so when you call this.textfield.getText(),
            // you are geting the text from the textfield of the instance..not this    
            // local one (which will be displaying in the Frame)
           this.getContentPane.add(textfield);
    }check to make sure the reference to the objects are correct.
    you should redesign your application: here is an example
    public void Form1{
        private JTextField txtFilePath = null;
        private JTextField txtElementDesired = null;
        public Form1(){
            final Form2 = new Form2();
            txtPath = new JTextField();
            txtElementDesired = new JTextField(10);
            JPanel panel1 = new JPanel();
            panel1.add(txtFilePath);
            panel1.add(txtElementDesired);
            JButton = new JButton("Submit");
            button.addActionListener(new ActionListener(){
                public void actionPerformed(ActionEvent e){
                    form2.setFilePath(txtFilePath.getText());
                    form2.setElementDesired(txtElementDesired.getText());
            JPanel panel2 = new JPanel();
            panel2.add(button);
            this.getContentPane.add(panel1, "Center");
            this.getContentPane.add(panel2, "Center");
        public String getFilePath(){ return txtFilePath.getText(); }
        public String getElementDesired(){ return txtElementDesired.getText(); }
    public class Form2{
        private String elementDesired = null;
        private String filePath = null;
        public void setFilePath(String filePath){
            this.filePath = filePath;
        public void setElementDesired(String elementDesired){
            this.elementDesired = elementDesired;
    }

  • Any one who has read chap15 of Thinking in JAVA,2nd Ed. please take a look.

    I'm testing the RMI example in chap15.When I run the PerfectTime class I always get an error message(xuke is my computer's name,and I've already conncetted to the ISP and started the registry server and produced the stub&skeleton classes as the book said):
    java.security.AccessControlException: access denied (java.net.SocketPermission xuke resolve)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:267)
         at java.security.AccessController.checkPermission(AccessController.java:394)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:540)
         at java.lang.SecurityManager.checkConnect(SecurityManager.java:1037)
         at java.net.InetAddress.getAllByName0(InetAddress.java:554)
         at java.net.InetAddress.getAllByName0(InetAddress.java:535)
         at java.net.InetAddress.getByName(InetAddress.java:444)
         at java.net.Socket.<init>(Socket.java:95)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:20)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:115)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:494)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:169)
         at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
         at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
         at java.rmi.Naming.bind(Naming.java:106)
         at PerfectTime.main(PerfectTime.java:31)
    Exception in thread "main" Process terminated with exit code 1

    Use a policy file, in which you grant acees permissions, when starting your applicaiton:
    grant {
    permission java.net.SocketPermission "*:1024-65535", "connect,resolve";
    permission java.net.SocketPermission "*:80-65535", "connect,accept";
    Here you have more details:
    http://java.sun.com/docs/books/tutorial/rmi/running.html

  • G5 1.8 DUAL freezing: Made some photo's of the inside, please take a look

    Hello!
    My PM 1.8 Dual G5 has some serious freezing problems. It randomly freezes after 5 to 30 minutes. With freezing I mean: An unmovable mouse and a screen that hangs (all loading bars stuck etc.). Aprox 5 minutes after the freeze the fans go wild and it sounds like standing next to a flying plane.
    Please help! The thing was bought araound new year, 2005 so I don't have any form of warranty left.
    The following photo's may help solving the problem. One note, we never upgraded anything. It's straight out of the box. The only modification is a new logic board to solve the problem described above, it didn't help.
    Mac OS X (10.4.7)
    PowerMac G5   Mac OS X (10.3.9)   1.8 Ghz Dual

    Did everything mentioned in the previous reply's: nothing helped...
    - 'Long' Apple hardware test from the dvd: no problems
    - Formatted all drives with Disk Utility from install dvd (erased with zeros): worked perfectly, all my data was gone
    - Installed OS X 10.3 on HD2 (first it was on HD1): problem on install disk 2... possible due to dust on the disk.... OS X works perfectly though
    - Didn't install any software after the complete reinstall
    No matter what I do: It freezes after a couple of minutes
    So I did the above without any results. Anyone got something to try? Hardware Test says it isn't a hardware problem, applejack and memtest say the same..... but I did a complete reinstall and that didn't solve the problem.
    Please help!
    and btw: anyone know how I boot the system up using only one processor? I want to try if it works using CPU 2, cause I saw in a log that it crashed because of CPU 1... Don't think this is the prob though because it was just a kernel panic, not that freeze what I'm talking about.

Maybe you are looking for