Adding MarvinFramework to a WebApp on Tomcat7

情到浓时终转凉″ 提交于 2019-12-30 11:14:13

问题


I have a Jersey WebApp running on Tomcat and want to integrate the MarvinFramework for ImageProcessing. Basically I want to reduce noise, grayscale and scale an Image for further processing.

The Marvin Framework relies on custom Plugins for their specific prupose, and those Plugins I want to use. But since the Framwork has its own ClassLoader, that loads the plugins JAR dynamically at runtime from an absolute location inside the project, I am confused where to put the files or how to configure the WebApp, that the ClassLoader is able load the JARs. I recreated the directory-structure for standalone Apps inside my WEB-INF/lib-dir with the Deployment Assembly but I had no success.

I am getting a:

java.io.FileNotFoundException: .\marvin\plugins\image\org.marvinproject.image.color.grayScale.jar

when I try:

marvinImagePlugin = MarvinPluginLoader.loadImagePlugin("org.marvinproject.image.color.grayScale.jar");

the jar-file should be located by the deploment assebmly in:

WEB-INF/lib/marvin/plugins/image

回答1:


You can set the library path with MarvinDefinitions.setImagePluginPath(path); to a path of your choice. In this case you have to manually put the files to the JVM and they are not deployed automatically.



来源:https://stackoverflow.com/questions/12602953/adding-marvinframework-to-a-webapp-on-tomcat7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!