aspose file tools*
The moose likes Struts and the fly likes Issue while deploying war Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Issue while deploying war" Watch "Issue while deploying war" New topic
Author

Issue while deploying war

nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

Hi,
I have created a war file using eclipse, application is based on struts2 architecture.
When I deploy war file and enter the address in explorer I get 404 error. After checking the 'webapps' folder I found out that no folder was generated from the war file.
Here is the error that was there in tomcat stderr file:



I have never seen this error before and I have build and deployed many war files.
I have tried few things (few not logical):
pasted war directly in webapps - didn't work
deployed through tomcat manager page - didn't work
reinstalled tomcat and then tried above two again - didn't work

same war file is working fine in my system, but rest I have tried in 5 systems and not working in 4 of them. Then configuration of those systems is same.

Any suggestions are welcomed.

Regards
Nir
nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

Bump!!
I'm still looking for the solution, any suggestions..
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

"Bumping" doesn't really help. If I'd known the answer originally, I would have said something. I was hoping someone else would have a suggestion.

All I can say is that the UnknownHostException for struts.apache.org is disturbing, since that's (presumably) not your servername. Past experience has been that it meant that the app could not fetch a DTD from that server. but I was hoping that sort of problem was no longer an issue.

Tomcat is not obligated to "explode" a WAR file into a directory under TOMCAT_HOME/webapps. That's the default behavior, but it can be overridden.

In any case, I think that maybe this question needs to be moved to the Struts forum, since it seems to be a Struts-related problem.


Customer surveys are for companies who didn't pay proper attention to begin with.
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi Nir,

Have you checked by deplyoing some other web application ?
Try to deploy simple struts application and check if its running or not?

Can you see anything in log any comments of yours?

Regards
Jatan




nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

jatan bhavsar wrote:
Have you checked by deplyoing some other web application ?
Try to deploy simple struts application and check if its running or not?

did, and those worked fine.

jatan bhavsar wrote:
Can you see anything in log any comments of yours?

no nothing otehr than what I have mentioned.

Well, after doing some R&D i found out that there was a wrong dtd mentioned in the context.xml file which was creating this issue. So I made the changes. After that I got a new error(atleast some progress there).



then I installed tomcat version 6.0.38 and deployed the war, and it got deployed without any issue.

Though the issue is resolved if I work on ver 6.0.35 but still I wonder why new error and why it worked on 6.0.35 and not on 6.0.32 ?
So any inputs on this.
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi,

Have you search what is the meaning of java.net.ConnectException and possible reasons for the same. It is because your service for the database is not up.
When its working try to deploy on the any tomcat version it should work.

Second point you can validate your xml with validate option from the eclipse which can guide you for any possible error or warnings.

Regards
Jatan
nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

jatan bhavsar wrote:Have you search what is the meaning of java.net.ConnectException and possible reasons for the same. It is because your service for the database is not up.
When its working try to deploy on the any tomcat version it should work.

Thanks for the reply, well I did search but I wonder how can service be down as my database is ms access and is in the same system.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue while deploying war