• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Servlet dependent class not found

 
Ranch Hand
Posts: 105
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks in advance for any help or advice.

I am having trouble getting my webapp working (I actually had it working a year ago, but dusted it off and wanted to set it up again).

I am running this on Ubuntu. This is my webapp setup:

Directory structure:



My deployment descriptor file (webapps/mfservice/WEB-INF/web.xml):


When i attempt to hit "http://192.168.0.6:8080/mfservice/music"

I get:


I have put all dependent jars in my webapps "lib" folder. I am not sure what else to try or how to go about fixing this?

Sometimes I do not get this error, sometimes I simply get a 404 with no error at all:

HTTP Status 404 - Servlet MFServlet is not available



Regards, Sam

 
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do the logs show more info; perhaps a ClassNotFound root cause?
 
sam wootton
Ranch Hand
Posts: 105
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I wish they did, but not sure they do...



I have all my jars in lib:



Regards, Sam

 
Bear Bibeault
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm, it's clearly ticked off about your MFServer class. But it looks like you've dotted all the i's on initial inspection.

Grasping at straws: are you on Windows? If so, I've seen weird problems like this as a result of casing issues in file names. Something to check. Also, MFServer and MFServlet are really close in spelling; might there be an instance where they were interchanged perhaps?

 
sam wootton
Ranch Hand
Posts: 105
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, in my initial post I mentioned OS is Ubuntu (its local server I ssh in to from windows actually).

I compile my src code from



Yeah, i just don't see why I cant get this to work. Tomcat examples work fine... im lost as to what to try!

Regards, Sam
 
Bear Bibeault
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

sam wootton wrote:No, in my initial post I mentioned OS is Ubuntu (its local server I ssh in to from windows actually).


Oh, dang. Sorry. I looked too, and completely missed it.

I went through the list of the usual suspects and it looks like you're not tripping over any of those.

I'm stumped too at the moment.

No stone unturned: have you launched the Tomcat manager app to make sure that the app is running as an independent context? (99.9% sure it is, but...)
 
Bear Bibeault
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this a typo?

javac -d ~/tomcat/webapps/mfservice/classes/ server/MFServer.java



Missing WEB-INF?

Though you mentioned in your first post that the class file was in WEB-INF/classes/server/
 
sam wootton
Ranch Hand
Posts: 105
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No probs.

Do you mean the main manager html?

http://samwootton.com:8080/

process



Regards, Sam
 
Bear Bibeault
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I meant:

http://localhost:8080/manager/html

You may need to configure access to this app.

(We posted at the same time above; make sure you see my question above about your compile command.)
 
sam wootton
Ranch Hand
Posts: 105
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Is this a typo?



* hangs head in shame *

... no it wasn't a typo, but it was my mistake. Well spotted and thank you!

How and why did I miss the obvious?

Works fine now (well, I can hit it):

http://samwootton.com:8080/mfservice/music

Regards, Sam
 
Bear Bibeault
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!