0

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.

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
KontrCode
  • 89
  • 11
  • Setting JSF up on Eclipse is not 'kinda tricky'. I never did anything special except using the eclipse webtools and maybe jboss-tools plugin. No specific settings anywhere... And remarkably enough, the error is from **angularjs/angulardart** and you nowhere use that tag... – Kukeltje Apr 03 '18 at 13:11
  • I believe setting JSF environment on Netbeans or IntelliJ is easier compared to Eclipse as I have used all of them before. In order to create a JSF project on maven, first we need to create a web project then turn it into a JSF from the facets menu. Also, further configuration for mojarra causes another error which is mentioned here [link](https://stackoverflow.com/questions/44858251/when-downloading-mojarra-libraries-for-jsf-it-is-showing-error-zip-file-is-empt). I even had to add settings.xml manually to fix some of the problems. I had none of these problems using Netbeans. – KontrCode Apr 03 '18 at 13:53
  • @Kukeltje by the way I did not use jboss-tools plugin. Do I need to use it at all? or when should I use it? – KontrCode Apr 03 '18 at 14:02

0 Answers0