0
우리는 보고서 이름과 매개 변수를 수신하고 JRPdfExporter를 호출하는 WebService를 가지고 있습니다.JasperReports 폰트 파일을 웹 애플리케이션에 동적으로 삽입
런타임에 사용자가 보고서를 추가 할 수 있으므로 Jasper jar 글꼴 파일을 클래스 경로에 동적으로 추가하여 사용자가 추가 한 새 글꼴을 Jasper classpath에 추가 할 수있는 방법이 필요합니다.
우리가 시도하고 클래스 패스로하지만 성공을 새로운 단지를 주입하는이 코드를 사용하는
URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();
Class sysclass = URLClassLoader.class;
try {
Method method = sysclass.getDeclaredMethod("addURL", new Class[]{URL.class});
method.setAccessible(true);
method.invoke(sysloader, new Object[] {u});
} catch (Throwable t) {
t.printStackTrace();
throw new IOException("Error, could not add URL to system classloader");
}
내가지고있어 오류가 어떻게 할 수있는에
net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Input stream not found at : fonts/fontsfamily1415192514231.xml
어떤 아이디어입니다 이 작업을 수행?
또는 더 나은 대안이 있습니까?