我有一个抽象类地址,以及两个从类地址继承的类。
A 类和 B 类。
所以我在谷歌中找到了@xmlSeeAlso
我使用的注释,但我不知道它是否正确......
因为 stackTrace 打印了这个错误
com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 11 counts of IllegalAnnotationExceptions
Class has two properties of the same name "bairro"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getBairro()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.bairro
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
Class has two properties of the same name "cep"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getCep()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.cep
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
Class has two properties of the same name "codigoMunicipio"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getCodigoMunicipio()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.codigoMunicipio
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
Class has two properties of the same name "codigoPais"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getCodigoPais()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.codigoPais
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
Class has two properties of the same name "complemento"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getComplemento()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.complemento
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
Class has two properties of the same name "logradouro"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getLogradouro()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.logradouro
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
Class has two properties of the same name "municipio"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getMunicipio()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.municipio
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
Class has two properties of the same name "numero"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getNumero()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.numero
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
Class has two properties of the same name "pais"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getPais()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.pais
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
Class has two properties of the same name "telefone"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getTelefone()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.telefone
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
Class has two properties of the same name "UF"
this problem is related to the following location:
at public java.lang.String nfeProc.NFe.infNFe.Endereco.getUF()
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
this problem is related to the following location:
at private java.lang.String nfeProc.NFe.infNFe.Endereco.UF
at nfeProc.NFe.infNFe.Endereco
at private nfeProc.NFe.infNFe.Endereco nfeProc.NFe.infNFe.emit.Emitente.endereco
at nfeProc.NFe.infNFe.emit.Emitente
at private nfeProc.NFe.infNFe.emit.Emitente nfeProc.NFe.infNFe.InfNFe.emitente
at nfeProc.NFe.infNFe.InfNFe
at private nfeProc.NFe.infNFe.InfNFe nfeProc.NFe.NFe.infNFe
at nfeProc.NFe.NFe
at private nfeProc.NFe.NFe nfeProc.NFeProc.nfe
at nfeProc.NFeProc
at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(Unknown Source)
at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
at javax.xml.bind.ContextFinder.find(Unknown Source)
at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
at nfeProc.Teste.main(Teste.java:15)
那么怎么了?