Jump to content

Search the Community

Showing results for tags 'spring'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Q&A Desenvolvimento
    • Perguntas e respostas rápidas
  • Desenvolvimento e Banco de Dados
    • HTML e CSS
    • Java
    • Javascript
    • .NET
    • PHP
    • Python
    • Ruby
    • Mobile
    • Ambientes de Desenvolvimento
    • Arquitetura e Métodos Ágeis
    • Banco de Dados
    • DevOps
    • Desenvolvimento de Games
    • E-Commerce e Pagamentos Online
    • SEO e Otimizações
    • WordPress
    • Algoritmos & Outras Tecnologias
  • Design e Produto
    • Fotografia
    • Photoshop
    • Design de interfaces e UX
    • Edição/Produção de Vídeos
    • Marketing Online
    • Desenho, Ilustração e 3D
  • Entretenimento e uso pessoal
    • Geral
    • Segurança & Malwares
    • Gadgets e wearable
    • Softwares e Apps
    • Entretenimento

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Google+


Hangouts


Skype


Twitter


deviantART


Github


Flickr


LinkedIn


Pinterest


Facebook


Site Pessoal


Localização


Interesses

Found 9 results

  1. Renato Muniz

    Spring, campo transient visível na View

    Boa noite pessoal, minha Entity tem um campo @NumberFormat(pattern = "#,##0.00") transient BigDecimal total; Esse campo é calculando la no meu repository com um JOIN.... o problema é que quando ponho ele não transitório eu não consigo exibir o valor dele na View tento como acima, como abaixo: @Transient @Column(updatable = false, insertable = false) @NumberFormat(pattern = "#,##0.00") private BigDecimal valortemporario; Meu desejo é utilizar esse campo calculado na View, mas sem persistir ele, quqndo mando salvar os dados enviando o objeto esse campo vai junto, utilizando o transient BigDecimal total ele retira da persistência mas não me deixa visualizar na view, to a um tempão procurando solução e não encontro, obrigado desde já!! Abaixo seque a query so pra efeito de visualizar o caso num todo!! public interface AtendimentosRepository extends JpaRepository<Atendimentos, Long> { String sqlPrincipal = "SELECT id_heados, usuario_heados, cadastro_heados, " + " sinistronumero_heados, pecastotal.valortemporario as total, " + "corretor_heados, custosadicionais_heados, veiculo_heados, empresa_heados, seguradora_heados, " + " datalanc_heados, dataprevsaida_heados, dataentrada_heados, deducao_heados,extramaoobra_heados ," + " extrapeca_heados, franquia_heados, maoobra_heados, materialpintura_heados,obschecklist_heados, " + " veiculo_km_heados, obsextras_heados,tipoatendimento_heados, totalpecas_heados, " + " datasaida_heados FROM heados " + " LEFT JOIN ( (SELECT pedos.controle_pedos,adicional_pedos," + " sum( ( COALESCE(valor_pedos,'0') * COALESCE(quantidade_pedos,'0') ) - ( " + " ( COALESCE(valor_pedos,'0') * COALESCE(quantidade_pedos,'0') ) * COALESCE(desconto_pedos,'0') /100" + " ) ) as valortemporario FROM pedos as pedos WHERE adicional_pedos = 'N'" + " group by pedos.controle_pedos) ) pecastotal ON controle_pedos " + " WHERE id_heados = :controle "; @Query(value = sqlPrincipal, nativeQuery = true) public Atendimentos atendimentoByControle(@Param("controle") Long controle); } Obrigado!!! Renato Muniz.
  2. Estou desenvolvendo uma aplicação web com Spring + Maven + Hibernate, já criei as minhas classes e fiz as anotações de persistência no banco de dados e criei uma classe de teste para verificar a minha conexão com o banco de dados. Porém, ao executar a minha classe de teste de conexão, está retornando a seguinte mensagem de erro na IDE (NetBeans) - "Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec" Já verifiquei as minhas pastas do repositório local e tenho criado as pastas: org/codehaus / mojo. Alguém tem alguma dica do que posso estar fazendo de errado? Já deletei todo o conteúdo das pastas: C:\Users\Dilnei\AppData\Local\NetBeans\Cache e da pasta: C:\Users\Dilnei\AppData\Roaming\NetBeans\8.0.2\var Porém ao reiniciar o NetBeans e executar o arquivo o problema persiste. Obrigado
  3. Olá, estou com um problema onde a aplicação me retorna java.lang.NoSuchFieldError: EXCLUDE_EMPTY at org.glassfish.jersey.client.ClientConfig$State.<init>(ClientConfig.java:147) ~[jersey-client-2.8.jar:na] at org.glassfish.jersey.client.ClientConfig.<init>(ClientConfig.java:451) ~[jersey-client-2.8.jar:na] at org.glassfish.jersey.client.JerseyClientBuilder.<init>(JerseyClientBuilder.java:94) ~[jersey-client-2.8.jar:na] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_171] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_171] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_171] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_171] at java.lang.Class.newInstance(Class.java:442) ~[na:1.8.0_171] at javax.ws.rs.client.FactoryFinder.newInstance(FactoryFinder.java:116) ~[javax.ws.rs-api-2.0.jar:2.0] at javax.ws.rs.client.FactoryFinder.find(FactoryFinder.java:206) ~[javax.ws.rs-api-2.0.jar:2.0] at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:86) ~[javax.ws.rs-api-2.0.jar:2.0] at javax.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:114) ~[javax.ws.rs-api-2.0.jar:2.0] at br.com.integracaohuggy.clinicasim.endpoint.HuggyController.IntegrationTest(HuggyController.java:29) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[tomcat-embed-core-8.5.31.jar:8.5.31] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851) ~[spring-webmvc-5.0.6.RELEASE.jar:5.0.6.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat-embed-core-8.5.31.jar:8.5.31] 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.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.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.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.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:81) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.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.6.RELEASE.jar:5.0.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.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.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.31.jar:8.5.31] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171] Segue a função: @RequestMapping("/integrationTest") public void IntegrationTest() { // String de teste // https://api.powerzap.com.br/v2?page=2 Client client = ClientBuilder.newClient(); Response response = client.target("https://api.powerzap.com.br/v2?page=1") .request(MediaType.APPLICATION_JSON_TYPE) .header("X-Authorization", "Bearer xxxxxxxxxx") .get(); System.out.println("status: " + response.getStatus()); System.out.println("headers: " + response.getHeaders()); System.out.println("body:" + response.readEntity(String.class)); } Alguém saberia do que se trata? Como posso resolver ou alguma coisa dessa natureza? Obrigado desde já! Abraços!!!!
  4. 0votar contrafavorita Estou a enfrentar um comportamento um tanto quanto estranho no meu projecto que usa Maven+Spring+Hibernate+JSP. Quando acciono um botão no formulário,tudo flui normalmente (a URL correspondente é accionada e a lógica corresponde ao método ligada a mesma URL é executada), porém, o possível retorno do método não se reflecte no formulário porque a URL não é carregada no browser. O mais intrigante é que não arrebenta nenhum erro, o que faz tornar-se mais complicado superar esta anomalia. Alguém sabe dizer qual pode ser a razão desta anomalia? Estou a dias batendo cabeça com esta situação sem sucesso! Preciso de adicionar alguma biblioteca, ou qualquer coisa do género? Vide o códgo: Form: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%> <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <%@ taglib tagdir="/WEB-INF/tags" prefix="sb" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link href="<c:url value="/resources/css/sigraStyle.css" />" rel="stylesheet"> <link type="text/css" href="resources/css/jquery-ui-1.10.1.custom.css" rel="stylesheet"> <script type="text/javascript" src="resources/js/jquery-1.9.1.js"></script> <script type="text/javascript" src="resources/js/jquery-ui-1.10.1.custom.js"></script> <title>Insert title here</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!--<script src="http://code.jquery.com/jquery-latest.min.js"></script> --> <script type="text/javascript" > function remove(selfId){ $.get("remove",{'selfId':selfId}); } function cancelar(){ $.get("cancelar"); } $(document).ready(function() { $("#deptForm").submit(function(e) { if(!validar()) { e.preventDefault(); } }); }); function validar(){ if (document.getElementById('designacao').value == ''){ alert("O campo 'Designacao' deve ser preenchido"); return false; } if (document.getElementById('descricao').value == ''){ alert("O campo 'Descricao' deve ser preenchido"); return false; } return true; } </script> </head> <body> <c:import url="/cabecalho.jsp" /> <form id="deptForm" action="/sigra/dept/save" method="post" modelAttribute="dept" > <fieldset> <h4 align="center"> CADASTRO DE DEPARTAMENTO</h4> <table width="100%"> <tr> <td align="center" colspan="3"> <font color="blue"> ${statusMsg} </font> </td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td> <fieldset> <table> <tr> <td> <c:if test="${dept.selfId!=null && dept.selfId>0}"> <input name="selfId" id="selfId" value="${dept.selfId}" hidden="true"> </c:if> </td> </tr> <tr> <td width="15%"> <label> Designa&ccedil;&atilde;o:</label> </td> <td width="85%"> <span id="refresh_01"> <input type="text" id="designacao" name="designacao" style=" width: 100%" value="${dept.designacao}" > </span> </td> </tr> <tr> <td width="15%"> <label>Descri&ccedil;&atilde;o:</label> </td> <td width="85%"> <span id="refresh_02"> <textarea name="descricao" id="descricao" rows="5" cols="40" style="width: 100%" >${dept.descricao}</textarea> </span> </td> </tr> </table> </fieldset> </td> </tr> <tr> <td> <fieldset> <table> <tr> <td> <!-- <a id="save" href="/sigra/dept/save.html" onclick="testFunction()">teste</a> --> </td> <td> <c:choose> <c:when test="${(dept.selfId == null )|| (dept.selfId==0) }"> <input type="submit" name="action" value="Salvar" > <input type="reset" value="Limpar" > </c:when> <c:otherwise> <!-- <input type="button" id="Actualizar" value="Actualizar" onclick="actualizar(${dept});" > --> <input type="submit" name="action" value="Actualizar" > <input type="button" value="Remover" onclick="remove(${dept.selfId});"> <input type="button" value="Cancelar" onclick="cancelar();"> </c:otherwise> </c:choose> <input type="button" name="voltar" id="voltar" value="Voltar"> </td> <td > <!-- <button type="button" id="post-btn">$.Post Submit</button> --> </td> <td> </td> </tr> </table> </fieldset> </td> </tr> <tr> <td>&nbsp; </td> </tr> <tr> <td> <fieldset> <legend>Lista de Departamentos</legend> <table width="100%"> <tr> <!-- <td width="15%"></td> --> <td width="85%"> <table > <tr align="left"> <th width="5%" >EDITAR</th> <th width="45%">DESIGNA&Ccedil;&Atilde;O</th> <th width="50%">DESCRI&Ccedil;&Atilde;O</th> </tr> <c:forEach items="${allDept}" var="departamento"> <tr> <td height="20" valign="middle"> <a href="/sigra/dept/selecteddept?selfId=${departamento.selfId}" > <img src="<c:url value="/imagens/edit_big.gif" />" width="22px" height="22px" title="Clica aqui para Detalhar!"/> <!-- <img src="comuns/images/edit_big.gif" width="22px" height="22px" title="Clica aqui para Detalhar!" /> --> </a> </td> <td>${departamento.designacao}</td> <td>${departamento.descricao}</td> </tr> </c:forEach> </table> </td> </tr> </table> </fieldset> </td> </tr> <tr> </tr> </table> </fieldset> </form> <c:import url="/rodape.jsp" /> </body> </html> Controller: @Controller @RequestMapping("/dept") public class DepartamentoAction { ArrayList<DepartamentoVO> allDept = new ArrayList<DepartamentoVO>(); @RequestMapping(method= RequestMethod.GET) public ModelAndView step0(){ DepartamentoDAO deptDao = new DepartamentoDAO(); allDept = deptDao.getAll(); ModelAndView modelView = new ModelAndView("dept/dept-form","allDept", this.allDept); return modelView; } @RequestMapping(value="/save", method= {RequestMethod.POST}) public String save(DepartamentoVO dept, UsuarioVO user, @RequestParam("action") String action, RedirectAttributes redirectAttributes) throws Exception{ DepartamentoDAO dao = new DepartamentoDAO(); if (action.equalsIgnoreCase("Salvar")) { dao.save(dept, user); } else{ dao.update(dept, user); } redirectAttributes.addFlashAttribute("statusMsg", Mensagens.OPERATION_SUCCESS_MSG); return "redirect:"; } @RequestMapping(value="/remove") public ModelAndView remove( DepartamentoVO dept , UsuarioVO user, RedirectAttributes redirectAttributes, HttpServletRequest request) throws Exception{ DepartamentoVO deptAux = (DepartamentoVO) request.getSession().getAttribute("dept"); DepartamentoDAO deptDao = new DepartamentoDAO(); deptDao.deleteByID(dept.getSelfId(), user); redirectAttributes.addFlashAttribute("statusMsg", Mensagens.OPERATION_SUCCESS_MSG); return new ModelAndView("dept/dept-form","allDept", this.allDept); } @RequestMapping(value="/selecteddept", method= {RequestMethod.POST, RequestMethod.GET}) public ModelAndView loadpagamento(@RequestParam("selfId") long id, UsuarioVO user,Model model){ DepartamentoVO dept = new DepartamentoVO(); dept.setSelfId(id); for ( DepartamentoVO departamento : this.allDept) { if(departamento.getSelfId()== dept.getSelfId()){ dept = departamento; model.addAttribute("dept", dept); } } return new ModelAndView("dept/dept-form","allDept", this.allDept); } @RequestMapping(value="/cancelar", method= {RequestMethod.GET}) public ModelAndView cancelar(){ System.out.println("Cancelando....!"); ModelAndView modeView = new ModelAndView("dept/dept-form","allDept", this.allDept); modeView.addObject("dept", new DepartamentoVO()); return modeView; } }
  5. luansilva71

    Erro de injeção no Bean gerenciado

    Estou desenvolvendo em jsf e me deparei com este erro, alguém sabe o que pode ser??? javax.servlet.ServletException: javax.servlet.ServletException: Um erro ocorreu ao realizar a injeção de recurso no bean gerenciado telaAlunosBean br.edu.ifba.as.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:39) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) root cause javax.servlet.ServletException: Um erro ocorreu ao realizar a injeção de recurso no bean gerenciado telaAlunosBean javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) br.edu.ifba.as.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:26) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) root cause com.sun.faces.mgbean.ManagedBeanCreationException: Um erro ocorreu ao realizar a injeção de recurso no bean gerenciado telaAlunosBean com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:227) com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:103) 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:80) org.apache.el.parser.AstValue.getValue(AstValue.java:137) org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) 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:94) org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:58) org.primefaces.component.inputtext.InputTextRenderer.encodeMarkup(InputTextRenderer.java:71) org.primefaces.component.inputtext.InputTextRenderer.encodeEnd(InputTextRenderer.java:52) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) org.primefaces.component.toolbar.ToolbarRenderer.encodeToolbarGroups(ToolbarRenderer.java:76) org.primefaces.component.toolbar.ToolbarRenderer.encodeEnd(ToolbarRenderer.java:44) 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.outputpanel.OutputPanelRenderer.encodeMarkup(OutputPanelRenderer.java:65) org.primefaces.component.outputpanel.OutputPanelRenderer.encodeEnd(OutputPanelRenderer.java:41) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) javax.faces.render.Renderer.encodeChildren(Renderer.java:176) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456) 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) br.edu.ifba.as.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:26) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) root cause com.sun.faces.spi.InjectionProviderException com.sun.faces.vendor.WebContainerInjectionProvider.invokeAnnotatedMethod(WebContainerInjectionProvider.java:115) com.sun.faces.vendor.WebContainerInjectionProvider.invokePostConstruct(WebContainerInjectionProvider.java:95) com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:221) com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:103) 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:80) org.apache.el.parser.AstValue.getValue(AstValue.java:137) org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) 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:94) org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:58) org.primefaces.component.inputtext.InputTextRenderer.encodeMarkup(InputTextRenderer.java:71) org.primefaces.component.inputtext.InputTextRenderer.encodeEnd(InputTextRenderer.java:52) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) org.primefaces.component.toolbar.ToolbarRenderer.encodeToolbarGroups(ToolbarRenderer.java:76) org.primefaces.component.toolbar.ToolbarRenderer.encodeEnd(ToolbarRenderer.java:44) 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.outputpanel.OutputPanelRenderer.encodeMarkup(OutputPanelRenderer.java:65) org.primefaces.component.outputpanel.OutputPanelRenderer.encodeEnd(OutputPanelRenderer.java:41) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) javax.faces.render.Renderer.encodeChildren(Renderer.java:176) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456) 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) br.edu.ifba.as.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:26) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) root cause java.lang.reflect.InvocationTargetException sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) com.sun.faces.vendor.WebContainerInjectionProvider.invokeAnnotatedMethod(WebContainerInjectionProvider.java:113) com.sun.faces.vendor.WebContainerInjectionProvider.invokePostConstruct(WebContainerInjectionProvider.java:95) com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:221) com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:103) 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:80) org.apache.el.parser.AstValue.getValue(AstValue.java:137) org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) 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:94) org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:58) org.primefaces.component.inputtext.InputTextRenderer.encodeMarkup(InputTextRenderer.java:71) org.primefaces.component.inputtext.InputTextRenderer.encodeEnd(InputTextRenderer.java:52) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) org.primefaces.component.toolbar.ToolbarRenderer.encodeToolbarGroups(ToolbarRenderer.java:76) org.primefaces.component.toolbar.ToolbarRenderer.encodeEnd(ToolbarRenderer.java:44) 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.outputpanel.OutputPanelRenderer.encodeMarkup(OutputPanelRenderer.java:65) org.primefaces.component.outputpanel.OutputPanelRenderer.encodeEnd(OutputPanelRenderer.java:41) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) javax.faces.render.Renderer.encodeChildren(Renderer.java:176) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456) 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) br.edu.ifba.as.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:26) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) root cause java.lang.NullPointerException java.util.HashSet.<init>(HashSet.java:118) br.ifba.edu.as.bean.TelaAlunosBean.listarFichas(TelaAlunosBean.java:91) br.ifba.edu.as.bean.TelaAlunosBean.init(TelaAlunosBean.java:43) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) com.sun.faces.vendor.WebContainerInjectionProvider.invokeAnnotatedMethod(WebContainerInjectionProvider.java:113) com.sun.faces.vendor.WebContainerInjectionProvider.invokePostConstruct(WebContainerInjectionProvider.java:95) com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:221) com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:103) 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:80) org.apache.el.parser.AstValue.getValue(AstValue.java:137) org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) 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:94) org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:58) org.primefaces.component.inputtext.InputTextRenderer.encodeMarkup(InputTextRenderer.java:71) org.primefaces.component.inputtext.InputTextRenderer.encodeEnd(InputTextRenderer.java:52) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) org.primefaces.component.toolbar.ToolbarRenderer.encodeToolbarGroups(ToolbarRenderer.java:76) org.primefaces.component.toolbar.ToolbarRenderer.encodeEnd(ToolbarRenderer.java:44) 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.outputpanel.OutputPanelRenderer.encodeMarkup(OutputPanelRenderer.java:65) org.primefaces.component.outputpanel.OutputPanelRenderer.encodeEnd(OutputPanelRenderer.java:41) javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) javax.faces.render.Renderer.encodeChildren(Renderer.java:176) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456) 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) br.edu.ifba.as.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:26) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
  6. editorpa

    Java EE - oq muda? (Iniciante confuso)

    Bom dia! Sou técnico em informática. Estudei java em 2014 java SE creio eu e um pouco de EE que foi com JSP e TomCat Queria que alguém tirasse minha duvidas pois java para web é bem extenso: O que é maven? O que é servlet, o que muda de jsf para jsp? O que é glassfish? Diferença do jdbc para jpa? O que é Spring? Diferença do boot para security? O que é JWT? O Jboss seria tipo o apache tomcat? O que é javabeans? E hibernate? E por ultimo o que é um webservice em Jax-rs?? Eu só conheco ws em xml No tecnico eu usava a IDE eclipse, agora já vi no fórum recomendações pelo Intellij IDEA ultimate?
  7. Guilherme Costa Lopes

    Erro Ao Subir Projeto

    O que estou errando, não consegui encontrar o erro.dispatcher-servlet.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:jee="http://www.springframework.org/schema/jee" xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd "> <!-- ONDE ESTÃO OS COMPONENTES DO SPRING (EX:@Controller, @Repository, @Service e @Component ) --> <context:component-scan base-package="br.com.netsoft" /> <!-- SEM ESSA TAG ELE NÃO RETORNA O JSON --> <mvc:annotation-driven /> <!-- SEM ESSA TAG NÃO CARREGA OS CSS/JS --> <mvc:default-servlet-handler /> <!-- GERENCIAMENTO DO JPA PELO SPRING --> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="persistenceUnitName" value="PERSISTENCE_UNIT" /> </bean> <!-- gerenciamento das transações --> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory" /> </bean> <tx:annotation-driven transaction-manager="transactionManager" /> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix"> <value>/WEB-INF/views/</value> </property> <property name="suffix"> <value>.html</value> </property> </bean> </beans>web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>DESIF</display-name> <servlet> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/dispatcher-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> </web-app>Log no console 01:19:05,602 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./desif.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./desif.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet from [Module "deployment.desif.war:main" from Service Module Loader] at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:1079) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:284) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet from [Module "deployment.desif.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:723) ... 6 more 01:19:05,608 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "desif.war")]) - failure description: { "WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./desif.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./desif.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet from [Module \"deployment.desif.war:main\" from Service Module Loader] Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet from [Module \"deployment.desif.war:main\" from Service Module Loader]"}, "WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host./desif.UndertowDeploymentInfoService"], "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined }Servidor é Wildfly.Arquivo pom <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>br.com.netsoft</groupId> <artifactId>desif</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>war</packaging> <build> <finalName>desif</finalName> </build> <properties> <failOnMissingWebXml>false</failOnMissingWebXml> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <failOnMissingWebXml>false</failOnMissingWebXml> <java-version>1.8</java-version> <spring.version>5.0.0.RELEASE</spring.version> <org.aspectj-version>1.8.1</org.aspectj-version> <org.slf4j-version>1.6.6</org.slf4j-version> <!-- false - não precisa de XML --> <failOnMissingWebXml>false</failOnMissingWebXml> <!-- Thymeleaf --> <thymeleaf.version>3.0.3.RELEASE</thymeleaf.version> <!-- Thymeleaf - Layout Dialect --> <thymeleaf-layout-dialect.version>2.1.2</thymeleaf-layout-dialect.version> </properties> <repositories> <repository> <id>spring-milestones</id> <name>Spring Milestones</name> <url>https://repo.spring.io/libs-milestone</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <dependencies> <!-- Métodos uteis para manipulação de String, métodos e etc --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.4</version> </dependency> <!-- Thymeleaf - Layout Dialect --> <dependency> <groupId>nz.net.ultraq.thymeleaf</groupId> <artifactId>thymeleaf-layout-dialect</artifactId> <version>${thymeleaf-layout-dialect.version}</version> </dependency> <!-- Thymeleaf - extras --> <dependency> <groupId>org.thymeleaf.extras</groupId> <artifactId>thymeleaf-extras-springsecurity4</artifactId> <version>3.0.1.RELEASE</version> </dependency> <!-- Thymeleaf --> <dependency> <groupId>org.thymeleaf</groupId> <artifactId>thymeleaf</artifactId> <version>${thymeleaf.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.thymeleaf</groupId> <artifactId>thymeleaf-spring4</artifactId> <version>${thymeleaf.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <!-- Spring início --> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-core</artifactId> <version>5.0.0.M4</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>2.0.0.M3</version> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>${spring.version}</version> </dependency> <!-- Spring fim --> <!-- <dependency> --> <!-- <groupId>javax</groupId> --> <!-- <artifactId>javaee-api</artifactId> --> <!-- <scope>provided</scope> --> <!-- </dependency> --> <!-- AspectJ --> <!-- <dependency> --> <!-- <groupId>org.aspectj</groupId> --> <!-- <artifactId>aspectjrt</artifactId> --> <!-- <version>${org.aspectj-version}</version> --> <!-- </dependency> --> <!-- Logging início --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${org.slf4j-version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>${org.slf4j-version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${org.slf4j-version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.15</version> <exclusions> <exclusion> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> </exclusion> <exclusion> <groupId>javax.jms</groupId> <artifactId>jms</artifactId> </exclusion> <exclusion> <groupId>com.sun.jdmk</groupId> <artifactId>jmxtools</artifactId> </exclusion> <exclusion> <groupId>com.sun.jmx</groupId> <artifactId>jmxri</artifactId> </exclusion> </exclusions> <scope>runtime</scope> </dependency> <!-- Logging fim --> <!-- @Inject --> <!-- <dependency> --> <!-- <groupId>javax.inject</groupId> --> <!-- <artifactId>javax.inject</artifactId> --> <!-- <version>1</version> --> <!-- </dependency> --> <!-- <dependency> --> <!-- <groupId>commons-dbcp</groupId> --> <!-- <artifactId>commons-dbcp</artifactId> --> <!-- <version>1.2.2</version> --> <!-- </dependency> --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>3.6.0.Final</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>4.1.0.Final</version> </dependency> <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> <version>1.0.0.GA</version> </dependency> <!-- Test --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.7</version> <scope>test</scope> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>7.0</version> <scope>provided</scope> </dependency> </dependencies> </dependencyManagement> </project>
  8. Guilherme Costa Lopes

    Campo Lista de um jsp

    Este campo é preenchido corretamente por uma consulta feita no DAO. O problema é que não está aceitando o objeto como nulo ou como o valor pelo ID. O campo da entidade é Estou com este erro do log do eclipse. O jsp está assim para este campo: Meu jsp O que pode ser ?
  9. Guilherme Costa Lopes

    Erro de mapeamento

    GRAVE: Servlet.service() for servlet [appServlet] in context with path [/extensao] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: Professor is not mapped [ SELECT p FROM Professor p]] with root cause org.hibernate.hql.ast.QuerySyntaxException: Professor is not mapped [ SELECT p FROM Professor p] Classe Professor package br.newtonpaiva.extensao.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "tb_professor") public class Professor { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long cod_professor; private Long nom_nome; public Long getCod_professor() { return cod_professor; } public void setCod_professor(Long cod_professor) { this.cod_professor = cod_professor; } public Long getNom_nome() { return nom_nome; } public void setNom_nome(Long nom_nome) { this.nom_nome = nom_nome; } } Classe controller package br.newtonpaiva.extensao.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import br.newtonpaiva.extensao.model.Professor; import br.newtonpaiva.extensao.model.ProfessorRepository; @Controller @RequestMapping("professores") public class ProfessorController { @Autowired ProfessorRepository repository; @RequestMapping(method = RequestMethod.GET) public String index(Model model) { List<Professor> listaProfessores = repository.listar(); model.addAttribute("listaProfessores", listaProfessores); return "professores"; } } Classe Repository package br.newtonpaiva.extensao.model; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.springframework.stereotype.Repository; @Repository public class ProfessorRepository { @PersistenceContext private EntityManager manager; /** * Lista todos os professores */ @SuppressWarnings("unchecked") public List<Professor> listar() { return manager.createQuery("SELECT p FROM Professor p").getResultList(); } /** * Lista todos os professores por nome */ @SuppressWarnings("unchecked") public List<Professor> listarNome(String professor) { return manager.createQuery("SELECT p FROM Professor p WHERE p.nom_nome LIKE '%" + professor + "%' ") .getResultList(); } }
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.