- This topic has 5 replies, 4 voices, and was last updated 15 years ago by Chris.d.
-
AuthorPosts
-
MorkParticipantHello,
I am having a “FileNotFound” problem in a web service I’m working on.
I’ve deployed the web service per the MyEclipse Web Service demo (debug As…).
However, when trying to retrieve a file using the SOAP web services explorer, using one of the web services methods, I get a file not found exception. I have the jpegs directory in the same location as it is on the other installation where I’m using Intellij IDEA.
So, my question is, how to I “debug” the web service code itself (not just the SOAP Envelope, which looks fine.)?
There are properties being set in the web service code for “user.dir” and others that seem to be wrong given that the web service can’t find the jpeg to return.
Is it possible the JPEGs directory, at the root of the project, need to be put elsewhere in the project to be deployed successfully?
Look forward to your reply.
Thanks.
M
Brian FernandesModeratorMork,
I would suspect that your JPEG folder is simply not being deployed since you have it at the root of your project. You could check by going to the deployed location using the server view and examining that folder.
I would recommend moving the JPEG folder to your project’s WebRoot folder to easily fix the problem. Assuming your JPEG folder is named “jpeg” and your context root is myapp – if you put the jpeg folder directly under WebRoot, the absolute path to an image would be
http://localhost:<port>/myapp/jpeg/image1.jpgHope this helps, let me know if you require further assistance.
MorkParticipantI put the jpeg directory underneath webapps in the project and it *is* deployed.
However….
The actual problem appears to be that the deployment directory doesn’t match anything I can currently get in the web services code.
Here is the error that MyEclipse gives me when it can’t find the JPEG:
java.io.FileNotFoundException: C:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_7.5.0.zmyeclipse75020090612\tomcat\bin\jpegs\nordic.jpg.jpg (The system cannot find the path specified)
This path above is System.getProperty(‘user.dir”);
————-
However, using MyEclilpse’s server view for the exploded Debug As…. web service code, it says the actual path is …
C:\dev\MyEclipse Projects\.metadata\.me_tcat\webapps\ImageWebService\jpegs
————–
So, I the obvious question is how the heck to I get this Server path from my Web Services code since it’s neither the current directory or the user.dir?
I look forward to hearing back from you soon.
Thanks.
– M
MorkParticipantI figured it out.
smithdavid4321MemberThis message has not been recovered.
Chris.dMemberThis message has not been recovered.
-
AuthorPosts