Ir para conteúdo
Fórum Script Brasil

Netsoft

Membros
  • Total de itens

    15
  • Registro em

  • Última visita

Sobre Netsoft

Netsoft's Achievements

0

Reputação

  1. Instalei o **Portainer** para gerenciamento de sistemas no google cloud. Entendo que liberei a porta 9000 MAs não acessa: O que pode estar faltando ?
  2. Estou usando o AgmCoreModule, para marcar endereços no google maps. No module, no import imports: [ AgmCoreModule.forRoot({ apiKey: 'xxxxxxxxxxx' }), ] no export exports: [ AgmCoreModule ] No ts texto = 'teste'; lat = -19.91506; lng = -44.00752; zoom = 15; No html <agm-map [latitude]="lat" [zoom]="zoom" [longitude]="lng"> <agm-marker [latitude]="lat" [longitude]="lng"></agm-marker> </agm-map> A principio ele mostra Mas depois dá este erro Ou este erro No servidor está dando este erro. O Chave key está liberada main.cb562ea7df40e3f09b5f.bundle.js:2 Refused to load the script 'https://maps.googleapis.com/maps/api/js?v=quarterly&callback=agmLazyMapsAPILoader&key=AIzaSyCD54jiJhEBda5MtJkgFJB-hfR6dv5V9jw&language=pt' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback. main.cb562ea7df40e3f09b5f.bundle.js:2 ERROR Error: Uncaught (in promise): Event: {"isTrusted":true} at x (main.cb562ea7df40e3f09b5f.bundle.js:2) at x (main.cb562ea7df40e3f09b5f.bundle.js:2) at main.cb562ea7df40e3f09b5f.bundle.js:2 at e.invokeTask (main.cb562ea7df40e3f09b5f.bundle.js:2) at Object.onInvokeTask (main.cb562ea7df40e3f09b5f.bundle.js:2) at e.invokeTask (main.cb562ea7df40e3f09b5f.bundle.js:2) at t.runTask (main.cb562ea7df40e3f09b5f.bundle.js:2) at y (main.cb562ea7df40e3f09b5f.bundle.js:2) at t.invokeTask [as invoke] (main.cb562ea7df40e3f09b5f.bundle.js:2) at u (main.cb562ea7df40e3f09b5f.bundle.js:2) O que pode ser ?
  3. component download(idArquivo: number): void { this.arquivosService.downloadArquivoOrcamento(idArquivo).subscribe( data => { const blob = new Blob([data.arquivo], { type: 'text/json; charset=utf-8' }); const url= window.URL.createObjectURL(blob); window.open(url); }, err => { console.error(err); } ) } Service import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { SERVER_API_URL } from 'app/app.constants'; import { Observable } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class ArquivosService { constructor( private http: HttpClient ) {} downloadArquivoOrcamento(id: number, tipo: string): Observable<any> { return this.http.get(SERVER_API_URL + '/api/orcamento-anexo/' + id, { responseType: 'blob', headers: new HttpHeaders().append('Content-Type', tipo) }); } } Retorno do backend Não retorna o arquivo conforme imagem anterior Dowload com erro Já pesquisei e fiz alguma alteração, mas não achei a solução. O que quero é simples. O arquivo vem do backend em bytesm nome e content-type. Só quero fazer o dowload. O que pode ser ?
  4. 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>
  5. Ao tentar iniciar uma página do sistema mostra este erro. Vou colocar os códigos: DAO package br.com.netsoft.desif.dao.endereco; import java.io.Serializable; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.Query; import br.com.netsoft.desif.model.endereco.PaisEntity; public class PaisDao implements Serializable { private static final long serialVersionUID = 1402488530698938353L; final private String hql = " p FROM PaisEntity p "; EntityManager em; public List<PaisEntity> listarPaises() { StringBuilder hqlSelect = new StringBuilder(hql); final String query = "SELECT " + hqlSelect; Query querySelect = em.createQuery(query); @SuppressWarnings("unchecked") List<PaisEntity> resultList = querySelect.getResultList(); return resultList; } } ENTITY package br.com.netsoft.desif.model.endereco; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; public class PaisEntity implements Serializable { private static final long serialVersionUID = 7784827196506672790L; private Long id; private String descricao; @Id @Column(name = "pai_id") @SequenceGenerator(name = "enderecos.end_pais_pai_id_seq", sequenceName = "enderecos.end_pais_pai_id_seq", allocationSize = 1) @GeneratedValue(generator = "enderecos.end_pais_pai_id_seq", strategy = GenerationType.SEQUENCE) public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(name = "pai_descricao") public String getDescricao() { return descricao; } public void setDescricao(String descricao) { this.descricao = descricao; } } CONTROLLER package br.com.netsoft.desif.controler.endereco; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.annotation.PostConstruct; import javax.enterprise.context.RequestScoped; import javax.faces.bean.ManagedBean; import br.com.netsoft.desif.dao.endereco.PaisDao; import br.com.netsoft.desif.model.endereco.PaisEntity; @ManagedBean(name = "paisControler") @RequestScoped public class PaisControler extends PaisEntity { private static final long serialVersionUID = -8396738159447021720L; private List<PaisEntity> paises; private PaisDao paisDao; public List<PaisEntity> getPaises() { if (paises == null) { return new ArrayList<PaisEntity>(); } return paises; } public void setPaises(List<PaisEntity> paises) { this.paises = paises; } @PostConstruct public void init() { System.out.println("Página inicial de países."); @SuppressWarnings("unused") List<PaisEntity> paisesBusca = paisDao.listarPaises(); ArrayList<PaisEntity> paises = (ArrayList<PaisEntity>) paisDao.listarPaises(); for (Iterator<?> iterator = paises.iterator(); iterator.hasNext();) { PaisEntity pais = (PaisEntity) iterator.next(); pais.setId(pais.getId()); pais.setDescricao(pais.getDescricao()); paises.add(pais); } this.setPaises(paises); } public String getMensagem() { return "Teste"; } } VISÃO <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"> <h:head> <title>Hello JSF!</title> </h:head> <h:body> #{paisControler.mensagem} <h:dataTable var="pais" value="#{paisControler.paises}"> <h:column headerText="Id"> <h:outputText value="#{pais.id}" /> </h:column> <h:column headerText="Year"> <h:outputText value="#{pais.descricao}" /> </h:column> </h:dataTable> </h:body> </html> Erro: mar 21, 2017 8:08:40 AM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException GRAVE: Error Rendering View[/public/index.xhtml] javax.el.ELException: /public/index.xhtml: Um erro ocorreu ao realizar a injeção de recurso no bean gerenciado paisControler at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:90) at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82) at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1441) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: com.sun.faces.mgbean.ManagedBeanCreationException: Um erro ocorreu ao realizar a injeção de recurso no bean gerenciado paisControler at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:227) at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:103) at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409) at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269) at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244) at com.sun.faces.el.ManagedBeanELResolv
  6. O que é este erro ? javax.servlet.ServletException: WELD-000049: Unable to invoke public void br.com.netsoft.desif.controler.endereco.PaisController.init() on br.com.netsoft.desif.controler.endereco.PaisController@71a1064d javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  7. Netsoft

    Campo Lista

    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 é @ManyToOne @JoinColumn(name = "cos_id_id") public CosifEntity getCosif() { return cosif; } public void setCosif(CosifEntity cosif) { this.cosif = cosif; } Estou com este erro do log do eclipse. Field error in object 'cosifEntity' on field 'cosif': rejected value []; codes [typeMismatch.cosifEntity.cosif,typeMismatch.cosif,typeMismatch.br.com.netsoft.desif.model.desif.federal.CosifEntity,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [cosifEntity.cosif,cosif]; arguments []; default message [cosif]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'br.com.netsoft.desif.model.desif.federal.CosifEntity' for property 'cosif'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [br.com.netsoft.desif.model.desif.federal.CosifEntity] for property 'cosif': no matching editors or conversion strategy found] O jsp está assim para este campo: <select class="chosen-select form-control" id="cosif" name="cosif" data-placeholder="Selecione uma COSIF"> <option value=""></option> <c:forEach var="contaSuperior" items="${listaContaSuperior}"> <option value="${contaSuperior.id}"> ${contaSuperior.numeroNome}</option> </c:forEach> </select> O que pode ser ?
  8. Pessoal, preciso passar a informação de um componente que está na página jsp para um controler que está em java. Pelo que entendi a melhor maneira é via AJAX. Componente municipio <label for="municipio"><font style="color: red">*</font> Munic&iacute;pios</label> <select class="chosen-select form-control" id="municipio" name="municipio" data-placeholder="Selecione um munic&iacute;pio"> <option value="-1"></option> <c:forEach var="entidade" items="${listaEntidades}"> <option value="${entidade.id}">${entidade.municpio.codigoNome}</option> </c:forEach> </select> As informações estão mostrando corretamente na tela. Preciso desta informação do componente id="municipio" name="municipio", para fazer ações na classe Controller.
  9. Baixei o Spring MVC pelo Spring Tool Suite do link http://spring.io/tools/sts. Quando clico para executar o STS.exe, ele mostra o erro: http://prntscr.com/dvhkpx Clico em OK e não acontece nada. Falta alguma configuração ?
  10. Mas não gera nenhum log. O que posso ter configurado de errado ? log_destination = 'stderr' # Valid values are combinations of # stderr, csvlog, syslog, and eventlog, # depending on platform. csvlog # requires logging_collector to be on. # This is used when logging to stderr: logging_collector = on # Enable capturing of stderr and csvlog # into log files. Required to be on for # csvlogs. # (change requires restart) # These are only used if logging_collector is on: log_directory = 'pg_log' # directory where log files are written, # can be absolute or relative to PGDATA log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, # can include strftime() escapes #log_file_mode = 0600 # creation mode for log files, # begin with 0 to use octal notation log_truncate_on_rotation = on # If on, an existing log file with the # same name as the new log file will be # truncated rather than appended to. # But such truncation only occurs on # time-driven rotation, not on restarts # or size-driven rotation. Default is # off, meaning append to existing files # in all cases. log_rotation_age = 1d # Automatic rotation of logfiles will # happen after that time. 0 disables. log_rotation_size = 64MB # Automatic rotation of logfiles will # happen after that much log output. # 0 disables. # These are relevant when logging to syslog: #syslog_facility = 'LOCAL0' #syslog_ident = 'postgres' #silent_mode = off # Run server silently. # DO NOT USE without syslog or # logging_collector # (change requires restart) # - When to Log - client_min_messages = debug5 # values in order of decreasing detail: # debug5 # debug4 # debug3 # debug2 # debug1 # log # notice # warning # error log_min_messages = debug5 # values in order of decreasing detail: # debug5 # debug4 # debug3 # debug2 # debug1 # info # info # notice # warning # error # log # fatal # panic log_min_error_statement = debug5 # values in order of decreasing detail: # debug5 # debug4 # debug3 # debug2 # debug1 # info # notice # warning # error # log # fatal # panic (effectively off) log_min_duration_statement = 120000 # -1 is disabled, 0 logs all statements # and their durations, > 0 logs only # statements running at least this number # of milliseconds # - What to Log - #debug_print_parse = off #debug_print_rewritten = off #debug_print_plan = off #debug_pretty_print = on log_checkpoints = on #log_connections = off #log_disconnections = off log_duration = off log_error_verbosity = default # terse, default, or verbose messages log_hostname = on log_line_prefix = '%t [%p]: [%l] user=%u,db=%d,app=%a,host=%h' # special values: # %a = application name # %u = user name # %d = database name # %r = remote host and port # %h = remote host # %p = process ID # %t = timestamp without milliseconds # %m = timestamp with milliseconds # %i = command tag # %e = SQL state # %c = session ID # %l = session line number # %s = session start timestamp # %v = virtual transaction ID # %x = transaction ID (0 if none) # %q = stop here in non-session # processes # %% = '%' # e.g. '<%u%%%d> ' log_lock_waits = on # log lock waits >= deadlock_timeout log_statement = 'ddl' # none, ddl, mod, all
  11. Alguém tem ideia do que pode ser ? Em desenvolvimento funciona normal em produção e homologação com JAR não. Postgres 9.1 em produção e 9.0 em desenvolvimento. Exceção Gerada: org.postgresql.util. PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:381) at wfr.database.DBConnection.execStatement(DBConnection.java:1383) at wfr.com.systems.system_ami.rules.WebrunFunctions.ebfSQLExecuteUpdate(WebrunFunctions.java:12452) at wfr.com.systems.system_ami.rules.PatrimonioInsrerirAlterarDepois.run(PatrimonioInsrerirAlterarDepois.java:61) at wfr.rules.WFRRule.start(WFRRule.java:755) at wfr.rules.WFRRule.call(WFRRule.java:1817) at wfr.rules.WFRRule.call(WFRRule.java:57) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Tabela select * from pg_locks http://prntscr.com/8jgdif
  12. Netsoft

    ireport

    Esta com este erro: net.sf.jasperreports.engine.JRException: Unable to get value for field 'frete_bruto' of class 'java.lang.Double' O que pode ser ? <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> <!-- 2015-05-08T19:28:30 --> <jasperReport xmlns=" </image> <image> <reportElement x="1488" y="0" width="68" height="25" uuid="31e60c18-94fa-455d-8c21-5edddda6b658"/> <imageExpression><![CDATA["http://cpi.frontlog.com.br/webrun/images/image002.jpg"]]></imageExpression> </image> <staticText> <reportElement x="0" y="10" width="1560" height="30" uuid="eac6bded-9cf3-441b-af1d-dbc067b0bf72"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial Black" size="20"/> </textElement> <text><![CDATA[PLANILHA DE META E FATURAMENTO MENSAL]]></text> </staticText> <staticText> <reportElement x="-1" y="80" width="100" height="20" uuid="0c2757f9-d05b-435a-b182-d7d429b4515a"/> <textElement> <font fontName="Arial Black" size="11"/> </textElement> <text><![CDATA[COMPETÊNCIA:]]></text> </staticText> <staticText> <reportElement x="280" y="80" width="100" height="20" uuid="9506fbc3-6d75-49f0-851c-f485d8d74f25"/> <textElement> <font fontName="Arial Black" size="11"/> </textElement> <text><![CDATA[FUNCIONÁRIO(A):]]></text> </staticText> <staticText> <reportElement x="830" y="80" width="140" height="20" uuid="d0db3522-7891-41ef-a8fd-9aaffccc024e"/> <textElement> <font fontName="Arial Black" size="11"/> </textElement> <text><![CDATA[GESTOR COMERCIAL:]]></text> </staticText> <staticText> <reportElement x="1260" y="80" width="170" height="20" uuid="8f7a711a-a907-4c1e-9776-430a2b6e6c08"/> <textElement> <font fontName="Arial Black" size="11"/> </textElement> <text><![CDATA[VALOR TOTAL COMISSÃO:]]></text> </staticText> <staticText> <reportElement x="0" y="107" width="51" height="31" uuid="dbe80cb8-9166-41f0-b209-b0ff2ca0cd6a"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[DATA]]></text> </staticText> <staticText> <reportElement x="51" y="107" width="100" height="31" uuid="136ffda1-a42a-4e7e-b058-55d21356dd49"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[CLIENTE]]></text> </staticText> <staticText> <reportElement x="251" y="107" width="50" height="31" uuid="23927857-c8ef-4b82-9c9b-6fdb8ca03f6a"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[DESTINO UF]]></text> </staticText> <staticText> <reportElement x="201" y="107" width="50" height="31" uuid="b0458c11-6a86-466c-817a-7c04f9fbd4ee"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[ORIGEM UF]]></text> </staticText> <staticText> <reportElement x="151" y="107" width="50" height="31" uuid="e3ce52b8-ef82-450b-91cb-738183232198"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[VALOR DA CARGA]]></text> </staticText> <staticText> <reportElement x="390" y="107" width="49" height="31" uuid="bd3bd426-163e-41fe-846b-62e698b62689"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[FRETE BRUTO ]]></text> </staticText> <staticText> <reportElement x="301" y="107" width="50" height="31" uuid="ec3a54b7-20c7-437e-9893-2483a2be37fe"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[sEGURO PAGO]]></text> </staticText> <staticText> <reportElement x="351" y="107" width="39" height="31" uuid="01bea640-4b20-43dc-a502-07b7cc6c90e4"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[CT-e]]></text> </staticText> <staticText> <reportElement x="439" y="107" width="51" height="31" uuid="1cb47452-2fd1-44b7-9883-4918793fc80a"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[Frete acumulado para Meta]]></text> </staticText> <staticText> <reportElement x="693" y="107" width="51" height="31" uuid="b7b121ef-85c2-4699-962c-2780b37e9ae4"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[DESPESAS EXTRAS]]></text> </staticText> <staticText> <reportElement x="1410" y="107" width="30" height="31" uuid="472081c3-26fc-4c5a-8ed2-646799220507"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[JUROS ]]></text> </staticText> <staticText> <reportElement x="744" y="107" width="81" height="31" uuid="e2acdb49-eb57-4ae4-abf2-13cc580ef696"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[sUBTOTAL FRETE PARA CALCULO DE COMISSÃO]]></text> </staticText> <staticText> <reportElement x="825" y="107" width="61" height="31" uuid="effdeb25-a752-4e0b-b8ef-63d3e5435c51"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[FRETE COTADO CARRETEIRO]]></text> </staticText> <staticText> <reportElement x="947" y="107" width="51" height="31" uuid="76cf5d3c-684a-4bc2-9dd7-cea13b4d924a"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[FRETE LIQUIDO]]></text> </staticText> <staticText> <reportElement x="998" y="107" width="51" height="31" uuid="91cb8a60-e7fe-4d5a-894d-b92f9cc483f3"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[ALIQUOTA ICMS]]></text> </staticText> <staticText> <reportElement x="1250" y="107" width="60" height="31" uuid="ad0ab3f5-8d18-4039-b4e2-72a1d193f071"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[VENCIMENTO FATURA]]></text> </staticText> <staticText> <reportElement x="1141" y="107" width="49" height="31" uuid="5ee24f58-cadc-41b8-990c-b57804c5dff2"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[VALOR COMISSÃO]]></text> </staticText> <staticText> <reportElement x="1440" y="107" width="49" height="31" uuid="b2a45752-ad5f-4a78-a405-7060e7781145"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[JUROS RECEBIDO?]]></text> </staticText> <staticText> <reportElement x="1190" y="107" width="60" height="31" uuid="da477add-cc1e-4055-9dec-b2c6defbf07a"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[PRAZO PAGAMENTO ]]></text> </staticText> <staticText> <reportElement x="1489" y="107" width="60" height="31" uuid="8f301915-4405-46b1-aea8-44eab3ef4904"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[VALOR REAL DA COMISSÃO ]]></text> </staticText> <staticText> <reportElement x="1049" y="107" width="71" height="31" uuid="1d267856-e75a-4d27-9409-d69dd59f3e7c"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[RENTABILIDADE MEMORIA DE CALCULO ]]></text> </staticText> <staticText> <reportElement x="1310" y="107" width="60" height="31" uuid="686661dc-d231-4a6b-8998-eff7cef0da33"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[DATA DO RECEBIMENTO]]></text> </staticText> <staticText> <reportElement x="886" y="107" width="61" height="31" uuid="aa047404-8b91-412a-8779-bbc9e8b37621"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[FRETE PAGO CARRETEIRO]]></text> </staticText> <staticText> <reportElement x="1370" y="107" width="40" height="31" uuid="c61ed825-1775-4abb-b05f-c4b0a1a11ce8"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[DIAS DE ATRASO]]></text> </staticText> <staticText> <reportElement x="490" y="107" width="61" height="31" uuid="2d144d7d-0954-4919-8ef3-e807c2b49a65"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[CALCULO SUBSTITUIÇÃO TRIBUTARIA]]></text> </staticText> <staticText> <reportElement x="601" y="107" width="41" height="31" uuid="0f24521c-12f7-46fd-9ca4-a4490b10643e"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[VALOR ICMS]]></text> </staticText> <staticText> <reportElement x="642" y="107" width="51" height="31" uuid="f6b03415-8890-48d4-9541-81165bfc36cd"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[COMISSÃO CLIENTE]]></text> </staticText> <staticText> <reportElement x="551" y="107" width="50" height="31" uuid="2e4b833d-f88d-44f2-8f1a-1d5440739b59"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[iMPOSTOS]]></text> </staticText> <staticText> <reportElement x="1120" y="107" width="21" height="31" uuid="c64de1a2-ef4e-49aa-bd78-178359b876ea"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <text><![CDATA[%]]></text> </staticText> <textField> <reportElement x="107" y="80" width="100" height="20" uuid="aecb2eff-dc60-4526-8320-33f58e42eff5"/> <textFieldExpression><![CDATA[$F{cmp_pago}]]></textFieldExpression> </textField> <textField> <reportElement x="380" y="80" width="221" height="20" uuid="4a44422e-683c-4d71-9db5-563938fed5ea"/> <textFieldExpression><![CDATA[$F{comercial}]]></textFieldExpression> </textField> </band> </title> <detail> <band height="40" splitType="Stretch"> <textField pattern="#,##0.00#"> <reportElement x="601" y="0" width="41" height="40" uuid="fbac5155-f0f6-4937-bc42-5b7fc0d38b6f"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{icms}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="551" y="0" width="50" height="40" uuid="b30150b7-282a-4788-85f7-b6124b466f90"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{imposto}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="0" y="0" width="51" height="40" uuid="19012e66-5184-4793-9698-e01c43662204"> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="local_mesure_unitx" value="pixel"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> </reportElement> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{data}]]></textFieldExpression> </textField> <textField> <reportElement x="351" y="0" width="39" height="40" uuid="f040f669-a0c5-48c4-9a3a-c632c69d285b"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{cte}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="642" y="0" width="51" height="40" uuid="4bbd6304-5218-4a50-8154-ce9540d4db36"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{c_cliente}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="693" y="0" width="51" height="40" uuid="f6b57278-d0c0-4d2c-88d1-490feab11fc0"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{despesa_extra}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="390" y="0" width="49" height="40" uuid="8c402fe3-4d73-48b8-a928-808efe3d17f7"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{frete_bruto}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="744" y="0" width="81" height="40" uuid="bd76f6bc-d992-4139-9977-5d28133e6236"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{sub_total}]]></textFieldExpression> </textField> <textField> <reportElement x="886" y="0" width="61" height="40" uuid="e93eb667-0a5f-400c-865c-4b40d873736e"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{frete_pago}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="1410" y="0" width="30" height="40" uuid="5e0c0a03-d07a-4e4f-9535-76b408ff48cc"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{juros}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="1440" y="0" width="49" height="40" uuid="662d13be-aad9-4d3d-8cd2-52e1894d9c90"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{recebeu}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="1489" y="0" width="60" height="40" uuid="061abe2b-fef2-457d-8073-966ea9b8539d"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{real_comissao}]]></textFieldExpression> </textField> <textField> <reportElement x="1370" y="0" width="40" height="40" uuid="1cd327d4-5d9e-4b8f-a09b-64763bf858c0"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{dias_atraso}]]></textFieldExpression> </textField> <textField pattern="dd/MM/yyyy"> <reportElement x="1310" y="0" width="60" height="40" uuid="3db41713-2bfc-4119-b64e-8c76c6301216"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{recebimento}]]></textFieldExpression> </textField> <textField pattern="" isBlankWhenNull="true"> <reportElement x="1250" y="0" width="60" height="40" uuid="54aba0fb-8426-4973-8a0f-747b5b4c370f"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{vencimento}]]></textFieldExpression> </textField> <textField> <reportElement x="1190" y="0" width="60" height="40" uuid="82082019-74d0-4399-8491-9717b6abe74c"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{prazo}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="1141" y="0" width="49" height="40" uuid="479bfa71-3e15-43e0-8422-6124d92b7cd0"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{v_comissao}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="1120" y="0" width="21" height="40" uuid="bb34fa57-ef9f-498c-a6f2-bc12d48c6c6b"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{p_comissao}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="1049" y="0" width="71" height="40" uuid="c6b6df33-c054-4a3c-bc92-2470beeb9479"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{rentabilidade}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="947" y="0" width="51" height="40" uuid="badd4a14-7903-4efc-adba-8c65b884978a"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{frete_liquido}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="151" y="0" width="50" height="40" uuid="99dfe6d7-66ae-47c9-97a3-1fe5c695dd48"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{valor_carga}]]></textFieldExpression> </textField> <textField> <reportElement x="251" y="0" width="50" height="40" uuid="83f12470-ae89-4327-a336-159b08248578"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{est_des}]]></textFieldExpression> </textField> <textField> <reportElement x="201" y="0" width="50" height="40" uuid="db219b58-efbb-4f29-8074-b081fd51fd83"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{est_origem}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="301" y="0" width="50" height="40" uuid="db180637-7076-4ecd-be15-f988f305ed27"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{seguro}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="439" y="0" width="51" height="40" uuid="84930196-1dba-4285-aa8e-e3fcd8a8e1e5"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{acumulado}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="490" y="0" width="61" height="40" uuid="d2650d00-7cfd-440c-8512-8ea58b8ac839"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{st}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="825" y="0" width="61" height="40" uuid="c0adc1ae-416a-437b-a137-5f88d5fba6b6"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{frete_cotado}]]></textFieldExpression> </textField> <textField pattern="#,##0.00#"> <reportElement x="998" y="0" width="51" height="40" uuid="8d553dc2-76a4-4fd9-9b3f-4c648ee0d10e"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[$F{icms}]]></textFieldExpression> </textField> <textField> <reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="51" y="0" width="100" height="40" forecolor="#000000" backcolor="#FFFFFF" uuid="90579666-3279-4b3f-a013-a6ad8c835253"/> <box padding="0" topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0"> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="html"> <font fontName="Arial" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/> <paragraph lineSpacing="Double" lineSpacingSize="1.0" firstLineIndent="0" leftIndent="0" rightIndent="0" spacingBefore="0" spacingAfter="0" tabStopWidth="40"/> </textElement> <textFieldExpression><![CDATA[$F{cliente}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="15" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="20" splitType="Stretch"> <textField> <reportElement x="1358" y="0" width="100" height="20" uuid="482cd871-b7f5-4a48-a9b9-0f08a2560d82"/> <textElement textAlignment="Right"/> <textFieldExpression><![CDATA["Página " + $V{PAGE_NUMBER}]]></textFieldExpression> </textField> <textField evaluationTime="Report"> <reportElement x="1458" y="0" width="100" height="20" uuid="2ac20bdb-b12a-42af-b4c9-26261310d0e7"/> <textElement textAlignment="Left"/> <textFieldExpression><![CDATA[" de " + $V{PAGE_NUMBER}]]></textFieldExpression> </textField> </band> </pageFooter> <summary> <band height="46" splitType="Stretch"/> </summary> </jasperReport>
  13. Estou tentando instalar no window 7, mas não instala, dando falha, conforme imagem, o que pode ser ?
  14. Netsoft

    Banco de horas MYSQL

    O sql é este Select b.pd_id, a.fu_funcionario, c.pd_ponto_dado, c.pt_abonar, a.po_mes, a.po_ano, Cast(Sec_To_Time(Time_To_Sec(e.qh_saida - e.qh_fiminterv + e.qh_iniciointerv - e.qh_entrada)) As time) As horasTinhTrabalhar, Cast(if(Sec_To_Time(Time_To_Sec(b.pd_saida - b.pd_intervalo_fim + b.pd_intervalo_inicio - b.pd_entrada)) is null, 0 , Sec_To_Time(Time_To_Sec(b.pd_saida - b.pd_intervalo_fim + b.pd_intervalo_inicio - b.pd_entrada))) As time) As totalHoraTrabalhou, Cast(if(Cast(Sec_To_Time(Time_To_Sec(e.qh_saida - e.qh_fiminterv + e.qh_iniciointerv - e.qh_entrada) - Time_To_Sec(if(b.pd_saida is null,0,b.pd_saida) - if(b.pd_intervalo_fim is null,0,b.pd_intervalo_fim) + if(b.pd_intervalo_inicio is null,0,b.pd_intervalo_inicio) - if(b.pd_entrada is null,0,b.pd_entrada))) As time) > Cast(Sec_To_Time(Time_To_Sec(e.qh_saida - e.qh_fiminterv + e.qh_iniciointerv - e.qh_entrada)) As time) || Cast(Sec_To_Time(Time_To_Sec(e.qh_saida - e.qh_fiminterv + e.qh_iniciointerv - e.qh_entrada) - Time_To_Sec(if(b.pd_saida is null,0,b.pd_saida) - if(b.pd_intervalo_fim is null,0,b.pd_intervalo_fim) + if(b.pd_intervalo_inicio is null,0,b.pd_intervalo_inicio) - if(b.pd_entrada is null,0,b.pd_entrada))) As time) is null,Cast(Sec_To_Time(Time_To_Sec(e.qh_saida - e.qh_fiminterv + e.qh_iniciointerv - e.qh_entrada)) As time),Cast(Sec_To_Time(Time_To_Sec(e.qh_saida - e.qh_fiminterv + e.qh_iniciointerv - e.qh_entrada) - Time_To_Sec(if(b.pd_saida is null,0,b.pd_saida) - if(b.pd_intervalo_fim is null,0,b.pd_intervalo_fim) + if(b.pd_intervalo_inicio is null,0,b.pd_intervalo_inicio) - if(b.pd_entrada is null,0,b.pd_entrada))) As time)) As time) As diferenca, b.pd_dia, Day(b.pd_dia) As dia, if(b.pd_saida is null,0,b.pd_saida), if(b.pd_intervalo_fim is null,0,b.pd_intervalo_fim), if(b.pd_intervalo_inicio is null,0,b.pd_intervalo_inicio), if(b.pd_entrada is null,0,b.pd_entrada) From rch_net_ponto a Inner Join rch_net_ponto_dados b On b.po_ponto = a.po_id Left Join rch_net_ponto_ponto_dados c On (c.pd_ponto_dado = b.pd_id) And (c.po_ponto = b.po_ponto) Inner Join rch_net_funcionarios d On d.fu_id = a.fu_funcionario Inner Join rch_net_quadro_horario e On e.hr_horario = d.hr_horario GROUP By b.pd_dia
  15. Em uma consulta retorna uma hora com o seguinte contexto: Cast(Sec_To_Time(Time_To_Sec(e.qh_saida - e.qh_fiminterv + e.qh_iniciointerv - e.qh_entrada) - Time_To_Sec(if(b.pd_saida is null,0,b.pd_saida) - if(b.pd_intervalo_fim is null,0,b.pd_intervalo_fim) + if(b.pd_intervalo_inicio is null,0,b.pd_intervalo_inicio) - if(b.pd_entrada is null,0,b.pd_entrada))) As time) As diferenca Exemplos: qh_saida = 08:00 qh_fiminterv = 12:00 qh_iniciointerv = 13:00 e.qh_entrada = 18:00 O que pode esta errado ? Guilherme
×
×
  • Criar Novo...