load-on-startup problem

Hai all,
I want to run a servlet on start up
i did following
1) Add following to web.xml
<servlet>
<servlet-name>Schedular</servlet-name>
<servlet-class>com.abc.xyz.Schedular</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
2) copied the file to com.abc.xyz
but when i restarting iam getting following errror
Cannot load Servlet name
my java files shown below....am around it
import java.util.Timer;
import java.util.TimerTask;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Schedular extends HttpServlet {
Timer timer;
public Schedular(int seconds) {
timer = new Timer();
timer.schedule(new RemindTask(), seconds*1000);
class RemindTask extends TimerTask {
public void run() {
System.out.println("hai !");
timer.cancel(); //Terminate the timer thread
public void init(ServletConfig config) throws ServletException {
     super.init(config);
System.out.println("About to schedule task.");
new Schedular(5);
System.out.println("Task scheduled.");
public void service(HttpServletRequest request, HttpServletResponse response)
     throws IOException, ServletException
               System.out.println("servee.");
}

In web.xml, you say the servlet class is com.abc.xyz.Schedular but your servlet isn't in the package.
You need to add the following to your servlet...
package com.abc.xyz;Hope this helps,
JEB

Similar Messages

  • I am having an MacBok Pro 13inch,having an Startup Problem, the time i press the power button after few seconds the apple symbol appears w/a loading sign below it

    i am having an MacBook Pro 13inch  , having an Startup Problem , the time i press the power button after few seconds the apple symbol appears with a loading sign below it and wont go further ahead of it . My data is all in the hard drive .. . I even tried the Internet recovery but no use !!!! but still no respons and the recovery and macintosh hd is now lock! but earlier only the recovery is lock and after both of them is lock.  i can reinstall,... and i didnt try to back up any data bec i dont know how? so please help me to resolve my prroblem.?

    luoie wrote:
    This thing happend,, it say Disk utility stopped repairing "Macintosh HD" disk utility can't repair this disk
    Sorry, possibly you need a new hard drive or try reformating. First
    you can try something like http://www.alsoft.com/diskwarrior/  it has been known to repair disk that DiskUtility could not. YMMV and they don't give it away.
    If Disk Warrior can not repair then you need to Reformate the drive. Make sure you have a back-up in place no matter what.
    http://www.apple.com/support/backup/
    Disk Utility will tell you something about it's SMART status:

  • load-on-startup 1 /load-on-startup not working in Weblogic 9.1

    Hi
              I have the following xml tag in web.xml file
              <load-on-startup>1</load-on-startup> for some servlets, i have given then sequence 1 to 5, but for some reason 5 is loading first and the whole application crashes because of this.
              do i have to mention anything in weblogic.xml?
              Any ideas how do i fix this

    You're right, your situation is very similar to the situation the other poster describes. However, the main similarity is that neither of you have given us any information about what is going wrong. We can't read minds or read what's on your screen. We need to see specific error messages, stack traces, and specific code that shows what you are trying to do.
              However, it's likely that you're running into problems with the issues with "tag reuse" and "tag pooling". You should first read the JSP specification in the areas that talk about this issue, although this will probably leave you with more questions than you started with.
              I'm guessing that your "<gui:button>" element doesn't have any attributes. It's possible that WebLogic is reusing a single "<gui:button>" tag instance for each occurrence in your page. You may have to figure out how to turn off tag pooling in the JSP compiler, but I'm not sure how to do that.
              It's possible that Websphere doesn't give you an issue with this because perhaps they didn't bother with the tag pooling optimization (it is a good thing to have it available).

  • Can't get Servlet to Load On Startup

              I am trying to get a servlet to run at startup, and I have put the xml below in WEB-INF/web.xml to make this happen, but it is not working. The servlet does not run at startup.
              Anybody have any idea what the problem is?
              <servlet>
                   <servlet-name>Cocoon</servlet-name>
                   <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
                   <init-param>
                        <param-name>properties</param-name>
                        <param-value>./WEB-INF/cocoon.properties</param-value>
                   </init-param>
                   <load-on-startup/>
              </servlet>
              <servlet-mapping>
                   <servlet-name>Cocoon</servlet-name>
                   <url-pattern>*.xml</url-pattern>
              </servlet-mapping>
              ALSO, The servlet in this case is the Cocoon servlet, and the reason I am trying to get it to run at startup is because in my application I am calling it from another servlet, instead of through a direct call to an *.xml file, and so it requires a direct call to Initialize the Cocoon Engine. So, if anyone knows anything about how to solve this problem, that would also be helpful.
              Thanks.
              Harris.
              

              Thank you!
              That worked.
              Ruslan Bilorusets <[email protected]> wrote:
              >Harris,
              >
              >Please, try to specify a value for the <load-on-startup> element. It looks like a bug in our code.
              >
              >So,
              ><load-on-startup>1</load-on-startup>
              >should do the trick.
              >
              >Thanks,
              >-ruslan
              >
              >harris wrote:
              >
              >> I am trying to get a servlet to run at startup, and I have put the xml below in WEB-INF/web.xml to make this happen, but it is not working. The servlet does not run at startup.
              >>
              >> Anybody have any idea what the problem is?
              >>
              >> <servlet>
              >> <servlet-name>Cocoon</servlet-name>
              >> <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
              >> <init-param>
              >> <param-name>properties</param-name>
              >> <param-value>./WEB-INF/cocoon.properties</param-value>
              >> </init-param>
              >> <load-on-startup/>
              >> </servlet>
              >> <servlet-mapping>
              >> <servlet-name>Cocoon</servlet-name>
              >> <url-pattern>*.xml</url-pattern>
              >> </servlet-mapping>
              >>
              >> ALSO, The servlet in this case is the Cocoon servlet, and the reason I am trying to get it to run at startup is because in my application I am calling it from another servlet, instead of through a direct call to an *.xml file, and so it requires a direct call to Initialize the Cocoon Engine. So, if anyone knows anything about how to solve this problem, that would also be helpful.
              >>
              >> Thanks.
              >> Harris.
              >
              

  • Startup problems--time for a new machine?

    I have an imac G5 that I bought last February. In the last few weeks I've been experiencing serious startup problems. When turned on, the screen goes gray and the lines and pixels fragment and shimmer. It takes a long time to go to the main screen and often the screen isn't stable and freezes. It takes me eight to ten startups to get the system stable.
    I've repaired disk permissions, repaired h-drive, reset Pram. Still a mess. My husband wants me to just get a new one and get something that is not an Apple this time. I'm resisting that.
    I don't want to lose all my data and I've backed up what I can but I'm worried the data is corrupted and if I load it on to a new machine, I will experience the same problems.
    Any advice? I'm not even sure if this is a hardware or software problem. I'm out of warranty so I am on my own, but I'm frustrated to be having these problems with such a new machine.
    Thanks for any advice,
    Cassandra
    iMac G5   Mac OS X (10.4.6)  

    Cassandra, in addition to Barbara's excellent suggestion: looking to see if you qualify for the program, please make sure that you have an external FireWire drive and clone your drive, (SuperDuper is an excellent choice for backing up, cloning and making scehduled backups).
    Let us know how you made out,
    Miriam
    Rev A 20" iMac G5, 15"iMac G4, 15"iMac G3 DVD Mac OS X (10.4.6)

  • Startup problems w/ Power Mac G4 (QuickSilver 2002) M8667LL (dual 1 GHz)?

    Startup problems w/ Power Mac G4 (QuickSilver 2002) M8667LL (dual 1 GHz)
    Starts up with bong and then a long wait then screen comes on with old time smiley Mac and spinning beach ball then another long wait and then OS X loading bar and then a panic screen. Subsequent start, bong, and then hard drive spins for 6 or 7 minutes, then hard drive stops and then nothing. Could this be symptomatic of a hard drive failure?
    Thanks very much.

    I am pleased to report that I think the problem has been solved. Apparently the strange behavior can be attributed to overheating. After some on line research and the help of people on this list I opened the case and found that the logic board fan was clogged full of lint and dust. After cleaning it I discovered that the fan is inoperable. The computer is now operating with the case open and a small electric fan directed at the logic board heat sink. The computer has been operating flawlessly now for several hours. Will have to replace the bad cooling fan and clean the computer regularly. Thanks so much to all of the people who have responded to my request for help. Would like to mention that a firm with a canine connection charged me over a hundred dollars to report that their diagnosis is a faulty logic board.
    Thank you.

  • Startup problems: I found in log 7 SMC kernel errors

    Machine is intel iMac early2008 with the newest ver of Mavericks OSX.  I have 4GB RAM, newely installed additional 2GB of the 4GB. Prior to Mavericks upgrade it had Snow Leopard. Disk Utility shows only OSX to be Snow Leopard rather than Mavericks.  I had thought I may have installed 2 OSX of Mavericks when checking all files in sysem, but following several disk permissions verify and repair, several scans for duplicates, scans with iBoostup(since it was not much help I trashed it).  Disk Permissions scan found this:
    Warning: SUID file “usr/libexec/security_authtrampoline” has been modified and will not be repaired. (I am Unable to find anything on this)
    Warning: SUID file “usr/libexec/authopen” has been modified and will not be repaired. (I found that this is to be ignored
    I have searched for suggestions and have not found exactly what I am dealing with so will appreciate any and all suggestions..
    When rebooting from ShutDown I am getting , after long time of grey screen, a dark gray file with a ? mark in the center of it. Also for some time now I get a System Error message from my Avast each time following it's  scan.
    When the ?file shows I have no chice but to unplug machine and after a while, usually overnight, plug it in and it boots just fine until the next reboot following shutdown.  Before the Apple shows up on the screen there are random black pixls and dots on the gray screen.  The pixls and dots began following the upgrade to Mavericks OS X then stoped for a while until 2 days ago.
    I have reset the PRAM. I have done the following to reset the SCM several times and problems still persist with each Startup from the total Shutdown.
    Shut down the computer.
    Unplug the computer's power cord.
    Wait fifteen seconds.
    Attach the computer's power cord.
    Wait five seconds, then press the power button to turn on the computer.
    So inconvenient to do each time and very scarry for me. Please help and thank you so much.

    Thanks Eric.  I did uninstall Avast and reinstalled it. I did more checking of everything I could do once again..  The flashing gray ?File was Meteorologist I think when I checked Startup items.  I had already checked iTunes as I do not have anything in it.  When hilighted the Meteorologist was told it was not recognized. After checking it to not load at startup.  I then worked on an item called Aviator with asociated dmg callet whitehat something or other. Tried earlier to remove it and could not. After running disk permissions the umteenth time I ws able to remove the Aviator dmg and the whitehat thingy.
    I finally rebooted to Sfe Mode which was terrible. Everything was flashing all ove the place. I was able to check a few things as long as it did not require the use of internet. After all that I was ready to reboot again ans wala!!
    On reboot there was no flashing ?file folder even though it did take a very long time for machine to load. I had to wait for everything to load when opening Safari and internet Website. I have spent from 10 AM to now working on this and I think it will be OK.  Although machine seems to be using an unusual amount of the extra GB of memory I added yesterday.  The APP and File Cache seems to be using much more memory that when I had only 3GB. This is very frusating for me. The only app I stil have that I added yesterday is the Apple easy duplicate finder.  I hate to remove it since I had to pay for it.
    I don't know what Avast will find next time it runs a scan. I tried to do a full scan but after over an hour I stopped it. Will save that for tonight.
    Oh, I also ran a Software Update, nothing there. Might there be any hidden software that needs updating? Perhaps Java. I forgot to do that.  BTW, the Avast! Uninstall link you posted did not work for me so I went directly to the site and hunted for uninstaller. Finally discovered that it is very easy, just open Avast Preference and click uninstall .BTW, the reset SMC, 15 sec was not long enough time for my machine, I pluggeg back in after 15 mins and still got the ? file of death so unplugged for 30 mins and finally it loaded for me.
    Thank you for the reply and your interest.

  • Active protection system fails to load on startup

    I'm using a T 60 for over one year. Recently noticed missing icon after startup. Checked problem reports, noticed item stating compatibility problem. I am able to run tpshocks.exe to load program. I tried to reinstall hprotect from lenovo download site, but still doesn't load on startup. Stumped. Does anyone have any ideas. Is there a way to change compatibility mode for this app?
    Thanks.

    AD,
    If you are using Weblogic 10.3.4 then it's a bug - odiconsole throws that error. There is no issue with weblogic 10.3.3. Try with Weblogic 10.3.3 it works for us.
    Regards,
    Henry.

  • Load on startup

    I have one problem with my application.
    When web application startup ,we write initialization code in one servlet and set the setting for that servlet in web.xml as:
    <load-on-startup> tag .
    so servlet loads when tomcat run.
    how can i load normal class which having public static void main()
    when web appliction startup.i can write initialization code in main method();
    please help me.
    thank you in advance

    In a web application, I have to write a welcome message and version information in logs, for example many application server write "Server started on port 8080" etc.
    So, I want to load a class that prints like "Server v4.2.0.31 started." so what could be the solution?

  • System Events startup problem

    Recently I noticed my Macbooks fans where spinning all the time for no apparent reason.
    Upon further investigation I found out every single time I reboot my Macbook an application titled "System Events" will use up 50-60% of my CPU (continuously) until I force quit it from within the Activity Monitor and after this it will happily idle at around 3% presumably doing what ever task it does.
    I didn’t want to outright delete the application as I have no idea what it does and its also inside a folder labeled "Core Services", seemed like an area to tread carefully within.
    At least I have found a relatively simple work around but I was wondering if there is anyway to stop this happening all together?
    So far I've tried to disable each application that is being loaded on startup one at time to see if its any of them, Ive also tried adding and deleting the offending System Events application from the startup applications.
    Ive had no luck so far so any help will be much appreciated, if you need any further information on my Macbook I will be more than happy to provide it.
    Thanks for reading.
    EDIT: Ive also tried leaving the Macbook running while I was at work for around 6 hours, when I came home System Events was still at 60%, the logic behind doing this was to see if it was doing some sort of task system wide and I wasn’t giving it enough time to execute.
    Also these are the current applications running on startup.
    Quote:
    Ruby:~ Juo$ defaults read loginwindow | grep Path
    Path = "/Applications/iTunes.app/Contents/Resources/iTunesHelper.app";
    Path = "/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app" ;
    Path = "/Applications/Quicksilver.app";
    Path = "/Users/juo/Library/PreferencePanes/SynergyKM.prefPane/Contents/Resources/Syner gyd.app";
    Path = "/Applications/Colloquy.app";
    Path = "/Applications/Google Notifier.app";
    Path = "/Users/juo/Library/PreferencePanes/BusySync.prefPane/Contents/Resources/BusySy nc.app";
    Path = "/Volumes/Juo";
    Path = "/Applications/Adium.app";
    Path = "/Applications/Twitterrific.app";
    Path = "/Users/juo/Library/PreferencePanes/GrabUp.prefPane/Contents/Resources/GrabUpDa emon.app";
    Path = "/Users/juo/Library/PreferencePanes/GeekTool.prefPane/Contents/Resources/GeekTo ol.app";
    Path = "/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlMenu.app";
    Finally I am running Leopard 10.5.2 and have all the latest updates available within "Software Update"

    Welcome to the forums!
    "System Events" is widely used by AppleScript and by apps using AppleScript. Do NOT touch the app itself. You can certainly remove it from Login Items without making a scrap of difference - it will simply take a fraction of a second longer for the calling app to use it.
    IMO, you are going about things the right way. I am, in fact, surprised that one of those items you list is not the culprit. The culprit is most likely to be something in your Login Items or in /Library/StartupItems. You can ascertain which by logging into another, clean, account - create a temporary one if you don't have one. That will immediately tell you if the problem is limited to your account or is global.
    Tell us whether the problem is global or not, and that there is no doubt that you have exonerated the above items, and one of us will tell you where to look next.

  • How can i stop programs from automatically loading during startup?

    how can i stop programs from automatically loading during startup?

    Go to the Apple menu > System Preferences > Users & Groups and click on the user in question then on "Login Items."
    Also check the Startupitems folder: OS X Yosemite: If you have problems with startup items

  • PHANTOM web page loads on startup. Upon startup, an unwanted web page loads up.

    PHANTOM web page loads on startup. Upon startup, an unwanted web page loads up. My preferred web page "A" is still shown on the settings under -Tool-Options-General, home page address is correct and home button works correctly.
    Some file somewhere is forcing this page upon startup. I would like some ideas where to look.
    I have run various utilities such as AVG, Tweaknow, and spybot s&d newest version.
    Its just annoying to have to look at Yahoo Brazil upon startup
    A few months back, someone suggested some reset setting in Firefox, boy what a mistake, took a long time to get things back the way I like them, and it didn't work.
    I see this in the troubleshooting info ???
    "browser.startup.homepage_override.mstone": "19.0",
    "browser.startup.homepage_override.buildID": "20130215130331",

    The prefs that you posted are normal for a Firefox version (in this case Firefox 19.0.
    Please update to the current Firefox 22.0 release.
    *Help > About Firefox
    *https://support.mozilla.org/kb/update-firefox-latest-version.
    *https://support.mozilla.org/kb/Updating+Firefox
    The Firefox 19 version that you currently run is no longer supported with security updates.
    *It is important to update Firefox and add-ons to the latest version to get all security fixes.
    Try to use the SearchReset extension to reset some preferences to the default values.
    *https://addons.mozilla.org/firefox/addon/searchreset/
    Note that the SearchReset extension only runs once and then uninstalls automatically, so it won't show on the "Firefox > Add-ons" page (about:addons).
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    If you do not keep changes after a restart or otherwise have problems with preferences, see:
    *http://kb.mozillazine.org/Preferences_not_saved

  • Startup problem on my G4

    hi to all!
    Something that happened a couple of times (so far) with my Gigabit Ethernet: I switch the Power Mac on, then when I come back a few minutes later the monitor is on (well, it’s always on...), but the led is on orange, as when the Mac is off, and the Pro Mouse (attached to the keyboard) seems dead, as there’s no red light coming from it... however the Mac is indeed on, same noise (fan) as usual, and if I open the case everything seems ok and the internal red led is on. Then, both times, by pushing the restart button the G4 quickly loaded Tiger. First time everything seemed all right, but today the monitor changed its brightness all by itself a few times... and I’ve realized I had this sort of problem in the previous days too, but much less often and I hadn’t paid much attention to it.
    I’ve guessed all these could have been caused by faulty Ram modules, something I already experienced last September, and solved thanks to this forum (even if last time the problems were of a different kind), or there are other possible causes?!?
    Anyway, then I’ve run Rember, and the first time it was soon stuck while running Linear PRN, then I run it another time and... Rember went through all tests with no errors! Then one more test and again there was an error at the Linear PRN stage.
    When I got the error free test I had told Rember to close also the Finder, while during the other 2 tests the Finder was on... and I wonder if this matter or not.
    I guess all this confirm it’s a Ram problem, and tomorrow I’ll start checking what happens removing (or leaving) one module at a time... but I’m perplexed by the mixed results Rember gave me today: should I check every combination I’ll try more than once to be sure Rember results are ok or not?
    Thanks
    Stefano

    ok, last Saturday I first run a few more times Rember, and got mixed results, but at least on half there was an error at the Linear PRN stage (and contrary to the first 3 tests, there was no patter in running the test with or without the Finder on), then I uninstalled one of my two 512 MB modules, the one I got new and installed last year btw, and after this on Sunday and today I've run Rember several times with always error free tests... I guess I've already found the faulty module, and the startup problem should be solved (as it occured only twice before, and a couple of weeks apart, I can't be 100% sure)... the drawback is that I'm back to 896 MB Ram, but I should get a new (and hopefully working) 512 MB module in a few days.
    However, yesterday morning, soon after the startup of the Power Mac I noticed a few changes of brigthness of the screen... but I guess it should be a problem of the monitor, as in the last couple of days I also run several times CPUTest and always without any error in the tests
    Message was edited by: Finrod
    Message was edited by: Finrod

  • Module not loading at startup + logs

    I am having a problem getting my rtl8187 module to load at startup. This is my wireless driver. At startup my wireless refuses to work. I check my modules "lsmod" and the rtl8187 module appears to be loaded. However my wireless only starts working after I remove the module and then reload it.
    Can somebody tell me where I can find the log that will tell me whats going on with this module at startup.
    BFC

    Can somebody tell me where I can find the log that will tell me whats going on with this module at startup.
    You say the module gets loaded, as does lsmod. So there will be no error message, as the system thinks the module is working(which it probably is). The reason your wireless is not working may be another issue. In order for some things to work correctly certain things need be loaded before other things can access them.
    anyway, all error logs are in /var/log, shouldn't take you long to look through them. They are dated.

  • Date/time icon and other movable icons on menu bar cannot be loaded on startup,but it works if manually loaded

    Strange things happened since my mbp 13' (MD-101) was upgraded to 10.8.4 ----------- time icon, battery icon,and language icon (these icons can be moved when held Command key and drag) cannot be loaded on startup, but they still can be loaded when you get into System Preferences and manually  turn them on, as well as iStat Menus
    However, some other icons didn't bother, things like BetterTouchTool, NewsBar. They are immovable!! I guess it is the key factor that the icon is movable or not making the difference.
    Someone please lend me a helping hand?
    I've attached some pictures in order to make my situation easier to be understood.
    these icons can't be loaded on my loggin in.
    but they can be loaded manually
    however, these icons will be loaded on startup
    I've almost despaired to resolve it . Thanks for your help!

    I have a similar issue. When the computer goes into "Hibernate" mode -- that is, it loses power while sleeping and it writes the contents of it's memory to disk in order to boot into that exact configuration when woken up -- many of my icons when Apple-Tab'ing to another application appear as static. They look like a slightly colorized version of the "static snow" you see when tuning into a station that doesn't exist on a UHF antenna television. Also, icons in Chrome such as web sites "favorite icons" or favicon.ico (the icons that appear in the URL bar and bookmarks) will be scrambled in the same fashion , at first , until the actual icon is loaded.
    Between this, my menu bar and finder icons not displaying, and being unable to boot into safe mode, I'm getting quite ******. I have no idea what the **** is going on with my Macbook Pro. The issue of the scrambled icons actually existed prior to installing an SSD and doing a fresh install of Mountain Lion. I may end up throwing in the towl and re-installing the operating system but I'm sure SOMETHING will happen. It seems the latest update, 10.8.2, is absolute garbage.
    What the ****, Apple? And I really don't want to take the computer to the morons at the Apple Store. They are not "geniuses" by any measure.

Maybe you are looking for

  • How to transfer an iTunes library from an iPhone to a new Macbook Air

    I just received a new macbook air and I would like to transfer the music from my iPhone to my new laptop. My old laptop that contained my itunes library is dead so I don't know how to get the music from my iPhone onto my new computer.

  • How can I change the Background in a text-field into lets say grey?

    I created a text field and now I would like to not have the background in white. I did not figure out yet how I can do this. Also the help program did not help. Does anybody know how this works? Thanks a lot. Many greetings!

  • Exit Code: 15. Error: DW051. Photoshop CC

    I installed illustrator and indesign, but the photoshop doesn't work. The download was ok, but the installation always gives the same error: Exit Code: 15 Please see specific errors below for troubleshooting. For example,  ERROR: DW051 ... ----------

  • No audio out through Mini Displayport?

    Last night I hooked up my first-gen MBA to my plasma TV using a connector that converted the Mini Displayport to HDMI. The movie I streamed from Netflix looked great. One problem -- no audio. I guess there's no audio out through the Mini Displayport?

  • Schema Names

    Dear OTN members, Is there a way to make the schema name appear on the GUI's connecting to that schema. I understand Oracle creates a schema by default for a user created in the Database. Is it possible to rename this schema for the GUI's look and fe