com.ats.jnfe.exception.NfeConfigurationException: erros: [Erro ao realizar a assinatura. Favor, verificar se o certificado está configurado corretamente nas configurações.] alertas: []

JDK Bug System | Webbug Group | 3 years ago
  1. 0

    [JDK-8038184] XMLSignature throws StringIndexOutOfBoundsException if ID attribute value is empty String - Java Bug System

    java.net | 1 year ago
    com.ats.jnfe.exception.NfeConfigurationException: erros: [Erro ao realizar a assinatura. Favor, verificar se o certificado está configurado corretamente nas configurações.] alertas: []
  2. 0

    FULL PRODUCT VERSION : java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot(TM) Client VM (build 25.0-b70, mixed mode) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows [Version 6.2.9200] A DESCRIPTION OF THE PROBLEM : I'm trying to sign the "InfRps" tag on the following XML file: <?xml version="1.0" encoding="UTF-8"?> <EnviarLoteRpsEnvio xmlns="http://www.abrasf.org.br/nfse.xsd"> <LoteRps Id="" versao="1.00"> <NumeroLote>100</NumeroLote> <Cnpj>01339695000101</Cnpj> <InscricaoMunicipal>01323820024</InscricaoMunicipal> <QuantidadeRps>1</QuantidadeRps> <ListaRps> <Rps> <InfRps Id="1"> <IdentificacaoRps> <Numero>500122</Numero> <Serie>900</Serie> <Tipo>1</Tipo> </IdentificacaoRps> <DataEmissao>2014-03-21T00:00:00.000-03:00</DataEmissao> <NaturezaOperacao>1</NaturezaOperacao> <OptanteSimplesNacional>2</OptanteSimplesNacional> <IncentivadorCultural>2</IncentivadorCultural> <Status>1</Status> <Servico> <Valores> <ValorServicos>98.01</ValorServicos> <ValorPis>0.00</ValorPis> <ValorCofins>0.00</ValorCofins> <ValorInss>0.00</ValorInss> <ValorIr>0.00</ValorIr> <IssRetido>2</IssRetido> <ValorIss>0.00</ValorIss> <Aliquota>0.00</Aliquota> </Valores> <ItemListaServico>1</ItemListaServico> <CodigoCnae>6201500</CodigoCnae> <Discriminacao>1 null - R$ 98,01</Discriminacao> <CodigoMunicipio>3106200</CodigoMunicipio> </Servico> <Prestador> <Cnpj>01339695000101</Cnpj> <InscricaoMunicipal>01323820024</InscricaoMunicipal> </Prestador> <Tomador> <IdentificacaoTomador> <CpfCnpj> <Cpf>01234567890</Cpf> </CpfCnpj> </IdentificacaoTomador> <RazaoSocial>CLIENTE AVULSO</RazaoSocial> <Endereco> <Endereco>RUA CATETE</Endereco> <Numero>999</Numero> <Complemento>601/701</Complemento> <Bairro>ALTO BARROCA</Bairro> <CodigoMunicipio>3106200</CodigoMunicipio> <Uf>MG</Uf> <Cep>30431016</Cep> </Endereco> </Tomador> </InfRps> </Rps> </ListaRps> </LoteRps> </EnviarLoteRpsEnvio> And I'm getting the following error message: 2014-03-21 09:27:17,747 ERROR [Tarefa NFe 34.034.264.168] ComandoAppletNFeQueueImpl.enviaComando(60) | Stack trace remoto referente a taskId 34034264168: com.ats.jnfe.exception.NfeConfigurationException: erros: [Erro ao realizar a assinatura. Favor, verificar se o certificado está configurado corretamente nas configurações.] alertas: [] at com.ats.jnfe.service.comunicacao.impl.MscapiSecurityHandlerBean.handle(MscapiSecurityHandlerBean.java:88) at com.ats.jnfe.applet.security.ConfigurableSecurityHandlerBean.handle(ConfigurableSecurityHandlerBean.java:42) at br.com.jnfe.base.service.DOMNFeSignatureHandler.sign(DOMNFeSignatureHandler.java:57) at com.ats.jnfe.applet.client.impl.ClientComandoAppletNFeServiceImpl.newSignature(ClientComandoAppletNFeServiceImpl.java:130) at com.ats.jnfe.applet.client.impl.ClientComandoAppletNFeHandlerImpl.trataComando(ClientComandoAppletNFeHandlerImpl.java:63) at com.ats.jnfe.applet.client.impl.ComandoAppletNFeExecutorImpl$1.run(ComandoAppletNFeExecutorImpl.java:64) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalArgumentException: Impossível construir assinatura, at br.com.jnfe.base.service.DOMNFeSignatureBuilder.build(DOMNFeSignatureBuilder.java:207) at br.com.jnfe.base.service.DOMNFeSignatureBuilder.build(DOMNFeSignatureBuilder.java:1) at br.com.jnfe.base.service.DOMNFeSignatureHandler$1.doInSecurityContext(DOMNFeSignatureHandler.java:59) at com.ats.jnfe.service.comunicacao.impl.MscapiSecurityHandlerBean.handle(MscapiSecurityHandlerBean.java:86) ... 6 more Caused by: javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.URIReferenceException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at org.jcp.xml.dsig.internal.dom.DOMReference.dereference(Unknown Source) at org.jcp.xml.dsig.internal.dom.DOMReference.digest(Unknown Source) at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(Unknown Source) at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(Unknown Source) at br.com.jnfe.base.service.DOMNFeSignatureBuilder.build(DOMNFeSignatureBuilder.java:195) ... 9 more Caused by: javax.xml.crypto.URIReferenceException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at org.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(Unknown Source) ... 14 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(Unknown Source) at com.sun.org.apache.xml.internal.security.utils.XMLUtils.protectAgainstWrappingAttack(Unknown Source) at com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverFragment.engineResolveURI(Unknown Source) at com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver.resolve(Unknown Source) at com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver.resolve(Unknown Source) ... 15 more I'm still not sure whether there's an error on the XML or not, but the error message definitely doesn't point me towards any useful direction. ERROR MESSAGES/STACK TRACES THAT OCCUR : 2014-03-21 09:27:17,747 ERROR [Tarefa NFe 34.034.264.168] ComandoAppletNFeQueueImpl.enviaComando(60) | Stack trace remoto referente a taskId 34034264168: com.ats.jnfe.exception.NfeConfigurationException: erros: [Erro ao realizar a assinatura. Favor, verificar se o certificado está configurado corretamente nas configurações.] alertas: [] at com.ats.jnfe.service.comunicacao.impl.MscapiSecurityHandlerBean.handle(MscapiSecurityHandlerBean.java:88) at com.ats.jnfe.applet.security.ConfigurableSecurityHandlerBean.handle(ConfigurableSecurityHandlerBean.java:42) at br.com.jnfe.base.service.DOMNFeSignatureHandler.sign(DOMNFeSignatureHandler.java:57) at com.ats.jnfe.applet.client.impl.ClientComandoAppletNFeServiceImpl.newSignature(ClientComandoAppletNFeServiceImpl.java:130) at com.ats.jnfe.applet.client.impl.ClientComandoAppletNFeHandlerImpl.trataComando(ClientComandoAppletNFeHandlerImpl.java:63) at com.ats.jnfe.applet.client.impl.ComandoAppletNFeExecutorImpl$1.run(ComandoAppletNFeExecutorImpl.java:64) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalArgumentException: Impossível construir assinatura, at br.com.jnfe.base.service.DOMNFeSignatureBuilder.build(DOMNFeSignatureBuilder.java:207) at br.com.jnfe.base.service.DOMNFeSignatureBuilder.build(DOMNFeSignatureBuilder.java:1) at br.com.jnfe.base.service.DOMNFeSignatureHandler$1.doInSecurityContext(DOMNFeSignatureHandler.java:59) at com.ats.jnfe.service.comunicacao.impl.MscapiSecurityHandlerBean.handle(MscapiSecurityHandlerBean.java:86) ... 6 more Caused by: javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.URIReferenceException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at org.jcp.xml.dsig.internal.dom.DOMReference.dereference(Unknown Source) at org.jcp.xml.dsig.internal.dom.DOMReference.digest(Unknown Source) at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(Unknown Source) at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(Unknown Source) at br.com.jnfe.base.service.DOMNFeSignatureBuilder.build(DOMNFeSignatureBuilder.java:195) ... 9 more Caused by: javax.xml.crypto.URIReferenceException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at org.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(Unknown Source) ... 14 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(Unknown Source) at com.sun.org.apache.xml.internal.security.utils.XMLUtils.protectAgainstWrappingAttack(Unknown Source) at com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverFragment.engineResolveURI(Unknown Source) at com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver.resolve(Unknown Source) at com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver.resolve(Unknown Source) ... 15 more REPRODUCIBILITY : This bug can be reproduced always.

    JDK Bug System | 3 years ago | Webbug Group
    com.ats.jnfe.exception.NfeConfigurationException: erros: [Erro ao realizar a assinatura. Favor, verificar se o certificado está configurado corretamente nas configurações.] alertas: []
  3. 0

    Sporadisk "Klarte ikke å signere ASiC-E element" ved høy last

    GitHub | 2 years ago | nlinksteinar
    no.difi.sdp.webclient.service.MessageService$MessageServiceException: no.difi.sdp.client.domain.exceptions.XmlKonfigurasjonException: Klarte ikke å signere ASiC-E element.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Oxalis-standalone error

    GitHub | 3 years ago | wickyhasan
    javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.URIReferenceException: com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverException: Cannot resolve elemen with ID SamlID1374829377059

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.StringIndexOutOfBoundsException

      String index out of range: 0

      at java.lang.String.charAt()
    2. Java RT
      DOMXMLSignature.sign
      1. java.lang.String.charAt(Unknown Source)
      2. com.sun.org.apache.xml.internal.security.utils.XMLUtils.protectAgainstWrappingAttack(Unknown Source)
      3. com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverFragment.engineResolveURI(Unknown Source)
      4. com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver.resolve(Unknown Source)
      5. com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver.resolve(Unknown Source)
      6. org.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(Unknown Source)
      7. org.jcp.xml.dsig.internal.dom.DOMReference.dereference(Unknown Source)
      8. org.jcp.xml.dsig.internal.dom.DOMReference.digest(Unknown Source)
      9. org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(Unknown Source)
      10. org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(Unknown Source)
      10 frames
    3. br.com.jnfe
      DOMNFeSignatureHandler$1.doInSecurityContext
      1. br.com.jnfe.base.service.DOMNFeSignatureBuilder.build(DOMNFeSignatureBuilder.java:195)
      2. br.com.jnfe.base.service.DOMNFeSignatureBuilder.build(DOMNFeSignatureBuilder.java:1)
      3. br.com.jnfe.base.service.DOMNFeSignatureHandler$1.doInSecurityContext(DOMNFeSignatureHandler.java:59)
      3 frames
    4. com.ats.jnfe
      ConfigurableSecurityHandlerBean.handle
      1. com.ats.jnfe.service.comunicacao.impl.MscapiSecurityHandlerBean.handle(MscapiSecurityHandlerBean.java:86)
      2. com.ats.jnfe.applet.security.ConfigurableSecurityHandlerBean.handle(ConfigurableSecurityHandlerBean.java:42)
      2 frames
    5. br.com.jnfe
      DOMNFeSignatureHandler.sign
      1. br.com.jnfe.base.service.DOMNFeSignatureHandler.sign(DOMNFeSignatureHandler.java:57)
      1 frame
    6. com.ats.jnfe
      ComandoAppletNFeExecutorImpl$1.run
      1. com.ats.jnfe.applet.client.impl.ClientComandoAppletNFeServiceImpl.newSignature(ClientComandoAppletNFeServiceImpl.java:130)
      2. com.ats.jnfe.applet.client.impl.ClientComandoAppletNFeHandlerImpl.trataComando(ClientComandoAppletNFeHandlerImpl.java:63)
      3. com.ats.jnfe.applet.client.impl.ComandoAppletNFeExecutorImpl$1.run(ComandoAppletNFeExecutorImpl.java:64)
      3 frames
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame