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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Exception" Watch "Struts Exception" New topic
Author

Struts Exception

Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi Friends,
I am getting a weird error while running my Struts application. Following is the code snippet.




The exception which is coming is :



I think this is a very common exception. Please help me in debugging it.

Thanks and Regards,
Sid.
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi Friends,
Any luck in resolving the exception ? I am stuck with it and not able to find a way out.

Thanks and Regards,
Sid.
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi,
Please do post your replies to my query. I have been trying for couple of days now without any success. I have tried changing the file location, file name, etc. but of no use. It's not budging from its exception which it had shown 2 - 3 days early. Its the same exception. I don't know why its saying "Missing message for key "label.username" in bundle "(default bundle)" for locale en_US". Any help would be highly appreciated.

Thanks and Regards,
Sid.
Jesus Mireles
Ranch Hand

Joined: Mar 10, 2010
Posts: 122

Did you verify that the file is deployed to whatever runtime directory or archive .... the times I have seen this is when an IDE doesnt move .properties files over to the correct location.
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi,
Yeah I verified the file ApplicationResources.properties is there under WEB-INF\classes directory in the .war file. I really am clueless why I am getting this exception. Can't move forward without solving it. It has now been more than 4 days and I am not able to solve this issue.
Please anyone help me in resolving this issue. Not getting much help from net also.

Thanks and Regards,
Sid.
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi All,
Ultimately I found out the reason for the exception myself. I just removed resource from the line :



I think since it was directly under WEB-INF/classes directory so there was no need to mention the fully qualified name. It was enough to mention the resource file name i.e. "ApplicationResource".

Is this reasoning correct ? Please do comment.

Thanks and Regards,
Sid.
rohit chavan
Ranch Hand

Joined: Oct 08, 2010
Posts: 132

Hi Siddharth,

Your reasoning is correct according to me. The reason might be, we don't need to give fully qualified name for properties file. Have you tried placing it inside some other folder, and run the application again?
Stevenson Anderson
Greenhorn

Joined: Jul 09, 2011
Posts: 13
Hi Siddharth! Now I am getting the same problem
From Where did you remove the line <message-resources parameter="resource.ApplicationResources" />
Please do help me...


Thanks,
Steve.
Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

Hi Stevenson, we would mention it in struts-config.xml


Have Fun with Java
little,little.. little by little makes a lot..
TestConfig testConfig
Greenhorn

Joined: Feb 16, 2012
Posts: 3
Hi All,

I was also getting the same error. I am using Net beans 6.9.1.
Even if you remove this entry <message-resources parameter="ApplicationResources" /> from struts-config.xml it still works, but what you have to do is add all your messages ApplicationResources.properties file.

Hope this helps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Exception