I am developing a Maven
project which is using JSF 2.0
framework and Bootsfaces 1.1.1
ui components on Eclipse Neon
. The weird thing is, when I run my .xhtml
page, my code works. But after few runs I get the following error
Severe: Can't read the bean '#{MyBean}'. Thus JSR 303 annotations can't be read, let alone used by the AngularJS / AngularDart client.
Cleaning and updating maven helps me only temporarily. After few runs or even if I make a little change in my code, I get the same error.
My .xhtml code is as follows:
<b:column medium-screen="4" offset="1" span="10">
<b:inputText placeholder="Enter person's name here"
value="#{MyBean.searchString}" />
</b:column>
And my Java Class which is containing my bean is basically as:
@ManagedBean(name = "MyBean", eager = true)
@SessionScoped
public class MyClass {
public String getSearchString() {
return searchString;
}
public void setSearchString(String searchString) {
this.searchString = searchString;
}
private String searchString;
public void Search() throws IOException {
...
...
}
}
So, can someone explain me what could be the reason for such error, or lets say incosistency?
- Could it be because of using component like bootsfaces?
- Could it be because of Eclipse IDE or my POM file?
- Or did I basically set the JSF environment wrong? Because setting JSF Framework on Eclipse is kinda tricky. Requires lot of setting changes.
Any help will be appreciated.