OHJ4.1.16 Repainting Problems and 100%CPU on java 1.4

Hi
We are considering using OHJ4.1.16 as our application help, I have it working such that when the help is invoked either from the toolbar or the menu OHJ is displayed, but there are major repainting problems when the OHJ window is closed by clicking on the X button and then the help is invoked again from the toolbar or the menu item.
Please note that the first time it displays and paints fine only when the OHJ frame is closed and invoked again the problem occurs
The problems encountered are repainting(really whacky), 100% CPU utilization
Please have a look at the code below and tell me if i am not doing it right, Also is there anyway i can trap events on the OHJ frame so that i can dispose it everytime the window is closed by the user??
The following code is executed when the help is invoked
     public void startHelp()
     helpObject.showNavigatorWindow();     
     helpObject.setVisible(true);
     public static void launchApplication()
          String helpset1 = "/resources/help/Test.hs";
          Vector booksVector = new Vector();
          booksVector.add(helpset1);
               if(m_instance == null)
                    m_instance = new ApplicationHelp(booksVector);
               else
                    m_instance.startHelp();                    
we are using java 1.4, the above problem makes OHJ unusable!!

Hi, John. We're trying to reproduce your problem. If you run any of the OHJ 4.1.16 demos in the bin directory of the installation, do you run into the 100% CPU utilization problem? If so, how? The cshDemo.bat file creates a dummy application that has an OHJ deployment, so please test that one in particular.
Thanks,
Ryan

