File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Problem in loading servlet in startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem in loading servlet in startup" Watch "Problem in loading servlet in startup" New topic
Author

Problem in loading servlet in startup

Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
Hi, i have a servlet and i have mapped in XML to load it at server startup. but it is throwing an exception. can you people please help me out.

the exception is



please help me out ... as soon as possible.


The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

at org.apache.jasper.util.SystemLogHandler.findStream(SystemLogHandler.java:105) at org.apache.jasper.util.SystemLogHandler.println(SystemLogHandler.java:214) at org.apache.jasper.util.SystemLogHandler.println(SystemLogHandler.java:214) at org.apache.jasper.util.SystemLogHandler.println(SystemLogHandler.java:214) at advertBeans.AdvertStart.init(AdvertStart.java:9)


Post the code inside the init() method of advertBeans.AdvertStart class.
Looks like you are using SystemLogHandler.println in your code. Do you actually want to use that or were you supposed to use:


[My Blog] [JavaRanch Journal]
Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
yeah i am using System.err.println(""); to debug it, since my debugger is not letting me to do so ... if the problem is due to this sytem thing then can you explain me what is the reason for it ??

here is the code



I am trying to omit all the system function to check it. waiting for your reply.


--------------------------------------------------------------------------
Hey, i have omited all Syste.err.println(""); lines and it is working properly. emm, can you explain the reason?
[ August 01, 2006: Message edited by: Muhammad Ali Amin ]
Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
I am waiting for the explanation
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61103
    
  66

Originally posted by Muhammad Ali Amin:
I am waiting for the explanation


Everyone who answers questions here is a volunteer. Demanding answers in this manner will just tick people off. How rude!

I'd be a lot nicer and a lot more patient and read this.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
he told me the solution but did not tell me why i am getting the error. I want to know the reason behind it ... is it agains the rules? i am not forcing someone to solve my problem. My problem has already been solved, I am just asking HOW? so that it may help me to get more understanding and to help others in future.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

I actually dont know the reason why its throwing a NullpointerException(thats the reason why i did not reply to your post )

I mentioned that particular solution to you based on what i could see in the stacktrace.
Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
emm, Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in loading servlet in startup