JAVA HELP: Please take a look****

I'm creating a program compute the arrival time of a train, if you know the starting time and the distance to destination (in km). Assume that the average speed of the train is 60km/h. The start time is given as the hour (using 24h notation) and the minutes. For example, if the start time is 13:46, the user will input 13 and 46. Assume that the hour and minutes provided are valid values. The output will consist in two numbers, one for the hours and one for the minutes.
Example: if the train travels 210 km, and the start time is 10:20, then the arrival time will be 13:50 (actually two numbers representing 13h and 50min).
class average{
  public static void main(String args[]){
     we will bb taking three values from user and
     calculate the sum and average of inputs
    // declare the variable
    double distance;
    double distancehour;
    double distanceminute;
    double avgspeed= 60/60; // average speed of the train
    double time; // average of teh three values
    // promt user to enter the values
    System.out.println("Please input the distance your are travelling:");
    distance = ITI1120.readDouble();
        while (distance < 0) {
    System.out.println("Please input the hour of departure (in 24 Hour format):");
    distancehour = ITI1120.readDouble() ;
        while (h <0) // \\ (h >=24)) {
    System.out.println("Please input the minute(s) of departure (in 24 format):");
    distanceminute = ITI1120.readDouble();
        // Intermediate
    double startminutes = distancehour*60+distanceminute; //convert hour into minutes
    double converttime = distance*avgspeed; // distance of travel multiplied by avg speed
    double subtotalminutes = startminutes+converttime;
    double totalhours = subtotalminutes/60;
    double totalmins = totalhours*60;
    double totalminutes = subtotalminutes+totalmins;
      // Result
    System.out.println("Your travel time is: " +totalhours : +totalminutes);
  }What am I doing wrong? The code isn't functioning completely.

hi,
try this if i got right,this program will give u the desired o/p.
i think this will give u satisfaction,if i m right then rply me,
public static void main(String args[])
double distance=0;
double distancehour=0;
double distanceminute=0;
double avgspeed= 60/60; // average speed of the train
double time; // average of teh three values
System.out.println("Please input the distance your are travelling:");
distance = 90;
if(distance > 0) {
System.out.println("Please input the hour of departure (in 24 Hour format):");
distancehour = 12 ;
if (distancehour >0) // (h >=24)) {
System.out.println("Please input the minute(s) of departure (in 24 format):");
distanceminute = 34;
// Intermediate
double startminutes = distancehour*60+distanceminute; //convert hour into minutes
int hourcolp=(int) distance/60;
double mincolp= distance%60;
//double converttime = distance*avgspeed; // distance of travel multiplied by avg speed
//double subtotalminutes = startminutes+converttime;
//double totalhours = subtotalminutes/60;
//double totalmins = totalhours*60;
//double totalminutes = subtotalminutes+totalmins;
// Result
//double totalminutes = subtotalminutes+totalmins;
int totalhours = (int)distancehour+hourcolp;
int totalmins = (int)distanceminute+(int)mincolp;
totalhours= totalhours+(int)totalmins/60;
totalmins= totalmins%60;
System.out.println("Your travel time is: " totalhours ":" +totalmins);
}

Similar Messages

  • ReadString problem!! could anyone help me take a look

    hi... i am doing a music Cd list program. there are two operation i need to do 1) insertion and 2) deletion. i have implemented my own sortList to do it... i work fine when i do the insertion to the list but it can`t perform well on deletion.. However, i am sure that my list deletion algoritm is totally correct... i perform two test as following to ensure my deletion is correct..but i think the problem is on my readString fucntoon ...could anyone help me take a look!!
    public class SortedListTesting
         SortedList musicCdList = new SortedList();
         ReadOperation theRo = new ReadOperation();
         //ErrorCheckingOperation theEco = new ErrorCheckingOperation();
         MusicCd temp;
         public void insertCdWithReadStringFunction()
              String musicCdsTitle;
              //try to prompt the user `s cd `s title for insertion to our List
              musicCdsTitle = theRo.readString("Please enter your CD`s title : ");
              musicCdList.insert(new MusicCd(musicCdsTitle));
              System.out.println("Number of items in the list: "
                                         + musicCdList.getNumberOfItems() + "\n" + musicCdList.toString() );
         public void deleteCdWithReadStringFunction()
              try
                   //try to prompt the user `s delected cd `s title
                   String keyword = theRo.readString("Please enter CD `s title to be delected from SMOA : ") ;
                   // System.out.println("The CD that you just deleted is " + keyword);
                   temp = musicCdList.delete(keyword);
                   System.out.println("Number of items in the list: "
                                  + musicCdList.getNumberOfItems() + "\n" + temp );
              catch ( InvalidDataException errorMsg )
                   System.out.println( errorMsg.getMessage() + "\n" );
                   System.out.println("Now, We have " + musicCdList.getNumberOfItems() + " items in the list, and the items as following  :\n" + musicCdList.toString() );
         public void insertCd()
              String musicCdsTitle;
              //try to input the string directly to our list
              musicCdsTitle = "ann";//theRo.readString("Please enter your CD`s title : ");
              musicCdList.insert(new MusicCd(musicCdsTitle));
              System.out.println("Now, the number of items in the list: "
                               + musicCdList.getNumberOfItems() + "\n" + musicCdList.toString() );
         public void deleteCd()
                            try
                              //try to input the String directly
                              String keyword = "ann"; //theRo.readString("Please enter CD `s title to be delected from SMOA : ") ;
                              System.out.println("The CD that you just deleted is " + keyword);
                              temp = musicCdList.delete(keyword);
                                 //System.out.println("Number of items in the list: "
                                 //                     + musicCdList.getNumberOfItems() + "\n" + temp );
                         catch ( InvalidDataException errorMsg )
                              System.out.println( errorMsg.getMessage() + "\n" );
                        System.out.println("Now, We have " + musicCdList.getNumberOfItems() + " items in the list, and the items as following  :\n" + musicCdList.toString() );
         public static void main(String[] args)
              SortedListTesting st = new SortedListTesting();
              //These two testing i am trying to show that my list is working fine for inseting and deleting
              //i try to input the cd `s title name " ivan " by my readString function, it work fine for insertion
              //but it is fail in delete fuction..it shows that "ivan not found: cannot be deleted" ...At first,
              //i think it is my delete function problem..but it is not my delete function problem...cos it work fine if
              //input the string directly from the function...i think the issues works on my readString fucntion
              //i try a milllion of time but i still got the same problem ...pls help....
              System.out.println("\t...Testing for input from readString fuction...\t");
              st.insertCdWithReadStringFunction();
              st.deleteCdWithReadStringFunction();
              //it work fine for input the string directly in the function, it show as following...
              System.out.println("\t...Testing for input the string directly ...\t");
              st.insertCd();
              st.deleteCd();
    javac SortedListTesting.java
    Exit code: 0
    java SortedListTesting     ...Testing for input from readString fuction...     
    Please enter your CD`s title : ivan   <<-inserting the cd`s title to our list
    Number of items in the list: 1     <<- sucessfully insert to our list
    Title: ivan 
    Please enter CD `s title to be delected from SMOA : ivan  <<- try to delete from our list, i type "ivan" here
    ivan not found: cannot be deleted    <<- problem occur , it should be fine in there
    Now, We have 1 items in the list, and the items as following  :
    Title: ivan         <<- it should not be shown
         ...Testing for input the string directly ...     
    Now, the number of items in the list: 2
    Title: ann   <<- i pass "ann" String directly to insertion function
    Title: ivan   <<- it is the left over from the preivous process
    The CD that you just deleted is ann   <<- i pass " ann" String directly to my deletion
    Now, We have 1 items in the list, and the items as following  : <<- it successfully delete .... it prove that my deletion function is working properly....i think it is on readString problem..
    Title: ivan
    Exit code: 0*/
    //it seems that the readString function read the string
    //at the first time does not match the second time
    //reading, it makes it can`t find the stuff from the list ..
    import java.util.*;
    public class ReadOperation{
         //pls help check here....thx
         public String readString(String userInstruction)
              String aString = null;
              try
                         Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   aString = scan.nextLine();
              catch (NoSuchElementException e)
                   //if no line was found
                   System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
              catch (IllegalStateException e)
                   // if this scanner is closed
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aString;
         public char readTheFirstChar(String userInstruction)
              char aChar = ' ';
              String strSelection = null;
              try
                   //char charSelection;
                         Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   strSelection = scan.next();
                   aChar =  strSelection.charAt(0);
              catch (NoSuchElementException e)
                   //if no line was found
                   System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
              catch (IllegalStateException e)
                   // if this scanner is closed
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aChar;
         public int readInt(String userInstruction) {
              int aInt = 0;
              try {
                   Scanner scan = new Scanner(System.in);
                   System.out.print(userInstruction);
                   aInt = scan.nextInt();
              } catch (InputMismatchException e) {
                   System.out.println("\nInputMismatchException error occurred (the next token does not match the Integer regular expression, or is out of range) " + e);
              } catch (NoSuchElementException e) {
                   System.out.println("\nNoSuchElementException error occurred (input is exhausted)" + e);
              } catch (IllegalStateException e) {
                   System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
              return aInt;
    public class SortedList extends ShellSortedList implements SortedListInterface<MusicCd>
         public SortedList()
              super();
         public void insert( MusicCd aCd )
              MusicCdNode cdNode = new MusicCdNode( aCd );
              cdNode.setNext( head );
              head = cdNode;
              numberOfItems++;
         public MusicCd delete(String aCdsTitle)
                                                throws InvalidDataException
              MusicCdNode current = head;
              MusicCdNode previous = null;
              while( current != null
                    && current.getMusicCd().getCdTitle() != aCdsTitle)
                   previous = current;
                   current = current.getNext();
              if (current == null ) //not found
                   throw new InvalidDataException(aCdsTitle
                                 + " not found: cannot be deleted" );
              else
                   if( current == head )
                        head = head.getNext(); //delete head
                   else
                        previous.setNext( current.getNext() );
                   numberOfItems--;
                   return current.getMusicCd();
         public MusicCd modify(String anExistedCdsTitle, String aModifyCdsTitle)
                                   throws InvalidDataException
              MusicCdNode current = head;
              while( current != null
                    && current.getMusicCd().getCdTitle() !=  anExistedCdsTitle)
                   current = current.getNext();
              if ( current == null )
                   throw new InvalidDataException( anExistedCdsTitle
                                 + " not found: cannot be deleted" );
              else
                   MusicCd tempCd = new MusicCd();
                   tempCd.setCdTitle(aModifyCdsTitle);
                   current.setMusicCd(tempCd);
                   return current.getMusicCd();
    }//for better understand of my program
    public interface SortedListInterface<T>
         //public SortedList();
         public void insert( T anElement );
         public T delete(String searchKey)
                                         throws InvalidDataException;
         public T modify(String searchKey, String aModifyTitle)
                             throws InvalidDataException;
    public abstract class ShellSortedList
         protected MusicCdNode head;
         protected int numberOfItems;
         public ShellSortedList()
              head = null;
              numberOfItems = 0;
         public int getNumberOfItems()
              return numberOfItems;
         public boolean isEmpty()
              return( numberOfItems == 0 );
         public boolean isDuplicate(String newCD)
                boolean found = false;
                MusicCdNode current = head;
                for( int i=0; i < numberOfItems; i++)
                   if(current.getMusicCd().getCdTitle().equals(newCD))
                   System.out.println("Duplicate Cd is found !!");
                            found = true;
                   current = current.getNext();
                    return found;
         public String toString()
              String listString = " ";
              MusicCdNode current = head;
              for( int i=0; i < numberOfItems; i++)
                   listString += current.getMusicCd().toString() + "\n";
                   current = current.getNext();
              return listString;
    public class MusicCdNode
         private MusicCd cd;
         private MusicCdNode next;
         // Default constructor
         public MusicCdNode()
         // Description: Initialize the reference for the cd object and the value of next to null.
         // Postcondition: cd = null; next = null;
              cd = null;
              next = null;
         // Parameterized constructor
         public MusicCdNode(MusicCd aCd)
         // Description: Set the reference for the cd object according to the parameters and value of next to null.
         // Postcondition: cd = aCd; next = null;
              cd = aCd;
              next = null;
           public MusicCd getMusicCd()
              return new MusicCd(cd.getCdTitle());
         public MusicCdNode getNext()
              return next;
         public void setMusicCd(MusicCd aCd)
              cd = new MusicCd(aCd.getCdTitle());
         public void setNext(MusicCdNode aCd)
              next = aCd;
    // File: MusicCd.java
    // Author: Chi Lun To (Ivan To)
    // Created on: June 5, 2007
    // Class Description
    // The MusicCd class defines a music cd object that contain the CD`s title, CD`s artist/GroupName,
    //  CD`s yearOfRelease , Cd`s music genre, and any comment of the Cd`s. This class provides functions
    //  to access the musicCdsTitle, artistOrGroupName, yearOfRelease, musicGenre, and aComment variable.
    //  Class Invariant: All MusicCd objects have a  string musicCdsTitle, string artistOrGroupName, integer yearOfRelease
    //  String musicGenre, and String aComment. A string type musicCdsTitle,artistOrGroupName, musicGenre,or aComment of "None"
    //  indicates no real name specified yet. A integer yearOfRelease of 1000 indicates no real years specific yet.
    public class MusicCd
         String theCdTitle;// the CD`s Title
         // Default constructor
         public MusicCd()
         // Description: Initialize theCdTitle to empty string
         // Postcondition: theCdTitle = " ";
              theCdTitle = " ";
         }//end constructor
         // Parameterized constructor
         public MusicCd(String aCdTitle)
         // Description: Set theCdTitle according to the parameters
         // Postcondition: theCdTitle = aCdTitle;
              theCdTitle = aCdTitle;
         } // end constructor
         // Accessor function : getCdTitle( ) function
         public String getCdTitle()
         // Description: Method to return the theCdTitle
         // Postcondition: the value of theCdTitle is returned
              return theCdTitle;
         }// end  getCdTitle( ) function
         // Mutator function: setCdTitle( ) function
         public void setCdTitle(String aCdTitle)
         // Description: Method to set theCdTitle according to the parameter
         // Postcondition: theCdTitle = aCdTitle;
              theCdTitle = aCdTitle;
         }// end setCdTitle( ) function
         // toString( ) function
         public String toString()
         // Description: Method to return the theCdTitle
         // Postcondition: the value of theCdTitle is returned as String
                   return("Title: " + theCdTitle );
         }// end  toString( ) function
    // File: InvalidDataException.java
    // Author: Chi Lun To (Ivan To)
    // Created on: June 5, 2007
    // Class Description
    // The InvalidDataException class is a self- defined exception class which handles
    // the issues that may arise with return value of the deleted and modify function.
    // For example,  the issue will occurs if the user try to delete the music cd from a empty list
    // or deleting a music cd that does not exist on the list. it would return null to the user. But, the user
    // expected to return an obeject reference of the music cd.Therefore, we instantiate InvalidDataException
    // class to handle this issue.
    //  Class Invariant:
    //  InvalidDataException class is a self-defining exceptional class which
    //  inherits the existing functionality of the Exception class.
    public class InvalidDataException extends Exception
         //Parameterized constructor
         public InvalidDataException( String s )
              super( s ); //inherits the existing functionality of the Exception class.
    }Message was edited by:
    Ivan1238
    Message was edited by:
    Ivan1238

    thx for your suggestion ..but i did try to skip my code..but i am sure if u guy understand what i am trying to ask ..so i try to show my all program for u guy better undrstand my problem ...the first three paragraph of code i hope u guy could focus on it ....i try ask the user to input the cd`s title to our insert list by using a function call readString( ) and i use this method to ask the user what cd they want to be delete from the list ...but it doesn`t work when i try to perform the delete cd funtion. At first, i think it should be my deleteCd( ) problem ..but i do some testing on it..it works fine if i pass a String directly to my function instead of using readString() function to perform ...therefore, i am sure my delete function working fine....i am thinking if it is my readString() problem make my deletion does not perform well...thx for u guy help

  • 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)

  • 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.

  • 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...

  • 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.

  • 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

  • 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.
    >
    >

  • 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

  • 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

  • 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;
    }

  • Could anybody please take a look at a test video podcast?

    I'm able to load this into itunes using the advanced tab and download a test video podcast. It's a minute long and 2.6MB in size, and used the MOV>IPOD preset in QT7.
    If anybody could take a look at it and let me know that they can download it and view it on their ipod, I'd appreciate it. I'm also interested to know if the smaller titles are legible to you on your ipod.
    http://subversive-entertainment.com/feed.xml
    Thanks,
    TW

    bb

  • Try to Help Fix This Please Take a look is All I Ask......

    My iCal alarms or alerts are always showing up at the top right of my Desktop if I didn't know where to look I would actually miss them ?
    Is there something that I can do so the alarms show up in the desktop in
    a more viewable area and if so how do I accomplish this
    OS 10.4.8
    iCal 2.0.4
    I don't know why people are ignoring my Posts as I've asked several? 's in the past few months and I've kept them simple without any help is Discussions dyeing or is just I that am not getting any responses to their posts ?

    Uh... Did you ever consider that people might just not know the answer?
    This is a user forum, after all. And this isn't something that iCal can do, inherently; so it'd take an unusual amount of hackery to get it to work. It's also not something that a huge number of people care about; my understanding is that an animated, distracting popup window is generally seen as a pretty good reminder that'll be seen by reflex regardless of where it pops up..., so not many people have tried.
    That said: Look into AppleScript to relocate the popup windows; it's your best bet. You'd have to write a script that relocated any open windows, then either attach it to alarmed events, or make it a cron job that runs once per minute and relocates any windows that you're looking at. There may be some source of resource-hacking that you can do inside the iCal .rsrc files, if they contain information about the alarm window; not sure about that, though.

Maybe you are looking for

  • Adobe Acrobat 8 download

    Where can I download Adobe Acrobat 8 Standard full version?

  • Securities for WebDB 2.1?

    I have problems with WebDB 2.1.0.9.3, user can access to view reports without logging-in. They just type the URL path of the report. How can I protect the report from this kind of problem. Thanks.

  • Expensive SQL Statements

    Hi all,          Am a new bee to this group I'll be greateful if any one help me in understanding about the Expensive SQL Statements.why n where thy r used Thanks.. Mohammed

  • Green or blue hue when printing in Elements 11

    I get a green or blue hue when printing in Elements 11.  Printer color control is off.  Need help to eliminate color hue when printing.

  • Show server time on a page (automatically updating)

    hi Please consider the use-case where the server time should be shown on a page and be automatically updated. This example application created using JDeveloper 11.1.1.3.0 illustrates two approaches at http://www.consideringred.com/files/oracle/2010/S