Missing dependencies for multipart fileupload via Spring (OSGI) in dotCMS 3.2
I'm trying to convert our OSGI plugin using Spring to dotCMS 3.2 (from 2.5.7). This plugin configures a Apache Commons FileUpload multipartResolver:
``xml <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" />``
The CommonsMultipartResolver tries to access the (original) classes from Apache Commons FileUpload, but those are not available since they are re-packaged to com.dotcms.repackage.
right so this is on purpose and not a bug. Either alter your imports or package the libraries you need. Starting with 3.0 all our libraries are repackaged
But I can't alter the import, since it is in dependency (Spring Web) which is provided by dotCMS. And since the Spring is loaded from the WEB-INF the classloader doesn't find the classes (commons-fileupload) even if I package them in my OSGI bundle. Or am I missing something?
You have to add those dependencies on your own. Maybe through a static plugin OR better yet bring in your own Spring libs to your OSGi plugin. See the example here https://github.com/dotCMS/core/tree/master-3.2/docs/examples/osgi/com.dotcms.custom.spring