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 javax.servlet.ServletException: PWC1381: Error allocating a servlet instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "javax.servlet.ServletException: PWC1381: Error allocating a servlet instance" Watch "javax.servlet.ServletException: PWC1381: Error allocating a servlet instance" New topic
Author

javax.servlet.ServletException: PWC1381: Error allocating a servlet instance

Suvojit Chakraborty
Ranch Hand

Joined: Nov 10, 2009
Posts: 60
Hi all,

I am trying to extract value from database in a filtered way. I am trying to get value as per emp_id.

Html Code

Servlet COde


Database connectivity code:



But executing it give following error;

HTTP Status 404 -

--------------------------------------------------------------------------------

type Status report

message

descriptionThe requested resource () is not available.


--------------------------------------------------------------------------------

Sun GlassFish Enterprise Server v2.1


Why so. Whats the error and how do I fix it??


thanks for help
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

*PLEASE* remove unnecessary comments/code/whitespace/etc. in the code.

You don't provide your web.xml, so it's impossible to help much. Is there anything in the logs? Are there startup errors?
Suvojit Chakraborty
Ranch Hand

Joined: Nov 10, 2009
Posts: 60


->I dont know how to check logs.
-> What do you mean by startup errors, please clarify. There were no errors before this one. As soon as I click on the button this error pops up.
Suvojit Chakraborty
Ranch Hand

Joined: Nov 10, 2009
Posts: 60
<servlet-mapping>
<servlet-name>getAll</servlet-name>
<url-pattern>/getAll</url-pattern>
</servlet-mapping>


Mr David, I think I spotted the error and fixed it. I found that in url-pattern I had /getAll instead of /getAll.view.
Perhaps it was causing the error.

Now at least the page is opening but it gives this exception : Error---Servlet Could not display records. which is actually the message I used in exception handler which mean it is throwing SQLException.
Please help me to spot.

Also can you tell me how did /getAll.view become /getAll? I dont create the web.xml it gets created automatically. I am using NetBean 6.5 iDE.

thank you
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: javax.servlet.ServletException: PWC1381: Error allocating a servlet instance
 
Similar Threads
error to login page
page refresh problem
Exception while EJB deployement
error message
Login code problem