특정 개체에서 머리글 이름과 필요한 속성을 지정하여 동적 눈금을 만드는 데 참조로이 설명서 예제를 사용하고 있습니다. http://jxls.sourceforge.net/samples/dynamic_grid.htmlJXLS 동적 격자 throw null null NestedNullException
하지만 내 경우에는 Employee
개체가 중첩 된 속성 "adres.housenumber"
public class Employee {
private String name;
private Date birthDate;
private BigDecimal payment;
private BigDecimal bonus;
private Adres adres;
// constructors and getters/setters
.....
}
public class Adres {
private String housenumber;
}
모든 직원이하는 housenumber
와 직원이 ADRES이있는 경우, 나는 예외 아래에있어 adres
이있는 경우 그것은 잘 작동 : org.apache.commons.beanutils.NestedNullException :
에 의한 빈 클래스 '수준의 직원'
에 'adres.housenumber'에 대한 널 (null) 속성 값 org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty (PropertyUtilsBean.java:795)에서~ [몬즈 beanutils-1.9.3.jar : 1.9.3]
org.apache.commons.beanutils.PropertyUtilsBean에서 .getProperty (PropertyUtilsBean.java:884) ~ [commons-beanutils-1.9.3.jar : 1.9.3]
at org.apache.commons.beanutils.PropertyUtils.getProperty (PropertyUtils.java:464) ~ [commons- beanutils-1.9.3.jar : 1.9.3]
org.jxls.command.GridCommand.processBody (GridCommand.java:185) ~ [jxls-2.3.0.jar :?]
at org.jxls. command.GridCommand.applyAt (GridCommand.java:137) ~ [jxls-2.3.0.jar :?]
at org.jxls.area.XlsArea.applyAt (XlsArea.java:168) ~ [jxls -2.3.0.jar :?] org.jxls.util.JxlsHelper.processGridTemplate (JxlsHelper.java:156) ~ [jxls-2.3.0.jar :?]에서
는
직원이 데이터는 데이터베이스에서 검색하여 Excel로 내보내기 전에 전달하기 전에 수정할 수있는 액세스 권한이 없습니다.
어떤 아이디어/도움주세요?