• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 66
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic