Solucionado (ver solução)
Solucionado
(ver solução)
4
respostas

Erro ao tentar acessar o endereço http://localhost:8080/argentum-web/

Olá, Ao tentar acessar o endereço http://localhost:8080/argentum-web/, apareceu o erro abaixo. Tenho o jdk-11 e o jdk1.8.0_181 instalados. A variável de ambiente configurada no meu Windows é do jdk1.8.0_181.

HTTP Status 500 – Internal Server Error
Type Exception Report

Message Não é possível criar instância para·a classe: br.com.caelum.argentum.bean.ArgentumBean.

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: Não é possível criar instância para·a classe: br.com.caelum.argentum.bean.ArgentumBean.
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
4 respostas
Root Cause

com.sun.faces.mgbean.ManagedBeanCreationException: Cant instantiate class: br.com.caelum.argentum.bean.ArgentumBean.
    com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:191)
    com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:100)
    com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
    com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
    com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:257)
    com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:117)
    com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
    com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
    org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:71)
    org.apache.el.parser.AstValue.getValue(AstValue.java:161)
    org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
    com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
    javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
    javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
    javax.faces.component.UIOutput.getValue(UIOutput.java:174)
    javax.faces.component.UIInput.getValue(UIInput.java:291)
    org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:92)
    org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:56)
    org.primefaces.component.inputmask.InputMaskRenderer.encodeMarkup(InputMaskRenderer.java:99)
    org.primefaces.component.inputmask.InputMaskRenderer.encodeEnd(InputMaskRenderer.java:57)
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
    org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:89)
    org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:72)
    org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:206)
    org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:123)
    org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:58)
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1864)
    javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1857)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
    com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:461)
    com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Root Cause

java.lang.RuntimeException: java.net.UnknownHostException: argentumws.caelum.com.br
    br.com.caelum.argentum.ws.ClienteWebService.getNegociacoes(ClienteWebService.java:26)
    br.com.caelum.argentum.bean.ArgentumBean.<init>(ArgentumBean.java:39)
    java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    java.base/java.lang.Class.newInstance(Class.java:584)
    com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:186)
    com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:100)
    com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
    com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
    com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:257)
    com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:117)
    com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
    com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
    org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:71)
    org.apache.el.parser.AstValue.getValue(AstValue.java:161)
    org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
    com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
    javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
    javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
    javax.faces.component.UIOutput.getValue(UIOutput.java:174)
    javax.faces.component.UIInput.getValue(UIInput.java:291)
    org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:92)
    org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:56)
    org.primefaces.component.inputmask.InputMaskRenderer.encodeMarkup(InputMaskRenderer.java:99)
    org.primefaces.component.inputmask.InputMaskRenderer.encodeEnd(InputMaskRenderer.java:57)
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
    org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:89)
    org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:72)
    org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:206)
    org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:123)
    org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:58)
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1864)
    javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1857)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
    com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:461)
    com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Root Cause

java.net.UnknownHostException: argentumws.caelum.com.br
    java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:220)
    java.base/java.net.Socket.connect(Socket.java:591)
    java.base/java.net.Socket.connect(Socket.java:540)
    java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182)
    java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
    java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
    java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
    java.base/sun.net.www.http.HttpClient.New(HttpClient.java:341)
    java.base/sun.net.www.http.HttpClient.New(HttpClient.java:362)
    java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1242)
    java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1181)
    java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1075)
    java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1009)
    java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1581)
    java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
    br.com.caelum.argentum.ws.ClienteWebService.getNegociacoes(ClienteWebService.java:23)
    br.com.caelum.argentum.bean.ArgentumBean.<init>(ArgentumBean.java:39)
    java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    java.base/java.lang.Class.newInstance(Class.java:584)
    com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:186)
    com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:100)
    com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
    com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
    com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:257)
    com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:117)
    com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
    com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
    org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:71)
    org.apache.el.parser.AstValue.getValue(AstValue.java:161)
    org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)
    com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
    javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
    javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
    javax.faces.component.UIOutput.getValue(UIOutput.java:174)
    javax.faces.component.UIInput.getValue(UIInput.java:291)
    org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:92)
    org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:56)
    org.primefaces.component.inputmask.InputMaskRenderer.encodeMarkup(InputMaskRenderer.java:99)
    org.primefaces.component.inputmask.InputMaskRenderer.encodeEnd(InputMaskRenderer.java:57)
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
    org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:89)
    org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:72)
    org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:206)
    org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:123)
    org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:58)
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1864)
    javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1857)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860)
    com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:461)
    com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
solução!

Oi Roger,

A URL está dando algum pau no DNS que não estamos conseguindo subir.

Você pode resolver trocando pra acessar diretamente no heroku: http://argentumws-spring.herokuapp.com/negociacoes