Estou com problemas sistema de cadastro e pesquisa ao persistir em método salvar da returno nulo, já mudei para @viewscoped meu bean mas nada, debuguei projeto e nada, não consigo identifica erro, estou iniciando em programação java web apanhado muito desde já agradeço.ao realizar debug deu campo de interrupção do campo CadastroProdutoService.serialVersionUID coloquei como modificação mais não resolveu.
log erro:
Inicialinado.... Hibernate: select categoria0_.id as id1_0_, categoria0_.categoria_pai_id as categori3_0_, categoria0_.descricao as descrica2_0_ from categoria categoria0_ where categoria0_.categoria_pai_id is null Hibernate: select categoria0_.id as id1_0_0_, categoria0_.categoria_pai_id as categori3_0_0_, categoria0_.descricao as descrica2_0_0_, categoria1_.id as id1_0_1_, categoria1_.categoria_pai_id as categori3_0_1_, categoria1_.descricao as descrica2_0_1_ from categoria categoria0_ left outer join categoria categoria1_ on categoria0_.categoria_pai_id=categoria1_.id where categoria0_.id=? subcategoria.... Hibernate: select categoria0_.id as id1_0_, categoria0_.categoria_pai_id as categori3_0_, categoria0_.descricao as descrica2_0_ from categoria categoria0_ where categoria0_.categoria_pai_id=? Inicialinado.... jul 20, 2016 4:27:19 PM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException GRAVE: Error Rendering View[/produtos/CadastroProduto.xhtml] javax.el.PropertyNotFoundException: /produtos/CadastroProduto.xhtml @54,101 value="#{cadastroProdutoBean.produto.categoria}": Target Unreachable, 'produto' returned null at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100) at org.primefaces.renderkit.InputRenderer.findImplicitConverter(InputRenderer.java:160) at org.primefaces.renderkit.InputRenderer.getOptionAsString(InputRenderer.java:146) at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeOption(SelectOneMenuRenderer.java:378) at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeSelectItems(SelectOneMenuRenderer.java:364) at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeInput(SelectOneMenuRenderer.java:146) at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeMarkup(SelectOneMenuRenderer.java:93) at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeEnd(SelectOneMenuRenderer.java:67) 16:27:19.390 [http-bio-8080-exec-41] ERROR com.oliveira.pedidovenda.util.jsf.JsfExceptionHandler - Erro de sistema: /produtos/CadastroProduto.xhtml @54,101 value="#{cadastroProdutoBean.produto.categoria}": Target Unreachable, 'produto' returned null at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:582) javax.el.PropertyNotFoundException: /produtos/CadastroProduto.xhtml @54,101 value="#{cadastroProdutoBean.produto.categoria}": Target Unreachable, 'produto' returned null at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183) at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1689) at org.primefaces.renderkit.InputRenderer.findImplicitConverter(InputRenderer.java:160) ~[primefaces-5.3.jar:5.3] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at org.primefaces.renderkit.InputRenderer.getOptionAsString(InputRenderer.java:146) ~[primefaces-5.3.jar:5.3] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeOption(SelectOneMenuRenderer.java:378) ~[primefaces-5.3.jar:5.3] at javax.faces.component.UIForm.visitTree(UIForm.java:371) at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeSelectItems(SelectOneMenuRenderer.java:364) ~[primefaces-5.3.jar:5.3] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeInput(SelectOneMenuRenderer.java:146) ~[primefaces-5.3.jar:5.3] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeMarkup(SelectOneMenuRenderer.java:93) ~[primefaces-5.3.jar:5.3] at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403) at org.primefaces.component.selectonemenu.SelectOneMenuRenderer.encodeEnd(SelectOneMenuRenderer.java:67) ~[primefaces-5.3.jar:5.3] at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:582) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1689) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.component.UIForm.visitTree(UIForm.java:371) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:322) at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:322) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219) at org.omnifaces.context.OmniPartialViewContext.processPartial(OmniPartialViewContext.java:144) at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60) ~[primefaces-5.3.jar:5.3] at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at org.omnifaces.context.OmniPartialViewContext.processPartial(OmniPartialViewContext.java:144) ~[omnifaces-2.4.jar:2.4] at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:432) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:432) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:651) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) ~[javax.faces-2.2.8-15.jar:2.2.8-15] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [javax.faces-2.2.8-15.jar:2.2.8-15] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) [javax.faces-2.2.8-15.jar:2.2.8-15] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:651) [javax.faces-2.2.8-15.jar:2.2.8-15] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [catalina.jar:7.0.70] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.70] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat7-websocket.jar:7.0.70] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.70] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.70] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: javax.el.PropertyNotFoundException: Target Unreachable, 'produto' returned null at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) [catalina.jar:7.0.70] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [catalina.jar:7.0.70] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) [catalina.jar:7.0.70] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) [catalina.jar:7.0.70] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.70] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) [catalina.jar:7.0.70] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.70] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442) [catalina.jar:7.0.70] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082) [tomcat-coyote.jar:7.0.70] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623) [tomcat-coyote.jar:7.0.70] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) [tomcat-coyote.jar:7.0.70] at org.apache.el.parser.AstValue.getTarget(AstValue.java:148) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_92] at org.apache.el.parser.AstValue.getType(AstValue.java:82) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_92] at org.apache.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:171) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.70] at org.jboss.weld.el.WeldValueExpression.getType(WeldValueExpression.java:93) at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92] Caused by: javax.el.PropertyNotFoundException: Target Unreachable, 'produto' returned null at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98) ... 52 more
at org.apache.el.parser.AstValue.getTarget(AstValue.java:148) ~[jasper-el.jar:7.0.70]
at org.apache.el.parser.AstValue.getType(AstValue.java:82) ~[jasper-el.jar:7.0.70]
at org.apache.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:171) ~[jasper-el.jar:7.0.70]
at org.jboss.weld.el.WeldValueExpression.getType(WeldValueExpression.java:93) ~[weld-servlet-2.3.2.Final.jar:2.3.2.Final]
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98) ~[javax.faces-2.2.8-15.jar:2.2.8-15]
... 52 more
Listening for transport dt_shmem at address: tomcat_shared_memory_id