xebialabs / overthere

Runs something "Over there"

Home Page:http://www.xebialabs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unknown connection protocol cifs

aaditya09 opened this issue · comments

Hey guys, I am using overthere 4.2.1 on java 8.
(following is my pom.xml dependency)

com.xebialabs.overthere
overthere
4.2.1

I am trying to make winrm connection to one of the windows host, using overthere library. Everything works fine if I execute the method making the connection locally. But as soon I deploy it on tomcat and start using the same method using API, it throws exception "Error Unknown connection protocol cifs".

As suggested in #107 , I tried verifying the jar which is being picked up. It gives correct jar. Attaching the code here :

code :
CompoundEnumeration enumeration = (CompoundEnumeration) Thread.currentThread().getContextClassLoader().getResources("com/xebialabs");
for (;enumeration.hasMoreElements();){
System.out.println(enumeration.nextElement());
}

output :
jar:file:/home/aadi/.m2/repository/com/xebialabs/overthere/overthere/4.2.1/overthere-4.2.1.jar!/com/xebialabs

Which is correct location where the jar is present. Not sure why it is failing on deployment. Can someone please help on this.

Are you running that code in your app server?

Yes, I am using Apache tomcat for running it.

So this was solved using following:
(1). Explicitly adding scannit 1.4.1 to the app pom :
<dependency>
<groupId>nl.javadude.scannit</groupId>
<artifactId>scannit</artifactId>
<version>1.4.1</version>
</dependency>

(2). Excluding scannit dependency with the overthere pom:
<dependency>
<groupId>com.xebialabs.overthere</groupId>
<artifactId>overthere</artifactId>
<version>4.2.1</version>
<exclusions>
<exclusion>
<groupId>nl.javadude.scannit</groupId>
<artifactId>scannit</artifactId>
</exclusion>
</exclusions>
</dependency>

(3). Using older version of http-client and http-core libs :
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.6</version>
</dependency>

    `<dependency>`
        `<groupId>org.apache.httpcomponents</groupId>`
        `<artifactId>httpcore</artifactId>`
        `<version>4.3</version>`
    `</dependency>`

After above changes the I was able to use overthere 4.2.1 with my app.
Thanks for your time @hierynomus.

Cheers!

@aaditya09 Thank you, it worked for me as well. Tomcat 8.5.8.

Cheers! @jaam

Aaditya,

Any specific reason for selecting this approach?

Thanks.

Nothing specific @Priyamvada02 , it just worked for me with those versions. Libraries seems to be compatible that way only.