Similar Messages

  • Safari hangs, beach ball and 100% CPU confusion

    I'm struggling!
    Safri 5.1 on Lion 10.7.3 and on both my Mackbook Air and iMac after the recent updates something is stopping Safar from loading. It just hangs, beachball kicks in and the CPU shoots upto around 100% with a "web process".
    I've turned off and deleted all extensions, Flash, Flip4Mac, Perian, Ad Block, 1Password etc and restarted and the problem remains on both computers.
    I'm stuck. Any help would be appreciated.
    Thanks

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software -- potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions -- they’re easy to carry out and won’t change anything on your Mac.
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing.
    Below are several lines of text in monospaced type, which are UNIX shell commands. They’re harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of running these commands, search this site for other discussions in which they’ve been used without any report of ill effects.
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then either copy or drag it. The headings “Step 1” and so on are not part of the commands.
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
    To begin, launch the Terminal application; e.g., by entering the first few letters of its name in a Spotlight search. A text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” (without the quotes) and press return. You should then get a new line ending in a dollar sign.
    Step 1
    Copy or drag -- do not type -- the line below into the Terminal window, then press return:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'
    Post the lines of output (if any) that appear below what you just entered (the text, please, not a screenshot.)
    Step 2
    Repeat with this line:
    sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(x|postfix|ntp|cups)/{print $3}'
    This time, you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. You don't need to post the warning.
    Step 3
    launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'
    Step 4
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null
    Important: If you synchronize with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting.
    Step 5
    osascript -e 'tell application "System Events" to get name of every login item'
    Remember, steps 1-5 are all drag-and-drop or copy-and-paste, whichever you prefer -- no typing, except your password. Also remember to post the output.
    You can then quit Terminal.

  • Load testing and 100% CPU Utilization - Multiple JVMs?

    Hi,
    Problem:
    While stress testing the application with 20 simultaneous users, unix is 100% utilized and there is degradation in response times.
    One component of the application is invoking a unix script which is executing a java program after setting CLASSPATH, PATH etc. I guess thus each execution will be invoking a jvm. At the end of the program it will do a System.Exit(). This java program generates around 15-60 barcode images. It takes 2 secs normally.
    When, 5 and 10 concurrent users executing this unix script for a steady state time of 30 minutes is also working fine even through response time degrades to 4 secs.
    With 20 concurrent users, unix box with 4 CPUs is 100% utilized and response time degrades to 11 secs or so.
    We need to do this through unix script only because it is executed from database tier (oracle reports - rdfs) and java stored procs doesn't allow awt operations (image file creation).
    I repeated this testing using a java class which just loops for 2 secs. With 20 concurrent users, it was also degrading to 6 secs or so and fluctuating between 100% CPU utilization.
    Any pointers on what we should be analyzing more and how should we try to solve this issue.
    Thanks,
    Ayyappa

    Stupid forums made me change the ``screen name.'' Whatever...
    Anyway, it is resource intensive to invoke a new JVM per request. You can do several things but it comes down to the fact you will want to keep ONE JVM running in the background awaiting requests to do work. These requests can come from several mechanisms, such as polling a database table, sending requests over a local TCP socket, listening in on a Unix fifo file, etc, etc.
    When the shell script is exec'd, connect to your JVM (for example) by opening a socket to it, enter your request for work, and wait for the response, the JVM app will listen and accept socket requests, thread off and process and then return data. Something in this form will be substantially more scalable that what is currently being done.

  • Instense hd activity and 100%cpu make my system completely unsable

    hi.
    it happenned the first time with some app (i don't know which one) using the hard disk quite intensively.
    and then i couldn't even move my mouse. well i move it but 10 seconds later the pointer move on the screen. and i coudn't do anything under X. even type something.
    i manage to go to a console via CTRL-ALT-F1. but couldn't login because login give me a time-out ! and then i finally rebooted so i could get back my system and use it.
    then,later, i decided to run dd if=/dev/urandom of=/somepartition bs=1024 before setting up a crypted partition. and it happened again !
    the hard-disk activity and the 100% CPU usage . and i couldn't do again anything except reboot !!
    when i run the same dd command on my Arch 32 bits. it does give 100% CPU usage too but i can still use X without problem. even without any slow down.
    so the 32bits system is an old Athlon XP 1800+ with an IDE disk.
    and the Arch64 is a brand new Athlon 64 X2 4400+ with a SATA drive and a nforce chipset MCP61.
    so what is the cause of that ? clearly the cpu is so used that nothing could work. but on the 32bits system too. and it still works. so ?
    is the configuration of the kernel of arch64 different from arch32 ?
    i am thinking at compiling my own kernel with PREEMT configured or even compiled an rt kernel. but why is this needed whereas on the 32bit arch all is fine ???

    may be that's bs=1024 the problem and what that caused the slowdown ?
    or may be i mistyped /dev/urandom and used /dev/random ?
    i am using now :
    schedtool -B -e dd if=/dev/urandom of=/somepartition
    and it works nice. no more than 50% CPu usage. and no slowdown...
    the schedtool -B is to be sure there will be no freeze and that dd will not take all the cpu power...

  • High Fan Noise and 100% CPU usage by Dock

    My MacBook Pro 3.06 GHz Intel Core 2 Duo running 10.6.8 just started making a constant fan noise. When I checked the Activity Monitor, it shows my Doc CPU usage as 100%, and my Percent User Usage is about 52% System 2.5% and % Idle is 47%. These numbers are when there is nothing running except Activity Monitor. When I log out and log in as another user, the high fan noise stops, and the CPU usage of the Doc is <1%. I have tried restarting my computer, Rebuilt my Permissions, Emptied the Trash, and Reset the SMC (I think I did it correctly for the MBPro, but the Power Light did not change, and nothing seemed to be any different on my computer.) I think I recently did a recent Apple Update, but I don't know how long ago that was. But it was sometime in the past few days. Does anyone have any idea about what could be going on?
    Thanks,
    Frank

    Frank Moore wrote:
    How do I give you the credit. It looks like I only gave you a Helpful credit instead of Correct Answer? The only correct option was in one of my replies under you correct answer. You gave the correct answer.
    Oh well, no worries.

  • HP2740p expansion battery problem - slow, 100% cpu

    Posting this problem because it took us months to figure out root cause.  When expansion battery for 2740p gets old and tablet tries to charge it the computer slows to a crawl - seriously slow and unworkable.  It's tough to troubleshoot the machine in this state.  CPU shows at or near 100% and task manager doesn't show processes consuming all the resources.  Mouse movement and clicks are slow - everything slow. 
    Occurs most often to people who have lot of meetings when they dock.  Seems to only happen when tablet is ON when it gets plugged in.  If tablet is OFF, then docked, and then turned ON problem doesn't occur.  We have dozens of this model and it's totally reproducable with different tablets and batteries.  Downloaded HP Battery Check app and it shows all batteries that cause this problem with status Replace.
    We run Win7 enterprise and downloaded all latest drivers on HP support.  Obvious fix is remove or replace expansion battery.
    Cheers,
    John

    Nevermind!
    Sorry for the trouble. The problem was that last time I compiled the code, it reverted back to and older version of a class I had compiled days ago. Why it did this is totally beyond me... but it did, and it just so happens that the old version of that class combined with the new version of my program were the perfect recipe for an infinite loop.
    Seriously, if you are in inveterate debugger, you might get a good laugh out of this. I've spent the last week and a half trying to find a way to set the Windows console into cbreak mode (single character processing rather than line-at-a-time processing), and I finally managed to do it by writing some c code and putting it into a DLL with the JNI. So now my program (which runs from the console) can process each character as it is entered rather than waiting for a line return. The older version of the class that got reverted was one that used System.in rather than the input stream generated by the socket. I had set it to System.in for testing purposes, and apparently that testing version is the one it got reverted back to. So combine the two, and you have a console that is feeding System.in each character as it is pressed and a socket wrapper that is listening infinitely. It was a mess... but an uncannily serindipitous mess...
    Ahh... debugging... good time...

  • Upgrade to 6.5.4 and 100% CPU usage

    We recently upgrade a 1.6G Essbase db from 5.0.2p13a to 6.5.4p2 - Windows 2000. We ran the 5.0.2p13a db for 5 years quite successfully and now on 6.5.4 our calcs have improved but our data retrieval has slowed down to a crawl. When user's are extracting data (via excel) our CPU is quickly crawling to 100% usage and staying there - task mgr shows essbase.exe with 100% usage and restarting essbase frees up the CPU. We have 8 logical cpu's and more than enough juice to handle things. We have a source db with a transparent partition to a db that user's access.Our db has tons of dynamic calc's and we turned off the dynamic calc cache and picked up a bit of speed but still not the response times of 5.0.2p13a. We notice some time improvements when hit the source db versus the partition copy but still not getting acceptable response times.Is there an undocumented config setting or anything we're missing that may help us?? We getting frustrated trying to find the slowdown.

    Now regarding 5.5 i will put in on VMware , can i have two machines , some HA replication with same license  ?
    One active , one standby , some database replication on day base level ? or similar ?
    Can i use same license ?
     I bought from Cisco :
    CSACS-5.5-VM-UP-K9
    CSACS-5-BASE-LIC
    L-CSACS-5-LRG-LIC=

  • Java calls repaint to much (100% CPU)

    Hello,
    I'm creating an emulator, and the image to display is created with an ImageProducer. Now, I have this code:
    public class Video extends JPanel {
        private int a;
        private Image screen;
        private Lcd lcd;
        private Dimension lcdDimension;
        private int scale;
        private int scaleFactor = 3;
        /** Creates a new instance of Video */
        public Video() {
            lcd = new Lcd(64, 32);
            lcdDimension = lcd.getDimension();
            screen = createImage(lcd);
            setScale(2);
       public void paint(Graphics g) {
            System.out.println(a++);
            screen.flush();
            g.drawImage(screen, 0, 0, lcdDimension.width*scale*scaleFactor, lcdDimension.height*scale*scaleFactor, Color.WHITE, this);
        public Dimension getPreferredSize() {
            return new Dimension(lcdDimension.width*scale*scaleFactor, lcdDimension.height*scale*scaleFactor);
        public Lcd getLcd() { return lcd; }
        public void setScale(int s) { scale = s; }
        public int getScale() { return scale; }
    }The problem is, as soon as I open the menu and close it (I don't click on anything, no code should be executed), java starts repainting the Video frame like mad...
    I can see the number count go up on the standard output with about 200 / second...

    i dont know if this will work but try putting this code in ur class and put private Graphics dbg; at the top
    public void update(Graphics g)
              if (dbImage == null)
                  dbImage = createImage (this.getSize().width, this.getSize().height);
                  dbg = dbImage.getGraphics ();
              dbg.setColor (getBackground ());
              dbg.fillRect (0, 0, this.getSize().width, this.getSize().height);
              dbg.setColor (getForeground());
              paint (dbg);
              g.drawImage (dbImage, 0, 0, this);
          }

  • Safari launches with spinning ball and full fans and 100% CPU web processes

    Exactly the same issue on Macbook Air and new iMac both running Safari 5.1 and Lion 10.7.3
    When I open Safari  it does not open a page, it just shows a spinning beach ball and shortly after the fans kick in and the activity monitor shows 1 webprocess at 99 - 100% or sometimes 2 web processes at 50/50% all coming from the User. When I inspect the process it says it's "Parent Process (Safari 450)"
    When I quit safari the web processes stay at 100% and will only stop when I quit them in activity monitor.
    I have reset Safari but no joy.
    Firefox etc works fine.
    The only update I ran was a 1Password update but they say it's not them.
    Any help would be appreciated. It's driving me crazy.

    Solved..... I used App Zapper to delete Flash and Safari is working fine again!

  • Memory Leak and 100% CPU in slapd process when using Open Directory OS X 10.8.5

    Has anyone seen the slapd (LDAP daemon from OpenLDAP which OS X Server uses) run away when running Open Directory? We've tried disabling replication but it doesn't seem to matter. The slapd process will start up and take up about 400MB and then at night will consume all the available memory and crashing the server.
    Any thoughts? Any benefit in upgrading to Mavericks' Server app?
    Thanks,
    John

    @Strontium90
    Found this in opendirectory.log which seems to just show ldap requests starting to slow down.
    2013-12-06 09:54:19.736670 PST - State information (some requests have been active for extended period):
              Sessions: {
                  2839 -- opendirectoryd:
                              Session ID: CBAE3152-1A3B-4C7E-89D6-2F836C28F5BA
                              Refs: singleton
                              Type: Default
                              Target: localhost
              Nodes: {
                  2839 -- opendirectoryd:
                              Node ID: CC6FC6C3-AD02-4068-9E8F-8FDC228F4C48
                              Nodename: /Search
                              Session ID: <Default>
                              Refs: 3
                              Internal Use: X
                  2816 -- automount:
                              Node ID: 8FC03A24-46F2-4DAA-A0EC-3FF98B458FB4
                              Nodename: /Search
                              Session ID: <Default>
                              Refs: 2
                  277 -- SystemUIServer:
                              Node ID: FFF97865-2FBE-474A-BD53-43A35DA09D3A
                              Nodename: /Search
                              Session ID: <Default>
                              Refs: 3
                              Internal Use: X
              Requests: {
                  2816 -- automount:
                              Nodename: /Search
                              Refs: 5
                              Active Time: 65170959
                              Type: ODNodeCopySubnodeNames
                              Current Module: search
                              Node ID: 8FC03A24-46F2-4DAA-A0EC-3FF98B458FB4
                              Request ID: 5
                  2839 -- opendirectoryd:
                              Nodename: /Search
                              Refs: 5
                              Active Time: 65971987
                              Type: ODQueryCreateWithNode
                              Current Module: search
                              Node ID: CC6FC6C3-AD02-4068-9E8F-8FDC228F4C48
                              Request ID: 4
                  277 -- SystemUIServer:
                              Current Module: SystemCache
                              Type: getpwuid
                              Request ID: 10
                              Refs: 4
                              Active Time: 13397955
                              Nodename: /Search
                              Parent Request: 10
                              Refs: 5
                              Active Time: 11041999
                              Type: ODQueryCreateWithNode
                              Current Module: search
                              Request ID: 12
                              Node ID: FFF97865-2FBE-474A-BD53-43A35DA09D3A
                  68 -- coreservicesd:
                              Current Module: SystemCache
                              Type: getpwuid
                              Request ID: 8
                              Refs: 3
                              Active Time: 13484131
                  2832 -- sshd:
                              Current Module: SystemCache
                              Type: getpwnam
                              Request ID: 9
                              Refs: 3
                              Active Time: 13483916
                  640 -- SystemUIServer:
                              Current Module: SystemCache
                              Type: getpwuid
                              Request ID: 7
                              Refs: 3
                              Active Time: 13522530
    2013-12-06 09:54:19.737704 PST - requesting spindump generation
    In slapd.log around the same time:
    Dec  6 06:55:23 dms-out-01.int.payoff.com slapd[118]: conn=-1 op=0: attribute "entryCSN" index delete failure
    Dec  6 06:58:25 dms-out-01.int.payoff.com slapd[118]: connection_read(46): no connection!
    Dec  6 07:00:23 dms-out-01.int.payoff.com slapd[118]: connection_read(48): no connection!
    Dec  6 07:27:34 dms-out-01.int.payoff.com slapd[118]: connection_read(47): no connection!
    Dec  6 07:56:30 dms-out-01.int.payoff.com slapd[118]: connection_read(47): no connection!
    Dec  6 08:10:24 dms-out-01.int.payoff.com slapd[118]: => bdb_idl_delete_key: c_get failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30994)
    Dec  6 08:10:24 dms-out-01.int.payoff.com slapd[118]: conn=-1 op=0: attribute "entryCSN" index delete failure
    Dec  6 08:10:25 dms-out-01.int.payoff.com slapd[118]: => bdb_idl_delete_key: c_get failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30994)
    Dec  6 08:10:25 dms-out-01.int.payoff.com slapd[118]: conn=-1 op=0: attribute "entryCSN" index delete failure
    Dec  6 08:18:29 dms-out-01.int.payoff.com slapd[118]: connection_input: conn=12372 deferring operation: binding
    Dec  6 08:18:55 dms-out-01.int.payoff.com slapd[118]: connection_input: conn=12373 deferring operation: binding
    Dec  6 08:19:50 dms-out-01.int.payoff.com slapd[118]: connection_read(53): no connection!
    Dec  6 08:27:16 dms-out-01.int.payoff.com slapd[118]: => bdb_idl_delete_key: c_get failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30994)
    Dec  6 08:27:16 dms-out-01.int.payoff.com slapd[118]: conn=-1 op=0: attribute "entryCSN" index delete failure
    Dec  6 09:08:00 dms-out-01.int.payoff.com slapd[118]: connection_input: conn=12871 deferring operation: binding
    Dec  6 09:16:10 dms-out-01.int.payoff.com slapd[118]: connection_input: conn=12871 deferring operation: pending operations
    The deadlock from what I can tell is a more of a warning from OpenLDAP, but it is a common pattern and occurring every few minutes.
    Not much useful in slapconfig.log.
    Any insights? Thanks so much.
    ~john

  • X220 16Gb 1866 + eGPU and 100% CPU Load or black screen issue is solved!

    Hi everybody!
    I am happy to announce that the problem in title has been solwed!
    To find out more, contact Oleh (mandriva64(at)gmail.com)!
    Hope you will make a donation for his work.
     

  • Import Package problems and error in the Java file created in runtime

    got the following error message when i try to load the JSP file given below (FlightSearch.jsp). Given also below the JAVA files (flightsearch$jsp.java) created by the compiler.
    Thanks for your help
    Susan
    Error message
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    C:\jakarta-tomcat\work\client\localhost\client\client\flightsearch$jsp.java:320: 'catch' without 'try'.
    } catch (Throwable t) {
    ^
    C:\jakarta-tomcat\work\client\localhost\client\client\flightsearch$jsp.java:328: 'try' without 'catch' or 'finally'.
    ^
    C:\jakarta-tomcat\work\client\localhost\client\client\flightsearch$jsp.java:328: '}' expected.
    ^
    3 errors, 1 warning
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
    at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:536)
    FlightSearch.jsp
    <%@page import="java.util.*" errorPage="ErrorHandler.jsp"%>
    <%@page import="com.client.entity.Flight"%>
    <%@page import="com.client.wsclient.FlightServiceClient"%>
    <H3>Available Flight List</H3>
    <br>We have found the following Available flight(s) : </br>
    <table border="0" cellpadding="0" cellspacing="0" width="100">
    <tr>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Flight Company</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Flight Number</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Depart From<font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Arrive</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Departure Date</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Departure Time</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Arrival Date</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Arrival Time</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Adult Fare</font></b></td>
    <td width="10%" bgcolor="#808080"><b><font color="#FFFFFF">Child Fare</font></b></td>
    </tr>
    <%
    //Get the search information
    String des = request.getParameter("DFrom");
    String arr = request.getParameter("DTo");
    String fy = request.getParameter(FYear.value);
    String fm = request.getParameter(FMonth.value);
    String fd = request.getParameter(FDay.value);
    String f1 = fy + "-" + fm;
    String FDat = f1 + "-" + fd;
    String ty = request.getParameter(TYear.value);
    String tm = request.getParameter(TMonth.value);
    String td = request.getParameter(TDay.value);
    String t1 = ty + "-" + tm;
    String TDat = t1 + "-" + td;
    String type;
    if( request.getParameter(type[0].checked))
    type = "Return";
    else
    { type = "OneWay";
    String clas;
    if(request.getParameter(clas[0].checked))
    {clas = "ECO";
    else
    {clas = "BUSS";}
    String adult = request.getParameter(Adult.value);
    String child = request.getParameter(Child.value);
    //Get the server Flight Search Service URL
    // ServerFlightSearchBO SFSBO = new ServerFlightSearchBO();
    // ServerFlightSearch FlightSearch = SFSBO.getFlightSearchURL();
    // FlightSearchServiceClient FSearchServiceClient = new FlightSearchServiceClient
    String ServerFlightServiceURL = "http://localhost:7080/AServer/services/FlightService";
    //Find available Flight
    FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
    ArrayList list = client.getFlight(des, arr, FDat, TDat, type, clas, adult, child);
    Iterator it = list.iterator();
    while (it.hasNext()){
    Flight flt = (Flight)it.next();
    %>
    <tr>
    <td width= "10%"><%=flt.getFlightComp()%></td>
    <td width= "10%"><%=flt.getFlightNum()%></td>
    <td width= "10%"><%=flt.getDestination()%></td>
    <td width= "10%"><%=flt.getArrive()%></td>
    <td width= "10%"><%=flt.getFrDate()%></td>
    <td width= "10%"><%=flt.getFlightDptTm()%></td>
    <td width= "10%"><%=flt.getToDate()%></td>
    <td width= "10%"><%=flt.getFlightArrTm()%></td>
    <%
    int adt, chld;
    int far_A, tot_A, far_C, tot_C;
    adt = Integer.parseInt(adult);
    far_A = flt.getAdultFr();
    tot_A = adt * far_A;
    chld = Integer.parseInt(child);
    far_C = flt.getChildFr();
    tot_C = chld * far_C;
    %>
    <td width= "10%"><%=tot_A%></td>
    <td width= "10%"><%=tot_C%></td>
    </tr>
    <%
    if(type = "Return")
    FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
    ArrayList list = client.getFlight(arr, des, FDat, TDat, type, clas, adult, child);
    Iterator it = list.iterator();
    while (it.hasNext()){
    Flight flt = (Flight)it.next();
    %>
    <tr>
    <td width= "10%"><%=flt.getFlightComp()%></td>
    <td width= "10%"><%=flt.getFlightNum()%></td>
    <td width= "10%"><%=flt.getFlightDpt()%></td>
    <td width= "10%"><%=flt.getFlightArr()%></td>
    <td width= "10%"><%=flt.getFlightDptDt()%></td>
    <td width= "10%"><%=flt.getFlightDptTm()%></td>
    <td width= "10%"><%=flt.getFlightArrDt()%></td>
    <td width= "10%"><%=flt.getFlightArrTm()%></td>
    <%
    int adlt, chd;
    int fare_A, totA, fare_C, totC;
    adlt = Integer.parseInt(adult);
    fare_A = flt.getAdultFr();
    totA = adlt * fare_A;
    chd = Integer.parseInt(child);
    fare_C = flt.getChildFr();
    totC = chd * fare_C;
    %>
    <td width= "10%"><%=totA%></td>
    <td width= "10%"><%=totC%></td>
    </tr>
    <%
    %>
    </table>
    flightsearch$jsp.java
    package org.apache.jsp;
    import java.util.*;
    import com.client.entity.Flight;
    import com.client.wsclient.FlightServiceClient;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    import org.apache.jasper.runtime.*;
    public class flightsearch$jsp extends HttpJspBase {
    static {
    public flightsearch$jsp( ) {
    private static boolean jspxinited = false;
    public final void jspxinit() throws org.apache.jasper.runtime.JspException {
    public void _jspService(HttpServletRequest request, HttpServletResponse response)
    throws java.io.IOException, ServletException {
    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    String _value = null;
    try {
    if (_jspx_inited == false) {
    synchronized (this) {
    if (_jspx_inited == false) {
    jspxinit();
    jspxinited = true;
    _jspxFactory = JspFactory.getDefaultFactory();
    response.setContentType("text/html;ISO-8859-1");
    pageContext = _jspxFactory.getPageContext(this, request, response,
    "ErrorHandler.jsp", true, 8192, true);
    application = pageContext.getServletContext();
    config = pageContext.getServletConfig();
    session = pageContext.getSession();
    out = pageContext.getOut();
    // HTML // begin [file="/client/flightsearch.jsp";from=(0,59);to=(1,0)]
    out.write("\r\n");
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(1,43);to=(2,0)]
    out.write("\r\n");
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(2,58);to=(19,0)]
    out.write("\r\n\r\n<H3>Available Flight List</H3>\r\n<br>We have found the following Available flight(s) : </br>\r\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100\">\r\n <tr>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Flight Company</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Flight Number</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Depart From<font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Arrive</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Departure Date</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Departure Time</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Arrival Date</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Arrival Time</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Adult Fare</font></b></td>\r\n <td width=\"10%\" bgcolor=\"#808080\"><b><font color=\"#FFFFFF\">Child Fare</font></b></td>\r\n </tr>\r\n");
    // end
    // begin [file="/client/flightsearch.jsp";from=(19,2);to=(66,0)]
    //Get the search information
    String des = request.getParameter("DFrom");
    String arr = request.getParameter("DTo");
    String fy = request.getParameter(FYear.value);
    String fm = request.getParameter(FMonth.value);
    String fd = request.getParameter(FDay.value);
    String f1 = fy + "-" + fm;
    String FDat = f1 + "-" + fd;
    String ty = request.getParameter(TYear.value);
    String tm = request.getParameter(TMonth.value);
    String td = request.getParameter(TDay.value);
    String t1 = ty + "-" + tm;
    String TDat = t1 + "-" + td;
    String type;
    if( request.getParameter(type[0].checked))
    type = "Return";
    else
    { type = "OneWay";
    String clas;
    if(request.getParameter(clas[0].checked))
    {clas = "ECO";
    else
    {clas = "BUSS";}
    String adult = request.getParameter(Adult.value);
    String child = request.getParameter(Child.value);
    //Get the server Flight Search Service URL
    // ServerFlightSearchBO SFSBO = new ServerFlightSearchBO();
    // ServerFlightSearch FlightSearch = SFSBO.getFlightSearchURL();
    // FlightSearchServiceClient FSearchServiceClient = new FlightSearchServiceClient
    String ServerFlightServiceURL = "http://localhost:7080/AServer/services/FlightService";
    //Find available Flight
    FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
    ArrayList list = client.getFlight(des, arr, FDat, TDat, type, clas, adult, child);
    Iterator it = list.iterator();
    while (it.hasNext()){
    Flight flt = (Flight)it.next();
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(66,2);to=(68,18)]
    out.write("\r\n<tr>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(68,21);to=(68,40)]
    out.print(flt.getFlightComp());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(68,42);to=(69,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(69,21);to=(69,39)]
    out.print(flt.getFlightNum());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(69,41);to=(70,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(70,21);to=(70,41)]
    out.print(flt.getDestination());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(70,43);to=(71,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(71,21);to=(71,36)]
    out.print(flt.getArrive());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(71,38);to=(72,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(72,21);to=(72,36)]
    out.print(flt.getFrDate());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(72,38);to=(73,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(73,21);to=(73,41)]
    out.print(flt.getFlightDptTm());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(73,43);to=(74,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(74,21);to=(74,36)]
    out.print(flt.getToDate());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(74,38);to=(75,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(75,21);to=(75,41)]
    out.print(flt.getFlightArrTm());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(75,43);to=(76,1)]
    out.write("</td>\r\n ");
    // end
    // begin [file="/client/flightsearch.jsp";from=(76,3);to=(87,1)]
    int adt, chld;
    int far_A, tot_A, far_C, tot_C;
    adt = Integer.parseInt(adult);
    far_A = flt.getAdultFr();
    tot_A = adt * far_A;
    chld = Integer.parseInt(child);
    far_C = flt.getChildFr();
    tot_C = chld * far_C;
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(87,3);to=(88,18)]
    out.write("\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(88,21);to=(88,26)]
    out.print(tot_A);
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(88,28);to=(89,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(89,21);to=(89,26)]
    out.print(tot_C);
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(89,28);to=(91,0)]
    out.write("</td>\r\n</tr>\r\n");
    // end
    // begin [file="/client/flightsearch.jsp";from=(91,2);to=(100,0)]
    if(type = "Return")
    FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
    ArrayList list = client.getFlight(arr, des, FDat, TDat, type, clas, adult, child);
    Iterator it = list.iterator();
    while (it.hasNext()){
    Flight flt = (Flight)it.next();
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(100,2);to=(102,18)]
    out.write("\r\n<tr>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(102,21);to=(102,40)]
    out.print(flt.getFlightComp());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(102,42);to=(103,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(103,21);to=(103,39)]
    out.print(flt.getFlightNum());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(103,41);to=(104,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(104,21);to=(104,39)]
    out.print(flt.getFlightDpt());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(104,41);to=(105,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(105,21);to=(105,39)]
    out.print(flt.getFlightArr());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(105,41);to=(106,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(106,21);to=(106,41)]
    out.print(flt.getFlightDptDt());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(106,43);to=(107,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(107,21);to=(107,41)]
    out.print(flt.getFlightDptTm());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(107,43);to=(108,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(108,21);to=(108,41)]
    out.print(flt.getFlightArrDt());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(108,43);to=(109,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(109,21);to=(109,41)]
    out.print(flt.getFlightArrTm());
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(109,43);to=(110,1)]
    out.write("</td>\r\n ");
    // end
    // begin [file="/client/flightsearch.jsp";from=(110,3);to=(120,1)]
    int adlt, chd;
    int fare_A, totA, fare_C, totC;
    adlt = Integer.parseInt(adult);
    fare_A = flt.getAdultFr();
    totA = adlt * fare_A;
    chd = Integer.parseInt(child);
    fare_C = flt.getChildFr();
    totC = chd * fare_C;
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(120,3);to=(121,18)]
    out.write("\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(121,21);to=(121,25)]
    out.print(totA);
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(121,27);to=(122,18)]
    out.write("</td>\r\n <td width= \"10%\">");
    // end
    // begin [file="/client/flightsearch.jsp";from=(122,21);to=(122,25)]
    out.print(totC);
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(122,27);to=(124,0)]
    out.write("</td>\r\n</tr>\r\n");
    // end
    // begin [file="/client/flightsearch.jsp";from=(124,2);to=(126,0)]
    // end
    // HTML // begin [file="/client/flightsearch.jsp";from=(126,2);to=(127,8)]
    out.write("\r\n</table>");
    // end
    } catch (Throwable t) {
    if (out != null && out.getBufferSize() != 0)
    out.clearBuffer();
    if (pageContext != null) pageContext.handlePageException(t);
    } finally {
    if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);

    You are missing a closing parens. You have :
    if(type = "Return")
    FlightServiceClient client = new FlightServiceClient(ServerFlightServiceURL);
    ArrayList list = client.getFlight(arr, des, FDat, TDat, type, clas, adult, child);
    Iterator it = list.iterator();
    while (it.hasNext()){Which opens two parens but you only have one closing parens
    </tr>
    <%
    %>
    </table>

  • Problem:100 % cpu usage with tcp server dll

    Hello,
     I am trying to write a dll with labwindows/cvi that allows me to create a TCP Server. This dll is integrated in labview.I created this Dll with example provides by Labwindows/cvi(rtserver.dll).
    Description of my problem: when i execute this dll in a "While Loop" in labview,the TCp server wait a connection and 100% cpu usage occurs. However when a client is connect to the server,the CPU is normaly used because the program stop when he meets the timeout of the tcpread() function. I would like to know how i could limit CPU usage  when the server is awaiting a client in the labview "While loop".
    I know I could use a DELAY() to limit Cpu usage ,but I would like to know if there are any others solutions.
    thank you.

    i dont know your exact application, but i generally use Q to transfer data to TCP loop in my prgram it helps me in two ways.
    1. it automatically restricts the iteration when ther is no data (Less CPU Usage, Less Unnecessary Trafic)
    2. Q can eliminate problems arising due to non synchronization of loop
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

  • 100% CPU usage by iCal

    For some reason my iCal application uses 100% of CPU. What can I do to avoid it?

    I had a similar problem with iTunes.
    Here's the link to what fixed my problem immediately.  Please note: my problem was resolved following just the three steps pasted below.  The original link has additional steps that may be necessary, although I did not employ them, and my problem of 100% CPU USAGE is gone!!!  Thank God!
    URL source:     http://www.hotcomm.com/faq/FAQ_ResetWinsock.asp
    Good Luck
    Copyright (c) 2009 1stWorks Corporation. All rights reserved.
    This article gives instructions for resetting Winsock on Windows XP and Windows Vista: 
    Reset Winsock (Vista) 
    To reset Winsock in Vista: 
    1.Click the Windows Start button. 
    2. Type Cmd in the Start Search text box and press Ctrl-Shift-Enter (keyboard shortcut to run Command Prompt as Administrator). Click Continue to allow elevation request. 
    3. Type netsh winsock reset in the Command Prompt shell, and then press the Enter key. 
    URL source:     http://www.hotcomm.com/faq/FAQ_ResetWinsock.asp

  • Firefox using 100% cpu

    I'm running firefox 11 on Win 7 Ultimate. For the last 2 weeks it is pegging out the cpu at 100% and this is with 3 tabs open. I close it and check the task manager it stays open. I have to end the process. I then reopen and all is good. It will work for a while but flash constantly crashes in youtube (not saying that is a firefox problem) but I don't get this cpu usage. Using 600 MB RAM and 100% cpu with 3 tab...come on now. So, any ideas what is going on?

    Hi laytoncy,
    Have you looked at our [https://support.mozilla.org/en-US/kb/firefox-slow-or-takes-too-long-start performance troubleshooting section]? There is a lot of good information in there that should help.
    Hopefully this helps!

Maybe you are looking for