2

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
Gabriel Archanjo
  • 4,547
  • 2
  • 34
  • 41
sschrass
  • 7,014
  • 6
  • 43
  • 62

1 Answers1

2

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.

sschrass
  • 7,014
  • 6
  • 43
  • 62
  • 1
    better than putting them in the JVM which can change its better to put it in a newtral path like /var/YourProjectname/v1/lib and point to that in sh or .bat file as a environment or system variable – tgkprog May 29 '14 at 19:03