Java CRUD存储库的所有方法都返回null

Java CRUD存储库的所有方法都返回null,java,jsf,spring-data,Java,Jsf,Spring Data,我在SpringDate+jsf上做项目。 我得到了一个奇怪的错误:CRUD存储库的所有方法都返回null model.Game.java @Setter @Getter @NoArgsConstructor @AllArgsConstructor @Entity @Table(name = "Игры") public class Game { @Id @GeneratedValue(strategy = GenerationType.IDENTITY)

我在SpringDate+jsf上做项目。 我得到了一个奇怪的错误:CRUD存储库的所有方法都返回null

model.Game.java

@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "Игры")
public class Game
{
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    @Column(name = "Название")
    private String name;
    @Column(name = "Бюджет")
    private int budget;
    @Column(name = "Прибыль")
    private  int profit;
    @Column(name = "Оценка")
    private  int number;
    @Column(name = "Платформа")
    private  int platform;
    @Column(name = "Статус разработки")
    private int status;
    @Column(name = "Начало разработки")
    private Date start;
    @Column(name = "Дата релиза")
    private Date end;



    public void update(Game new_game)
    {
        this.name = new_game.name;
        this.budget = new_game.budget;
        this.profit = new_game.profit;
        this.number = new_game.number;

        this.platform = new_game.platform;
        this.status = new_game.status;
        this.start = new_game.start;
        this.end = new_game.end;
    }
}
repository.GamesRepository

public interface GamesRepository extends CrudRepository<Game, Long>
{
    Game findByName(String nameGame);
    List<Game> getAllBy();
}
观看。游戏

@Component(value = "games")
@SessionScope
public class Games {

    @Autowired
    private GamesService gamesService;
    private List<Game> All_games = new ArrayList<Game>();


    public Games()
    {
        //List<Game> t=gamesService.getAll();
    //  System.out.println("Размер"+t.size());
        try {
            All_games.addAll(gamesService.getAll());
        } catch (Exception e) {
            e.printStackTrace();
        }
        All_games.add(new Game());
    }

    public void onRowEdit(RowEditEvent event) {
          Game new_game=(Game)event.getObject();
          All_games.get(new_game.getId()-1).update(new_game);
        FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "INFO", "X/Y edit successful!");
        FacesContext.getCurrentInstance().addMessage(null, msg);
            int i=0;
            i++;

    }


    public List<Game> getAll_games() {
        return All_games;
    }

    public void setAll_games(List<Game> all_games) {
        All_games = all_games;
    }
}
错误:

2020-12-31 21:55:00.139 ERROR 5624 --- [nio-8080-exec-1] j.e.r.webcontainer.jsf.application       : Error Rendering View[/ui/hello.xhtml]

javax.el.ELException: /ui/hello.xhtml @34,95 value="#{games.all_games}": Error reading [all_games] on type [org.xtremebiker.jsfspring.view.Games$$EnhancerBySpringCGLIB$$35b9b860]
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:119) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:200) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:187) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIData.getValue(UIData.java:766) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.primefaces.component.api.UIData.getDataModel(UIData.java:792) ~[primefaces-7.0.jar:7.0]
    at javax.faces.component.UIData.getRowCount(UIData.java:371) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:1141) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:1120) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeRegularTable(DataTableRenderer.java:445) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:376) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:95) ~[primefaces-7.0.jar:7.0]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:949) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1912) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1905) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:491) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:194) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:126) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:223) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at java.base/java.lang.Thread.run(Thread.java:830) ~[na:na]
Caused by: javax.el.ELException: Error reading [all_games] on type [org.xtremebiker.jsfspring.view.Games$$EnhancerBySpringCGLIB$$35b9b860]
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:98) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:180) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:208) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.apache.el.parser.AstValue.getValue(AstValue.java:169) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:115) ~[javax.faces-2.3.5.jar:2.3.5]
    ... 60 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.games' defined in file [F:\Intelij\demo (3)\demo\target\classes\org\xtremebiker\jsfspring\view\Games.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.xtremebiker.jsfspring.view.Games]: Constructor threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1238) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1137) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:353) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:45) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.context.request.SessionScope.get(SessionScope.java:57) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:350) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) ~[spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:672) ~[spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.xtremebiker.jsfspring.view.Games$$EnhancerBySpringCGLIB$$35b9b860.getAll_games(<generated>) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:94) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    ... 65 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.xtremebiker.jsfspring.view.Games]: Constructor threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:182) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1230) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    ... 81 common frames omitted
Caused by: java.lang.NullPointerException: null
    at org.xtremebiker.jsfspring.view.Games.<init>(Games.java:33) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) ~[na:na]
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) ~[na:na]
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:170) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    ... 83 common frames omitted

2020-12-31 21:55:00.146 ERROR 5624 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[facesServlet]         : Servlet.service() for servlet [facesServlet] in context with path [] threw exception [Error creating bean with name 'scopedTarget.games' defined in file [F:\Intelij\demo (3)\demo\target\classes\org\xtremebiker\jsfspring\view\Games.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.xtremebiker.jsfspring.view.Games]: Constructor threw exception; nested exception is java.lang.NullPointerException] with root cause

