Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Suvojit Chakraborty
Ranch Hand
Posts: 66
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*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
Posts: 66
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


->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
Posts: 66
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic