You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2010/08/06 03:37:22 UTC
[jira] Assigned: (SMX4-571) servicemix-vfs NullPointerException
[ https://issues.apache.org/activemq/browse/SMX4-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Baptiste Onofré reassigned SMX4-571:
-----------------------------------------
Assignee: Jean-Baptiste Onofré
> servicemix-vfs NullPointerException
> -----------------------------------
>
> Key: SMX4-571
> URL: https://issues.apache.org/activemq/browse/SMX4-571
> Project: ServiceMix 4
> Issue Type: Bug
> Components: Bundles
> Affects Versions: 4.2.0
> Environment: apache-servicemix-4.2.0-fuse-02-00
> Win7 64
> java version "1.6.0_21"
> Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
> Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)
> Reporter: Andrey Viktorov
> Assignee: Jean-Baptiste Onofré
>
> servicemix-vfs fails with NullPointerException when sending.
> {noformat:title=servicemix.log|borderStyle=solid}
> 23:33:02,649 | ERROR | ix-vfs-thread-53 | VFSComponent | icemix.common.AsyncBaseLifeCycle 470 | Error processing exchange org.apache.servicemix.jbi.runtime.impl.InOnlyImpl@6687ec13
> java.lang.NullPointerException
> at org.apache.servicemix.vfs.VFSSendingEndpoint.processInOnly(VFSSendingEndpoint.java:114)
> at org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:102)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:617)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:571)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:468)
> at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> {noformat}
> To avoid this exception it would be better to check for null value tmpName variable
> {code:title=org.apache.servicemix.vfs.VFSSendingEndpoint.java|borderStyle=solid}
> if (name != null && tmpName != null && !name.equals(tmpName)) {
> if (!tmpFile.canRenameTo(newFile)) {
> throw new IOException("File " + tmpName + " could not be renamed to " + name);
> } else {
> tmpFile.moveTo(newFile);
> }
> }
> {code}
> As discussed here http://servicemix.396122.n5.nabble.com/Exception-when-using-vsf-poller-with-sftp-ServiceMix-4-2-td417225.html#a417225
> it would be nice to add root exception information along with IOException.
> {code:title=org.apache.servicemix.vfs.FileObjectResolver.java|borderStyle=solid}
> catch (FileSystemException e) {
> throw new IOException("Failed to create folder: " + e, e);
> }
> }
> catch (FileSystemException e) {
> throw new IOException("Failed to initialize file system manager: " + e, e);
> }
> {code}
> Otherwise it is hard to track exceptions like this:
> {noformat}
> java.io.IOException: Failed to initialize file system manager: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://sab:sab@192.168.1.158/".
> at org.apache.servicemix.vfs.FileObjectResolver.resolveToFileObject(FileObjectResolver.java:74)
> at org.apache.servicemix.vfs.VFSPollingEndpoint.poll(VFSPollingEndpoint.java:229)
> at org.apache.servicemix.common.endpoints.PollingEndpoint$PollSchedulerTask$1.run(PollingEndpoint.java:202)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://sab:sab@192.168.1.158/".
> at org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:99)
> at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:81)
> at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:62)
> at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:641)
> at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:602)
> at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:570)
> at org.apache.servicemix.vfs.FileObjectResolver.resolveToFileObject(FileObjectResolver.java:55)
> ... 5 more
> Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "192.168.1.158".
> at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:214)
> at org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:90)
> ... 11 more
> Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: 192.168.1.158. RSA key fingerprint is 59:8f:eb:89:ef:ce:b2:8f:4d:ed:79:90:d1:1e:52:b4
> at com.jcraft.jsch.Session.checkHost(Session.java:712)
> at com.jcraft.jsch.Session.connect(Session.java:309)
> at com.jcraft.jsch.Session.connect(Session.java:145)
> at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:210)
> {noformat}
> {noformat}
> java.io.IOException: Failed to initialize file system manager: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://sab:sab@192.168.1.159/".
> at org.apache.servicemix.vfs.FileObjectResolver.resolveToFileObject(FileObjectResolver.java:74)
> at org.apache.servicemix.vfs.VFSPollingEndpoint.poll(VFSPollingEndpoint.java:229)
> at org.apache.servicemix.common.endpoints.PollingEndpoint$PollSchedulerTask$1.run(PollingEndpoint.java:202)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://sab:sab@192.168.1.159/".
> at org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:99)
> at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:81)
> at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:62)
> at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:641)
> at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:602)
> at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:570)
> at org.apache.servicemix.vfs.FileObjectResolver.resolveToFileObject(FileObjectResolver.java:55)
> ... 5 more
> Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "192.168.1.159".
> at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:214)
> at org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:90)
> ... 11 more
> Caused by: com.jcraft.jsch.JSchException: java.net.ConnectException: Connection timed out: connect
> at com.jcraft.jsch.Util.createSocket(Util.java:258)
> at com.jcraft.jsch.Session.connect(Session.java:186)
> at com.jcraft.jsch.Session.connect(Session.java:145)
> at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:210)
> ... 12 more
> Caused by: java.net.ConnectException: Connection timed out: connect
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
> at java.net.Socket.connect(Socket.java:529)
> at java.net.Socket.connect(Socket.java:478)
> at java.net.Socket.<init>(Socket.java:375)
> at java.net.Socket.<init>(Socket.java:189)
> at com.jcraft.jsch.Util.createSocket(Util.java:252)
> ... 15 more
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.