Topic DataCleaner plugin error: org.apache.commons.vfs2.FileObject.isFile()Z

diogoff started the topic:
2017-06-29 10:00

DataCleaner plugin error: org.apache.commons.vfs2.FileObject.isFile()Z

I have DataCleaner 5.1.5, PDI 7.1, and the DataCleaner plugin correctly installed and configured.

Outside PDI, I can start the DataCleaner standalone app without any problem. Inside PDI, I can also start DataCleaner throught the menu option Tools > Start DataCleaner.

However, if I have a PDI transformation (just a Data Grid, for example), and I use the right-click menu to select Profile with DataCleaner > Build your own profiling job, I get a message box with this error:

org.apache.commons.vfs2.FileObject.isFile()Z

Unexpected error!

Message:
java.lang.NoSuchMethodError: org.apache.commons.vfs2.FileObject.isFile()Z
Level:
SEVERE
Stack Trace:
org.apache.commons.vfs2.FileObject.isFile()Z
org.pentaho.di.core.plugins.PluginFolder$1.includeFile(PluginFolder.java:138)
org.apache.commons.vfs2.provider.AbstractFileObject.traverse(AbstractFileObject.java:1737)
org.apache.commons.vfs2.provider.AbstractFileObject.traverse(AbstractFileObject.java:1729)
org.apache.commons.vfs2.provider.AbstractFileObject.traverse(AbstractFileObject.java:1729)
org.apache.commons.vfs2.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1695)
org.apache.commons.vfs2.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1198)
org.pentaho.di.core.plugins.PluginFolder.findJarFiles(PluginFolder.java:126)
org.pentaho.di.core.plugins.PluginFolder.findJarFiles(PluginFolder.java:117)
org.pentaho.di.core.plugins.JarFileCache.getFileObjects(JarFileCache.java:67)
org.pentaho.di.core.plugins.BasePluginType.findAnnotatedClassFiles(BasePluginType.java:253)
org.pentaho.di.core.plugins.BasePluginType.registerPluginJars(BasePluginType.java:556)
org.pentaho.di.core.plugins.BasePluginType.searchPlugins(BasePluginType.java:120)
org.pentaho.di.profiling.datacleaner.KettleDataContext.readMetadataSection(KettleDataContext.java:101)
org.pentaho.di.profiling.datacleaner.KettleDataContext.readMetadata(KettleDataContext.java:200)
org.pentaho.di.profiling.datacleaner.KettleDataContext.getTransformationName(KettleDataContext.java:184)
org.pentaho.di.profiling.datacleaner.KettleDataContext.getMainSchemaName(KettleDataContext.java:161)
org.apache.metamodel.QueryPostprocessDataContext.getSchemaNamesInternal(QueryPostprocessDataContext.java:460)
org.apache.metamodel.AbstractDataContext.getSchemaNames(AbstractDataContext.java:110)
org.apache.metamodel.AbstractDataContext.getColumnByQualifiedLabel(AbstractDataContext.java:258)
org.datacleaner.connection.SchemaNavigator.convertToColumn(SchemaNavigator.java:145)
org.datacleaner.configuration.SourceColumnMapping.autoMap(SourceColumnMapping.java:81)
org.datacleaner.job.JaxbJobReader.create(JaxbJobReader.java:440)
org.datacleaner.job.JaxbJobReader.create(JaxbJobReader.java:409)
org.datacleaner.job.JaxbJobReader.create(JaxbJobReader.java:329)
org.datacleaner.job.JaxbJobReader.create(JaxbJobReader.java:308)
org.datacleaner.actions.OpenAnalysisJobActionListener.openAnalysisJob(OpenAnalysisJobActionListener.java:188)
org.datacleaner.actions.OpenAnalysisJobActionListener.open(OpenAnalysisJobActionListener.java:115)
org.datacleaner.bootstrap.Bootstrap.runInternal(Bootstrap.java:206)
org.datacleaner.bootstrap.Bootstrap.run(Bootstrap.java:102)
org.datacleaner.Main.main(Main.java:60)
org.datacleaner.Main.main(Main.java:46)

This problem happens both in Windows and Linux with the same product versions (DataCleaner 5.1.5 + PDI 7.1 + DataCleaner plugin).

Apparently, it could be a mismatch between commons-vsf2-*.jar:
- PDI uses commons-vsf2-2.1-20150824.jar
- DataCleaner and plugin use commons-vsf2-2.0.jar

If I replace commons-vsf2-2.0.jar by commons-vsf2-2.1-20150824.jar in both DataCleaner and plugin, then the plugin starts working, but the DataCleaner standalone app does not work anymore. Trying to run it from the command line gives an exception:

Failed to initialize logging, class not found: org/apache/commons/vsf2/FileSystemException

I need to have both the DataCleaner standalone app and the PDI plugin working.

Please help!
diogoff replied:
2017-06-29 10:45
I'm not using Mac, but I'm using both Windows and Ubuntu.

If I replace the libraries, I cannot start DataCleaner from the command line anymore.
diogoff replied:
2017-06-29 10:53
Curiously, if I replace
commons-vsf2-2.0.jar
by
commons-vsf2-2.1-20150824.jar

and then rename(!)
commons-vsf2-2.1-20150824.jar
to
commons-vsf2-2.0.jar

it works(!)

It seems any name other than
commons-vsf2-2.0.jar
won't do. What's going on here?
diogoff replied:
2017-06-29 11:02
Apparently, DataCleaner only finds the vsf2 jar if it's called "commons-vsf2-2.0.jar"

If the jar is called "commons-vsf2-2.1-20150824.jar", DataCleaner won't even find/load it.
Claudia replied:
2017-06-29 11:03
I will look into it.
You are not signed in.
You need to be signed in to participate in the discussion.