我正在使用 vfs2(不是 vfs)来访问 ftp。现在我也使用 smb 协议,但它不起作用。我总是得到例外:
ClassNotFoundException: org.apache.commons.vfs.provider.FileProvider
但是当我使用 vfs2 时,它搜索具有 commons.vfs.provider 而不是 commons.vfs2.provider 的类很奇怪 - 因为在 vfs2 中存在该类。
我想念图书馆(罐子)吗?
我现在有:,commons-vfs2-2.0.jar
(必须commons-vfs2-sandbox-2.0.jar
添加才能找到 smb 协议),,,,,可能还有更多..jcifs-1.3.17.jar
commons-net-3.3.jar
commons-collections-3.2.1.jar
commons-logging-1.1.1.jar
这是我完整的 StackTrace:
org.apache.commons.vfs2.FileSystemException: Could not create a file system manager of class "org.apache.commons.vfs2.impl.StandardFileSystemManager".
at org.apache.commons.vfs2.VFS.createManager(VFS.java:99)
at org.apache.commons.vfs2.VFS.getManager(VFS.java:50)
at com.avintis.framework.service.DbAccessImpl.saveArchiveData(DbAccessImpl.java:1188)
at com.avintis.framework.service.DbAccessImpl.saveMessageData(DbAccessImpl.java:905)
at com.avintis.framework.service.DbAccessImpl.saveMessage(DbAccessImpl.java:417)
at com.avintis.framework.service.ImportTrackingMsgServiceImpl.importFile(ImportTrackingMsgServiceImpl.java:77)
at com.avintis.framework.service.ImportTrackingMsgServiceImpl.importFile(ImportTrackingMsgServiceImpl.java:30)
at com.avintis.framework.watcher.service.WatcherServiceImpl.addTrackingMessages(WatcherServiceImpl.java:87)
at com.avintis.framework.watcher.service.WatcherServiceImpl.watchForFiles(WatcherServiceImpl.java:34)
at com.avintis.framework.schedule.WatcherJob.executeInternal(WatcherJob.java:30)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/vfs/provider/FileProvider
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2854)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.commons.vfs2.impl.StandardFileSystemManager.createInstance(StandardFileSystemManager.java:485)
at org.apache.commons.vfs2.impl.StandardFileSystemManager.addProvider(StandardFileSystemManager.java:371)
at org.apache.commons.vfs2.impl.StandardFileSystemManager.configure(StandardFileSystemManager.java:270)
at org.apache.commons.vfs2.impl.StandardFileSystemManager.configure(StandardFileSystemManager.java:195)
at org.apache.commons.vfs2.impl.StandardFileSystemManager.configurePlugins(StandardFileSystemManager.java:154)
at org.apache.commons.vfs2.impl.StandardFileSystemManager.init(StandardFileSystemManager.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.commons.vfs2.VFS.createManager(VFS.java:88)
... 12 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.vfs.provider.FileProvider
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 30 more