不能ColdFusion的初始化org.apache.poi.xslf.usermodel.XMLSlideShow [英] Not able to initialize org.apache.poi.xslf.usermodel.XMLSlideShow in coldfusion

查看:932
本文介绍了不能ColdFusion的初始化org.apache.poi.xslf.usermodel.XMLSlideShow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<cfscript>
filepath = ExpandPath("./1.ppt");
fis = CreateObject( "java", "java.io.FileInputStream" ).init(filepath);
//initialize slideshow object with input stream
src = createObject("java","org.apache.poi.xslf.usermodel.XMLSlideShow").init(fis);
fis.close();
</cfscript>

我不能够在ColdFusion中初始化org.apache.poi.xslf.usermodel.XMLSlideShow对象。
获得以下错误:
无法找到类的构造函数org.apache.poi.xslf.usermodel.XMLSlideShow接受类型的参数(java.io.FileInputStream中)

I am not able to initialize org.apache.poi.xslf.usermodel.XMLSlideShow object in coldfusion. Getting following error: Unable to find a constructor for class org.apache.poi.xslf.usermodel.XMLSlideShow that accepts parameters of type ( java.io.FileInputStream )

请帮忙

推荐答案

我知道你说你正在使用POI 3.8,但错误信息说你正在使用的旧版本。

I know you said you are using POI 3.8, but the error message says you are using an older version.

由于安东尼所说,ColdFusion的9捆绑的旧版本(POI 3.5),这是什么的CreateObject()使用。有没有 XMLSlideShow(InputStream的)构造回3.5版本。因此错误消息。

As Antony mentioned, ColdFusion 9 is bundled with an older version (POI 3.5) which is what createObject() uses. There was no XMLSlideShow(InputStream) constructor back in version 3.5. Hence the error message.

有两(2)的方式来装载的POI的新版本

There are two (2) ways to load a newer version of POI:


  1. 使用 JavaLoader 并行运行

替换现有的POI在罐子{} cf_root \\ lib中。然后,重新启动服务器CF。的注:我没有做过这种个人,所以我不知道,如果这样做会破坏​​其他功能

Replace the existing POI jars in {cf_root}\lib. Then restart the CF server. Note: I have not done this personally, so I do not know if doing so will break other features

这篇关于不能ColdFusion的初始化org.apache.poi.xslf.usermodel.XMLSlideShow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