Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

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

 
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
 
Author
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
 
Lookout! Runaway whale! Hide behind this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!