1. WAS 버전 : WAS v7.0 이상
2. OS : All
3. Error 발생 시점 : Web service 를 사용하는 중 최초 call 에 의한 로딩 시간(JAXB Initialization)이 오래 걸리는 경우
4. Error message :
Web Service Trace 를 걸었을 경우 : *=info:com.ibm.ws.webservices.*=all:org.apache.*=all:com.ibm.ws.websvcs.*=all:com.ibm.ws.metadata.*=all
하단과 같은 IllegalAnnotationExceptions 확인 가능
[9/2/14 18:46:43:635 KST] 000000d3 JAXBContextFr 1 org.apache.axis2.jaxws.message.databinding.JAXBContextFromClasses findBestSet The reason is com.ibm.jtc.jax.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
Class has two properties of the same name "xxx_pyn_typ"
this problem is related to the following location:
at public com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_XXXPYNTYP[] com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNIF.getXxx_pyn_typ()
at com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNIF
at public com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNIF[] com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNRLTDIF.getXxx_if()
at com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNRLTDIF
at public com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNRLTDIF com.dinle.lti.nwct.enpl.plancndregt.bs.vo.LAAAXXXBSVO.getXxx_rltd_if()
at com.dinle.lti.nwct.enpl.plancndregt.bs.vo.LAAAXXXBSVO
this problem is related to the following location:
at public com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNPYNTYP[] com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNIF.pnn_pyn_typ
at com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNIF
at public com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNIF[] com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNRLTDIF.getPnn_if()
at com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNRLTDIF
at public com.dinle.lti.nwct.enpl.plancndregt.bf.vo.LAAAXXXBFVO_PNNRLTDIF com.dinle.lti.nwct.enpl.plancndregt.bs.vo.LAAAXXXBSVO.getXxx_rltd_if()
at com.dinle.lti.nwct.enpl.plancndregt.bs.vo.LAAAXXXBSVO
5. 예상 이유 : JAXB 는 Java Architecture for XML Binding 으로서 XML 을 Java 로, Java 를 XML 로 바인딩하기 위한 표준으로 JAX-WS 에서 XML 을 처리하기 위한 표준입니다. 다만 이를 위해서 JAXBContext 를 내부적으로 생성하는데 public 으로 되어 있는 멤버 필드나 get/set 메소드를 기준으로 JAXBContext 를 생성합니다. 이때 멤버 필드와 get/set 메소드가 중복될 경우에 IllegalAnnotationExceptions 이 발생됩니다.
6. 조치 방안 : 멤버 필드와 get/set 메소드를 둘다 public 으로 선언하지 않거나(하나를 private 으로 선언) @XmlAccessorType 과 같은 annotation 을 사용하여 사전에 어느 것을 참조할지 지정
7. 참고 자료
JAXBContext Initialization Takes A Long Time
http://www-01.ibm.com/support/docview.wss?uid=swg21641260
IBM - old/WAS 문제&해결
댓글