itextpdf:loadlicensefile问题
我刚刚开始使用ItextPDF 7.2.2,我在尝试加载试用许可证时看到了一个问题。这是代码快照:
@Autowired
private ResourceLoader resourceLoader;
public void loadItextLicense() {
try {
String licenseFileName = "classpath:licenses/ae2b7b01aa4d3b744f5873d3e3b66182bce5fd6bc0cd4993b0504aabab7882ef.json";
Resource resource = resourceLoader.getResource(licenseFileName);
File lFile = resource.getFile();
log.info("File exists? " + lFile.exists());
LicenseKey.loadLicenseFile(lFile);
}
catch (Exception e) {
log.error("ItextService error: ", e);
}
}
这是异常堆栈跟踪: java.lang.nosuchfielderror:_ObjectFieldValuesEparatorWithSpaces 在com.itextpdf.licensing.base.util.jsonutil $ customprettyprinter。(jsonutil.java:135) 在com.itextpdf.licensing.base.util.jsonutil.serializetostostring(jsonutil.java:44) 在com.itextpdf.licensing.base.util.signingutil.geteppedsignature(signingutil.java:67) 在com.itextpdf.licensing.base.util.signingutil.CheckSignature(signingutil.java:52) 在com.itextpdf.licensing.base.actions.loadlicenseevent.ValidateTelicenceFile(loadlicenseevent.java:118) 在com.itextpdf.licensing.base.actions.loadlicenseevent.getProperlicensefile(loadlicenseevent.java:100) 在com.itextpdf.licensing.base.actions.actions.loadlicenseevent。(loadlicenseevent.java:42) 在com.itextpdf.licensing.base.licensekey.loadlicensefile(Clicekey.java:151) 在com.itextpdf.licensing.base.licensekey.loadlistoflicenses(Clicekey.java:202) 在com.itextpdf.licensing.base.licensekey.loadlicensefile(Clicekey.java:129) 在com.itextpdf.licensing.base.licensekey.loadlicensefile(CliceKey.key.java:88) 在com.cchs.microservice.contract.service.impl.itextservice.loaditextlicense(itextService.java:26)
任何帮助都将不胜感激!
I'm on just started to play with itextpdf 7.2.2, and I see an issue while trying to load my trial license. Here is the code snapshot:
@Autowired
private ResourceLoader resourceLoader;
public void loadItextLicense() {
try {
String licenseFileName = "classpath:licenses/ae2b7b01aa4d3b744f5873d3e3b66182bce5fd6bc0cd4993b0504aabab7882ef.json";
Resource resource = resourceLoader.getResource(licenseFileName);
File lFile = resource.getFile();
log.info("File exists? " + lFile.exists());
LicenseKey.loadLicenseFile(lFile);
}
catch (Exception e) {
log.error("ItextService error: ", e);
}
}
Here is the exception stack trace:
java.lang.NoSuchFieldError: _objectFieldValueSeparatorWithSpaces
at com.itextpdf.licensing.base.util.JsonUtil$CustomPrettyPrinter.(JsonUtil.java:135)
at com.itextpdf.licensing.base.util.JsonUtil.serializeToString(JsonUtil.java:44)
at com.itextpdf.licensing.base.util.SigningUtil.getExpectedSignature(SigningUtil.java:67)
at com.itextpdf.licensing.base.util.SigningUtil.checkSignature(SigningUtil.java:52)
at com.itextpdf.licensing.base.actions.LoadLicenseEvent.validateLicenceFile(LoadLicenseEvent.java:118)
at com.itextpdf.licensing.base.actions.LoadLicenseEvent.getProperLicenseFile(LoadLicenseEvent.java:100)
at com.itextpdf.licensing.base.actions.LoadLicenseEvent.(LoadLicenseEvent.java:42)
at com.itextpdf.licensing.base.LicenseKey.loadLicenseFile(LicenseKey.java:151)
at com.itextpdf.licensing.base.LicenseKey.loadListOfLicenses(LicenseKey.java:202)
at com.itextpdf.licensing.base.LicenseKey.loadLicenseFile(LicenseKey.java:129)
at com.itextpdf.licensing.base.LicenseKey.loadLicenseFile(LicenseKey.java:88)
at com.cchs.microservice.contract.service.impl.ItextService.loadItextLicense(ItextService.java:26)
Any help would be greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论