-
Contagem de Conteúdo
3 -
Ingressou
-
Última visita
Informações Pessoais
-
Cidade
natal
-
Estado
Rio Grande do Norte (RN)
Clientes & Parceiros
-
Você é um cliente TecnoSpeed?
Não
-
Você é um parceiro da Casa do Desenvolvedor?
Não
Conquistas de Jotahemmy Silva
1
Reputação na Comunidade
-
Olá pessoal, algum de vocês usam o heroku com o angular; não estou conseguindo fazer um deploy, mesmo numa aplicação nova sem alterações ...; Error: Could not find the '@angular-devkit/build-angular:dev-server' builder's node package." logs: 2024-10-23T16:58:48.105311+00:00 app[web.1]: npm notice New minor version of npm available! 10.8.2 -> 10.9.0 2024-10-23T16:58:48.105311+00:00 app[web.1]: npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0 2024-10-23T16:58:48.105312+00:00 app[web.1]: npm notice To update run: npm install -g npm@10.9.0 2024-10-23T16:58:48.105315+00:00 app[web.1]: npm notice 2024-10-23T16:58:48.156126+00:00 heroku[web.1]: Process exited with status 1 2024-10-23T16:58:48.179085+00:00 heroku[web.1]: State changed from starting to crashed 2024-10-23T17:18:12.000000+00:00 app[api]: Build started by user jotahemmysilva@gmail.com 2024-10-23T17:20:06.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f25e9365-b9bb-45b6-affc-60aca88f70b0/activity/builds/fea828f3-78c9-45b4-8a35-b1cb2ffb6c84 2024-10-23T17:21:34.196451+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=financeirosinmedrn-f4b7a9bd6ee0.herokuapp.com request_id=0bd7db93-979c-40c2-bea4-1f7fab4daa78 fwd="191.6.253.120" dyno= connect= service= status=503 bytes= protocol=https 2024-10-23T17:21:34.504809+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=financeirosinmedrn-f4b7a9bd6ee0.herokuapp.com request_id=cc5843a7-5a7a-438d-91c0-271813f2e267 fwd="191.6.253.120" dyno= connect= service= status=503 bytes= protocol=https 2024-10-23T17:36:35.461029+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=financeirosinmedrn-f4b7a9bd6ee0.herokuapp.com request_id=748aa946-a873-43fb-a096-673456880063 fwd="191.6.253.120" dyno= connect= service= status=503 bytes= protocol=https 2024-10-23T17:36:35.706433+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=financeirosinmedrn-f4b7a9bd6ee0.herokuapp.com request_id=97831c41-9402-4a3e-a394-14898c9c78dc fwd="191.6.253.120" dyno= connect= service= status=503 bytes= protocol=https 2024-10-23T17:42:01.375853+00:00 heroku[web.1]: State changed from crashed to starting 2024-10-23T17:42:06.778952+00:00 heroku[web.1]: Starting process with command `npm start` 2024-10-23T17:42:07.576597+00:00 app[web.1]: 2024-10-23T17:42:07.576638+00:00 app[web.1]: > financeirosinmedrn@1.0.1 start 2024-10-23T17:42:07.576639+00:00 app[web.1]: > ng serve 2024-10-23T17:42:07.576639+00:00 app[web.1]: 2024-10-23T17:42:07.792955+00:00 app[web.1]: Error: Could not find the '@angular-devkit/build-angular:dev-server' builder's node package. 2024-10-23T17:42:07.802976+00:00 app[web.1]: npm notice 2024-10-23T17:42:07.802979+00:00 app[web.1]: npm notice New minor version of npm available! 10.8.2 -> 10.9.0 2024-10-23T17:42:07.802983+00:00 app[web.1]: npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0 2024-10-23T17:42:07.802983+00:00 app[web.1]: npm notice To update run: npm install -g npm@10.9.0 2024-10-23T17:42:07.802983+00:00 app[web.1]: npm notice 2024-10-23T17:42:07.864787+00:00 heroku[web.1]: Process exited with status 1 2024-10-23T17:42:07.889987+00:00 heroku[web.1]: State changed from starting to crashed
-
Olá nosso amigo, foram feitas as alterações, porém continua com erro: ERROR: public.spesp01() is a procedure Dica: To call a procedure, use CALL. NO Repository ---------------- @Procedure("public.spesp01") void spesp01(); No Service ---------------- public void executaProcedure(){ especialidadeRepository.spesp01(); } No Controller ---------------- @PostMapping("/exeProcedure") public void exeProcedure(){ especialidadeService.executaProcedure(); } erro ---------------- ... 2022-05-09 02:25:42.396 INFO 10492 --- [ restartedMain] c.c.s.SyscoopmedrnapiApplication : Started SyscoopmedrnapiApplication in 5.252 seconds (JVM running for 5.67) 2022-05-09 02:25:47.966 INFO 10492 --- [nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2022-05-09 02:25:47.966 INFO 10492 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2022-05-09 02:25:47.967 INFO 10492 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms Hibernate: {call public.spesp01()} 2022-05-09 02:25:48.043 WARN 10492 --- [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 42809 2022-05-09 02:25:48.046 ERROR 10492 --- [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: public.spesp01() is a procedure Dica: To call a procedure, use CALL. Posição: 15 2022-05-09 02:25:48.062 ERROR 10492 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: Error calling CallableStatement.getMoreResults; SQL [public.spesp01]; nested exception is org.hibernate.exception.SQLGrammarException: Error calling CallableStatement.getMoreResults] with root cause org.postgresql.util.PSQLException: ERROR: public.spesp01() is a procedure Dica: To call a procedure, use CALL. Posição: 15 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2552) ~[postgresql-42.2.23.jar:42.2.23] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2284) ~[postgresql-42.2.23.jar:42.2.23] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:322) ~[postgresql-42.2.23.jar:42.2.23] at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481) ~[postgresql-42.2.23.jar:42.2.23] at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401) ~[postgresql-42.2.23.jar:42.2.23] at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164) ~[postgresql-42.2.23.jar:42.2.23] at org.postgresql.jdbc.PgCallableStatement.executeWithFlags(PgCallableStatement.java:83) ~[postgresql-42.2.23.jar:42.2.23] at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:153) ~[postgresql-42.2.23.jar:42.2.23] at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-4.0.3.jar:na] at com.zaxxer.hikari.pool.HikariProxyCallableStatement.execute(HikariProxyCallableStatement.java) ~[HikariCP-4.0.3.jar:na] at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:56) ~[hibernate-core-5.4.32.Final.jar:5.4.32.Final] at org.hibernat ...
-
MODEL ----------------------------------------- package com.procedures.pjProcedure.model; import lombok.Getter; import lombok.Setter; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Getter @Setter @Entity @Table(name="tb_especialidades") public class Especialidade { @Id @Column(name="esp_codigo") private Long codigo; @Column(name="esp_descricao") private String descricao; @Column(name="esp_nome_reduzido") private String nomeReduzido; } REPOSITORY--------------------------------------------- package com.procedures.pjProcedure.repository; import com.procedures.pjProcedure.model.Especialidade; import org.springframework.data.jpa.repository.JpaRepository; public interface EspecialidadeRepository extends JpaRepository<Especialidade, Long> { } SERVICE-------------------------------------- package com.procedures.pjProcedure.service; import com.procedures.pjProcedure.repository.EspecialidadeRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.object.StoredProcedure; import org.springframework.stereotype.Service; import javax.persistence.Entity; import javax.persistence.EntityManager; import javax.persistence.StoredProcedureQuery; @Service public class EspecialidadeService { @Autowired private EspecialidadeRepository er; public void executaProcedure(EntityManager em){ StoredProcedureQuery spq = em.createStoredProcedureQuery("spesp01"); spq.execute(); } } RESOURCE--------------------------------------------- package com.procedures.pjProcedure.resource; import com.procedures.pjProcedure.model.Especialidade; import com.procedures.pjProcedure.repository.EspecialidadeRepository; import com.procedures.pjProcedure.service.EspecialidadeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import java.util.List; @RestController @RequestMapping("/especialidades") public class EspecialidadeResource { @Autowired private EspecialidadeRepository er; @Autowired private EspecialidadeService es; @GetMapping("/listar") public List<Especialidade> Listar(){ return er.findAll(); } @PostMapping("/exeProcedure") public void exeProcedure(){ EntityManagerFactory emf = Persistence .createEntityManagerFactory("spesp01"); EntityManager em = emf.createEntityManager(); es.executaProcedure(em); } } MINHA TABELA NO POSTGRESQL--------------------------- create sequence esp_id_seq START WITH 1; create table tb_especialidades ( esp_codigo bigint not null default nextval('esp_id_seq'), esp_descricao varchar(100), esp_nome_reduzido varchar(15), primary key (esp_codigo) ); MINHA STORED PROCEDURE SPESP01()---------------------- CREATE OR REPLACE PROCEDURE public.spesp01() LANGUAGE 'plpgsql' AS $BODY$ BEGIN update tb_especialidades set ESP_NOME_REDUZIDO='tst03' WHERE ESP_CODIGO=3; COMMIT; END; $BODY$; -------------------------------------------------------- DEPURACAO.txt