dirk-olmes / mule-transport-cifs

MuleCIFS transport
6 stars 11 forks source link

Transport doesn't seems to be available on mule repository anymore #6

Open Djang0 opened 7 years ago

Djang0 commented 7 years ago

Hi,

I tried to use this transport as inbound-endpoint but it seems that it is not available anymore on mule's maven repository. Building with maven throws this:


Failed to execute goal on project test_file_tojms: Could not resolve dependencies for project com.mycompany:test_file_tojms:mule:1.0.0-SNAPSHOT: Failed to collect dependencies at org.mule.transports:mule-transport-cifs:jar:3.3.0 -> org.samba.jcifs:jcifs:jar:1.3.10: Failed to read artifact descriptor for org.samba.jcifs:jcifs:jar:1.3.10: Could not transfer artifact org.samba.jcifs:jcifs:pom:1.3.10 from/to mule-deps (http://dist.codehaus.org/mule/dependencies/maven2): dist.codehaus.org: unknown error: Unknown host dist.codehaus.org:
....

Is the project still alive? would you suggest any alternative to maven build?

Thanks in advance.

dirk-olmes commented 7 years ago

I've updated the 3.3.x branch with a jcifs dependency that's available on the central repo. See if this works for you.

Djang0 commented 7 years ago

Thanks for fast answer... It does not seems to be working for me ... same error. Am I missing something (new to mule)?

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:file="http://www.mulesoft.org/schema/mule/file"
    xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.8.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:smb="http://www.mulesoft.org/schema/mule/smb"
    xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/smb http://www.mulesoft.org/schema/mule/smb/3.3/mule-smb.xsd">
<flow name="smb2file">
    <smb:inbound-endpoint host="the-host" user="username" password="secret" path="/path"/>
    <file:outbound-endpoint path="/data"/>
</flow>

</mule>
Djang0 commented 7 years ago

http://www.mulesoft.org/schema/mule/smb does not exists ...

dirk-olmes commented 7 years ago

Looks like that schema got removed on the mulesoft servers :-(

Since I don't work at mule any more I don't have a chance to upload the schema again. But the schema URL is arbitrary: you could as well use

<mule xmlns:smb="http://www.mulesoft.org/schema/mule/smb ...
    xsi:schemaLocation="
    http://www.mulesoft.org/schema/mule/smb https://raw.githubusercontent.com/dirk-olmes/mule-transport-cifs/mule-3.3.x/src/main/resources/META-INF/mule-smb.xsd">
</mule>
jasonTian2013 commented 7 years ago

Hi:

I'm trying use your transport but got the error below:

Failed to read schema document 'https://raw.githubusercontent.com/dirk-olmes/mule-transport-cifs/mule-3.3.x/src/main/resources/META-INF/mule-smb.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .

Seems that the xsd on https://raw.githubusercontent.com/dirk-olmes/mule-transport-cifs/mule-3.3.x/src/main/resources/META-INF/ has an issue.

Could you please help if you still can?

Many thanks in advance. Regards,

Jason

Djang0 commented 7 years ago

I never succeeded in using the connector properly. But I used a work around. I mounted remote smb share as a local filesystem in fstab and accessed it with a simple file connector. https://wiki.ubuntu.com/MountWindowsSharesPermanently

jasonTian2013 commented 7 years ago

Hi Djang0:

Many thanks for your reply.

I have managed to add that schema file in my classpath and the issue was resolved.

In our case, mount may not be the option because our app was deployed on cloudhub and will be redeployed from time to time. As a result, vm will be re-created and mount will be gone.

However, I've got another error like below:

jcifs.smb.SmbAuthException: Logon failure: account currently disabled.

But I'm pretty sure the account is not disabled.

Hopefully the owner will see this and know the root cause. Regards,

Jason

Djang0 commented 7 years ago

Yes the schema file error was only avoiding compilation because of strict requirement of the DTD. you could have added an empty DTD it would have solved this as well. I had same (and various others) issue on the auth... I do not remember if I solved that one or not because there was too many issues with this connector. But I remember digging down the sources on the auth problem. And found out that I was not certain Domain information was handled properly (DOMAIN\user : passwd)... I know this is not fully satisfying but if fstab way is not suitable because of the deploy procedure, you might think about FTP connector...

jasonTian2013 commented 7 years ago

Hi Djiang0:

Thank you very much for your help.

Based on what you have experienced, it seems that this connector is not perfect enough for production use, which is a big disappointment for me.

If that's the case, I may try to use jcifs library to have another try before I give up with this.

Thanks again.

Jason

jasonTian2013 commented 7 years ago

Just got it working.

The trick is that you have to put ; between domain name and user name

Djang0 commented 7 years ago

@jasonTian2013 Just like in a standard way... oh wait ! :D Anyway good to know for the future. I found my way around but you never know what the future will be. Thanks for the intell' anyway !