3 Replies Latest reply on Jun 8, 2009 1:24 AM by Diego Coronel

    NullPointer using @Produces WBPreview1

    Diego Coronel Apprentice

      Hey,


      im getting nullPointer when using @Produces




      05/06/2009 22:30:53 org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Servlet.service() for servlet Faces Servlet threw exception
      java.lang.NullPointerException
           at org.jboss.webbeans.bean.AbstractProducerBean.checkReturnValue(AbstractProducerBean.java:225)
           at org.jboss.webbeans.bean.AbstractProducerBean.create(AbstractProducerBean.java:349)
           at org.jboss.webbeans.context.DependentContext.get(DependentContext.java:85)
           at org.jboss.webbeans.ManagerImpl.getInstance(ManagerImpl.java:801)
           at org.jboss.webbeans.ManagerImpl.getInstanceToInject(ManagerImpl.java:840)
           at org.jboss.webbeans.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:76)
           at org.jboss.webbeans.bean.AbstractClassBean.injectBoundFields(AbstractClassBean.java:106)
           at org.jboss.webbeans.bean.SimpleBean.create(SimpleBean.java:126)
           at org.jboss.webbeans.context.AbstractMapContext.get(AbstractMapContext.java:98)
           at org.jboss.webbeans.bean.proxy.ClientProxyMethodHandler.getProxiedInstance(ClientProxyMethodHandler.java:117)
           at org.jboss.webbeans.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:96)
           at com.fpf.login.HelloBean_$$_javassist_7.getUsuario(HelloBean_$$_javassist_7.java)
           at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
           at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
           at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
           at org.apache.el.parser.AstValue.getValue(AstValue.java:118)
           at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
           at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:102)
           at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:181)
           at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:167)
           at javax.faces.component.UIOutput.getValue(UIOutput.java:168)
           at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
           at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:335)
           at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
           at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:874)
           at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:293)
           at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:181)
           at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:128)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:844)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1609)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1612)
           at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:271)
           at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:124)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:103)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:311)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
           at java.lang.Thread.run(Unknown Source)
      



      the problem is when invoking  instance.getClass() the object instance is null