The moose likes Struts and the fly likes Struts Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "Struts Exception" Watch "Struts Exception" New topic
Author

Struts Exception

Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 218
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: 218
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: 218
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: 218
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: 218
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: 46
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: 11
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: 278

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


Have Fun with Java
little,little.. little by little makes a lot..
 
 
subject: Struts Exception
 
Threads others viewed
Validation framework not working for login screen
Cannot find bean org. apache. struts. taglib. html. BEAN in any scope
No tag "form" defined in tag library imported with prefix "html"
Problem with resource bundle
Exception creating a bean of class
IntelliJ Java IDE