mulesoft-consulting / mule4-smb-connector-v2

Other
1 stars 2 forks source link

Duplicate shared folder in List Operation - Windows File Server #1

Open ramondea opened 2 years ago

ramondea commented 2 years ago

Hi,

I received an Error Message when I try to use a list operation in SMB Connector. The target server is Windows. All tests on Linux are passed.

I updated the SMBJ for the last version: SMBJ: 0.11.5

Trace: com.hierynomus.mssmb2.SMBApiException: STATUS_OBJECT_PATH_NOT_FOUND (0xc000003a): Create failed for \\srv-carga\CargaDados\CargaDados\CRM at com.hierynomus.smbj.share.Share.receive(Share.java:380) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.Share.sendReceive(Share.java:359) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.Share.createFile(Share.java:156) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.DiskShare.createFileAndResolve(DiskShare.java:75) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.DiskShare.access$100(DiskShare.java:55) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.DiskShare$2.apply(DiskShare.java:109) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.DiskShare$2.apply(DiskShare.java:105) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.paths.PathResolver$1.resolve(PathResolver.java:32) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.paths.SymlinkPathResolver.resolve(SymlinkPathResolver.java:62) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.DiskShare.resolveAndCreateFile(DiskShare.java:105) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.DiskShare.open(DiskShare.java:65) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.DiskShare.openDirectory(DiskShare.java:151) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.DiskShare.list(DiskShare.java:258) ~[smbj-0.11.5.jar:?] at com.hierynomus.smbj.share.DiskShare.list(DiskShare.java:231) ~[smbj-0.11.5.jar:?] at com.mulesoft.connector.smb.internal.connection.client.SmbClient.list(SmbClient.java:191) ~[mule-smb-connector-1.0.9-SNAPSHOT-mule-plugin.jar:?] at com.mulesoft.connector.smb.internal.command.SmbListCommand.doList(SmbListCommand.java:87) ~[mule-smb-connector-1.0.9-SNAPSHOT-mule-plugin.jar:?] at com.mulesoft.connector.smb.internal.command.SmbListCommand.list(SmbListCommand.java:74) ~[mule-smb-connector-1.0.9-SNAPSHOT-mule-plugin.jar:?] at org.mule.extension.file.common.api.AbstractFileSystem.list(AbstractFileSystem.java:112) ~[mule-module-file-extension-common-1.3.6-mule-plugin.jar:?] at org.mule.extension.file.common.api.BaseFileSystemOperations$1.initializePagingProvider(BaseFileSystemOperations.java:149) ~[mule-module-file-extension-common-1.3.6-mule-plugin.jar:?] at org.mule.extension.file.common.api.BaseFileSystemOperations$1.getPage(BaseFileSystemOperations.java:133) ~[mule-module-file-extension-common-1.3.6-mule-plugin.jar:?] at org.mule.extension.file.common.api.BaseFileSystemOperations$1.getPage(BaseFileSystemOperations.java:124) ~[mule-module-file-extension-common-1.3.6-mule-plugin.jar:?] at org.mule.runtime.module.extension.internal.runtime.streaming.PagingProviderWrapper.getPage(PagingProviderWrapper.java:79) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.streaming.PagingProviderProducer.withConnection(PagingProviderProducer.java:157) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.streaming.PagingProviderProducer.withConnection(PagingProviderProducer.java:150) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.streaming.PagingProviderProducer.performWithConnection(PagingProviderProducer.java:141) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.streaming.PagingProviderProducer.produce(PagingProviderProducer.java:100) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.streaming.PagingProviderProducer.produce(PagingProviderProducer.java:54) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.core.api.streaming.iterator.ListConsumer.loadNextPage(ListConsumer.java:81) ~[mule-core-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.OperationMessageProcessorBuilder.lambda$transformPagingDelegate$0(OperationMessageProcessorBuilder.java:93) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.core.api.util.func.CheckedBiFunction.apply(CheckedBiFunction.java:19) ~[mule-core-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.DefaultExecutionMediator$TransformingExecutionCallbackDecorator.complete(DefaultExecutionMediator.java:337) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.execution.CompletableMethodOperationExecutor.doExecute(CompletableMethodOperationExecutor.java:26) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.execution.AbstractCompletableMethodOperationExecutor.execute(AbstractCompletableMethodOperationExecutor.java:61) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.DefaultExecutionMediator.executeCommand(DefaultExecutionMediator.java:237) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.DefaultExecutionMediator.executeWithInterceptors(DefaultExecutionMediator.java:221) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.DefaultExecutionMediator.lambda$execute$1(DefaultExecutionMediator.java:130) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.DefaultExecutionMediator.lambda$new$0(DefaultExecutionMediator.java:73) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.DefaultExecutionMediator.withExecutionTemplate(DefaultExecutionMediator.java:316) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.DefaultExecutionMediator.execute(DefaultExecutionMediator.java:129) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.ComponentMessageProcessor.executeOperation(ComponentMessageProcessor.java:576) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.ComponentMessageProcessor.prepareAndExecuteOperation(ComponentMessageProcessor.java:801) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.ComponentMessageProcessor.lambda$onEventSynchronous$16(ComponentMessageProcessor.java:478) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.ComponentMessageProcessor.onEventSynchronous(ComponentMessageProcessor.java:485) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.module.extension.internal.runtime.operation.ComponentMessageProcessor.lambda$null$6(ComponentMessageProcessor.java:394) ~[mule-module-extensions-support-4.4.0-20220922.jar:4.4.0-20220922] at reactor.core.publisher.FluxPeekFuseable$PeekFuseableConditionalSubscriber.onNext(FluxPeekFuseable.java:482) [reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE] at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onNext(FluxMapFuseable.java:287) [reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE] at reactor.core.publisher.FluxPeekFuseable$PeekFuseableConditionalSubscriber.onNext(FluxPeekFuseable.java:496) [reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE] at org.mule.runtime.core.privileged.processor.chain.AbstractMessageProcessorChain$2.onNext(AbstractMessageProcessorChain.java:511) [mule-core-4.4.0-20220922.jar:4.4.0-20220922] at org.mule.runtime.core.privileged.

Could you help me! Thanks!!

olamiral-mulesoft commented 2 years ago

Hi @ramondea!

I've added some logs to determine where the path parts are being duplicated. Could you please get the code from the develop branch and try to reproduce the issue? Before running the app, make sure to set the log level of the com.mulesoft.connector.smb.internal.connection.client.SmbClient class to DEBUG. Once you've reproduced the issue, please attach to the issue the application logs for further analysis. Thank you!