java.lang.NullPointerException: null
    at org.xtremebiker.jsfspring.view.Games.<init>(Games.java:33) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) ~[na:na]
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) ~[na:na]
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:170) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1230) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1137) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:353) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:45) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.context.request.SessionScope.get(SessionScope.java:57) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:350) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) ~[spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:672) ~[spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.xtremebiker.jsfspring.view.Games$$EnhancerBySpringCGLIB$$35b9b860.getAll_games(<generated>) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:94) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:180) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:208) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.apache.el.parser.AstValue.getValue(AstValue.java:169) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:115) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:200) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:187) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIData.getValue(UIData.java:766) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.primefaces.component.api.UIData.getDataModel(UIData.java:792) ~[primefaces-7.0.jar:7.0]
    at javax.faces.component.UIData.getRowCount(UIData.java:371) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:1141) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:1120) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeRegularTable(DataTableRenderer.java:445) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:376) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:95) ~[primefaces-7.0.jar:7.0]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:949) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1912) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1905) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:491) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:194) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:126) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:223) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
附言。 只是文字来满足限制 只是文字来满足限制 只是文字来满足限制 只是文字来满足限制 只是文字来满足限制
仅满足限制的文本

Spring不可能在对象构造之前在对象上注入字段,因此不能在构造函数中使用这些字段。这是油田注入是一个糟糕选择的众多原因之一

相反,只需将存储库设置为常规构造函数参数。您甚至不需要@Autowired,只要只有一个构造函数可供选择


更一般地说,从存储库返回的记录通常由一些持久性系统(如JPA)管理,不应该像您现在这样长期存储。相反,在需要时重新调用findAll,并尽量避免加载整个世界。

原因是:java.lang.NullPointerException:null位于org.xtremebiker.jsfspring.view.Games.Games.java:33~[classes/:na]是的,我知道。但是为什么呢?
2020-12-31 21:55:00.139 ERROR 5624 --- [nio-8080-exec-1] j.e.r.webcontainer.jsf.application       : Error Rendering View[/ui/hello.xhtml]

javax.el.ELException: /ui/hello.xhtml @34,95 value="#{games.all_games}": Error reading [all_games] on type [org.xtremebiker.jsfspring.view.Games$$EnhancerBySpringCGLIB$$35b9b860]
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:119) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:200) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:187) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIData.getValue(UIData.java:766) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.primefaces.component.api.UIData.getDataModel(UIData.java:792) ~[primefaces-7.0.jar:7.0]
    at javax.faces.component.UIData.getRowCount(UIData.java:371) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:1141) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:1120) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeRegularTable(DataTableRenderer.java:445) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:376) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:95) ~[primefaces-7.0.jar:7.0]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:949) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1912) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1905) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:491) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:194) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:126) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:223) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at java.base/java.lang.Thread.run(Thread.java:830) ~[na:na]
Caused by: javax.el.ELException: Error reading [all_games] on type [org.xtremebiker.jsfspring.view.Games$$EnhancerBySpringCGLIB$$35b9b860]
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:98) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:180) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:208) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.apache.el.parser.AstValue.getValue(AstValue.java:169) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:115) ~[javax.faces-2.3.5.jar:2.3.5]
    ... 60 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.games' defined in file [F:\Intelij\demo (3)\demo\target\classes\org\xtremebiker\jsfspring\view\Games.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.xtremebiker.jsfspring.view.Games]: Constructor threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1238) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1137) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:353) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:45) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.context.request.SessionScope.get(SessionScope.java:57) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:350) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) ~[spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:672) ~[spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.xtremebiker.jsfspring.view.Games$$EnhancerBySpringCGLIB$$35b9b860.getAll_games(<generated>) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:94) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    ... 65 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.xtremebiker.jsfspring.view.Games]: Constructor threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:182) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1230) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    ... 81 common frames omitted
Caused by: java.lang.NullPointerException: null
    at org.xtremebiker.jsfspring.view.Games.<init>(Games.java:33) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) ~[na:na]
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) ~[na:na]
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:170) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    ... 83 common frames omitted

2020-12-31 21:55:00.146 ERROR 5624 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[facesServlet]         : Servlet.service() for servlet [facesServlet] in context with path [] threw exception [Error creating bean with name 'scopedTarget.games' defined in file [F:\Intelij\demo (3)\demo\target\classes\org\xtremebiker\jsfspring\view\Games.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.xtremebiker.jsfspring.view.Games]: Constructor threw exception; nested exception is java.lang.NullPointerException] with root cause

java.lang.NullPointerException: null
    at org.xtremebiker.jsfspring.view.Games.<init>(Games.java:33) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) ~[na:na]
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) ~[na:na]
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:170) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1230) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1137) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:353) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:45) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.context.request.SessionScope.get(SessionScope.java:57) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:350) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) ~[spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:672) ~[spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.xtremebiker.jsfspring.view.Games$$EnhancerBySpringCGLIB$$35b9b860.getAll_games(<generated>) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:94) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:180) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:208) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.apache.el.parser.AstValue.getValue(AstValue.java:169) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190) ~[tomcat-embed-el-8.5.31.jar:8.5.31]
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:115) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:200) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:187) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIData.getValue(UIData.java:766) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.primefaces.component.api.UIData.getDataModel(UIData.java:792) ~[primefaces-7.0.jar:7.0]
    at javax.faces.component.UIData.getRowCount(UIData.java:371) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:1141) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:1120) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeRegularTable(DataTableRenderer.java:445) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:376) ~[primefaces-7.0.jar:7.0]
    at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:95) ~[primefaces-7.0.jar:7.0]
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:949) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1912) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:918) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1905) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1908) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:491) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:194) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:126) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) ~[javax.faces-2.3.5.jar:2.3.5]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:223) ~[javax.faces-2.3.5.jar:2.3.5]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671) ~[javax.faces-2.3.5.jar:2.3.5]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-8.5.31.jar:8.5.31]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]