欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

百度编辑器UEditor部署在weblogic自定义通过FTP上传组件报错

程序员文章站 2022-05-26 13:19:07
...

部署在tomcat下正常,但是部署在weblogic上上传时报错:

]] Root cause of ServletException.

java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.getTempDirectory()Ljava/io/File;

        at com.atsc.struts.picchelp.upload.StorageManager.getTmpFile(StorageManager.java:115)

        at com.atsc.struts.picchelp.upload.StorageManager.saveFtpFileByInputStream(StorageManager.java:166)

        at com.atsc.struts.picchelp.upload.FtpUploader.save(FtpUploader.java:83)

        at com.atsc.struts.picchelp.upload.Uploader.doExec(Uploader.java:31)

        at com.atsc.struts.picchelp.upload.ActionEnter.invoke(ActionEnter.java:82)

        Truncated. see log file for complete stacktrace

1,有可能是commons.io和commons.fileupload包冲突,删除多余的包

2,在你自己的项目下的weblogic.xml中加入以下代码

<container-descriptor>
     <prefer-application-packages>
     <package-name>org.apache.commons.io.*</package-name>
     </prefer-application-packages>
    </container-descriptor>

重新启动项目应该就可以了


转载于:https://my.oschina.net/u/934148/blog/543059