• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Exception

 
Siddharth Bhargava
Ranch Hand
Posts: 274
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 274
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 274
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 122
IntelliJ IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 274
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 274
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 132
Hibernate Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 329
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Stevenson, we would mention it in struts-config.xml
 
TestConfig testConfig
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
shivakumar nayak
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Missing message for key "label.username" is because not specified proper path for property file in struts-config.xml

solution: change <message-resources parameter="resource.MessageResource" /> to <message-resources parameter="MessageResource" />

Regards
SKN
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic