Jump to content
We've recently updated our Privacy Statement, available here ×

Error, Cast String to Object coming from JAXB


montano

Recommended Posts

Hi,

i am having a problem to sinchronyze my JASPER with my jaxb.

Take a look below

Part of JRXML

<field name="XNome" class="br.inf.portalfiscal.nfe.TNFe.InfNFe.Emit"/>
<variable name="Identificacao" class="java.lang.String" resetType="None">
    <variableExpression><![CDATA[$F{XNome}.getXNome()]]></variableExpression>
</variable>
<textFieldExpression class="java.lang.String"><![CDATA[$V{Identificacao}]]></textFieldExpression>

Part of class

List<Emit> tnfes = new ArrayList<Emit>();               
tnfes.add(this.unmarshallerTnfe(srcXml).getInfNFe().getEmit());

this.unmarshallerTnfe(srcXml) = This method return a JAXBElement<TNFe> maked unmarshaller from my XML

Error

Cannot cast object 'DISTRIBUIDORA XXX LTDA. (BA)' with class 'java.lang.String' to class 'br.inf.portalfiscal.nfe.TNFe$InfNFe$Emit'


Thanks a lot

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...