Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Davmail] - Erreur Java
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
y351
n00b
n00b


Joined: 21 May 2017
Posts: 6

PostPosted: Thu Jan 11, 2018 10:19 am    Post subject: [Davmail] - Erreur Java Reply with quote

Bonjour,

Je désire utiliser Exchange avec Davmail.
J'ai installé à partir d'un Overlay :
Quote:

[I] net-mail/davmail-bin [1]
Available versions: ~*3.9.8 ~*3.9.9 ~*4.3.3 ~*4.4.0 ~*4.4.1 ~4.5.0 ~4.5.1 ~4.6.0 ~4.6.1 4.6.2 4.7.0 4.7.1 4.7.2 4.7.3 4.8.0{tbz2} {doc}
Installed versions: 4.8.0{tbz2}(11:54:11 02/01/2018)(-doc)
Homepage: http://davmail.sourceforge.net/
Description: DavMail POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange Gateway

[1] "srcshelton" /var/lib/layman/srcshelton


Voici le contenu du package :
Quote:


* Searching for davmail-bin ...
* Contents of net-mail/davmail-bin-4.8.0:
/etc
/etc/conf.d
/etc/conf.d/davmail
/etc/env.d
/etc/env.d/90davmail
/etc/init.d
/etc/init.d/davmail
/opt
/opt/davmail-4.8.0
/opt/davmail-4.8.0/bin
/opt/davmail-4.8.0/bin/davmail.jar
/opt/davmail-4.8.0/conf
/opt/davmail-4.8.0/conf/davmail.properties
/opt/davmail-4.8.0/lib
/opt/davmail-4.8.0/lib/activation-1.1.1.jar
/opt/davmail-4.8.0/lib/commons-codec-1.3.jar
/opt/davmail-4.8.0/lib/commons-collections-3.1.jar
/opt/davmail-4.8.0/lib/commons-httpclient-3.1.jar
/opt/davmail-4.8.0/lib/commons-logging-1.0.4.jar
/opt/davmail-4.8.0/lib/htmlcleaner-2.2.jar
/opt/davmail-4.8.0/lib/jackrabbit-webdav-2.4.3.jar
/opt/davmail-4.8.0/lib/jcharset-1.3.jar
/opt/davmail-4.8.0/lib/jcifs-1.3.14.jar
/opt/davmail-4.8.0/lib/jdom-1.0.jar
/opt/davmail-4.8.0/lib/log4j-1.2.16.jar
/opt/davmail-4.8.0/lib/mail-1.4.3.jar
/opt/davmail-4.8.0/lib/slf4j-api-1.3.1.jar
/opt/davmail-4.8.0/lib/slf4j-log4j12-1.3.1.jar
/opt/davmail-4.8.0/lib/stax-api-1.0.1.jar
/opt/davmail-4.8.0/lib/stax2-api-3.1.1.jar
/opt/davmail-4.8.0/lib/woodstox-core-asl-4.1.2.jar
/opt/davmail-4.8.0/lib/xercesImpl-2.8.1.jar
/var
/var/log
/var/log/davmail


1) J'utilise Systemd mais le service n'existe pas : il faudrait en créer un.
2) J'essaie donc de le lancer en CLI :
Code:

java -cp /opt/davmail-4.8.0/lib -jar /opt/davmail-4.8.0/bin/davmail.jar


Voici le résultat obtenu :
Quote:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpMethod
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.HttpMethod
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more


Quote:

Available Java Virtual Machines:
[1] icedtea-bin-8 system-vm


Qu'en pensez-vous ?

Merci d'avance pour vos retours.
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7356
Location: ~Brussels - Belgique

PostPosted: Thu Jan 11, 2018 10:24 am    Post subject: Reply with quote

Hello,

L'exécution se plaint qu'elle ne trouve pas le composant http d'Apache.

As-tu installé dev-java/commons-httpclient ?

Si cela fonctionne une fois installé, contacte le mainteneur de l'ebuild pour qu'il ajoute cette dépendance manquante.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
y351
n00b
n00b


Joined: 21 May 2017
Posts: 6

PostPosted: Thu Jan 11, 2018 10:50 am    Post subject: Reply with quote

Salut,

Après l'avoir installé, j'ai le même erreur :
Quote:

[I] dev-java/commons-httpclient
Available versions: (3) 3.1-r1^t{tbz2}
{doc examples source test ELIBC="FreeBSD"}
Installed versions: 3.1-r1(3)^t{tbz2}(11:40:00 01/11/18)(-doc -examples -source -test ELIBC="-FreeBSD")
Homepage: http://hc.apache.org/
Description: The Jakarta Commons HttpClient library


Code:

java -cp /opt/davmail-4.8.0/lib -jar /opt/davmail-4.8.0/bin/davmail.jar

Quote:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpMethod
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.HttpMethod
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more


Quote:

* Searching for commons-httpclient in dev-java ...
* Contents of dev-java/commons-httpclient-3.1-r1:
/usr
/usr/share
/usr/share/commons-httpclient-3
/usr/share/commons-httpclient-3/lib
/usr/share/commons-httpclient-3/lib/commons-httpclient.jar
/usr/share/commons-httpclient-3/package.env

Code:

java -cp "/opt/davmail-4.8.0/lib,/usr/share/commons-httpclient-3/lib" -jar /opt/davmail-4.8.0/bin/davmail.jar       

Quote:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpMethod
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.HttpMethod
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 17333
Location: here

PostPosted: Thu Jan 11, 2018 11:30 am    Post subject: Reply with quote

Toutes les dépendances sont incluses dans le paquet.
Ce script exécute davmail (j'espère :D)
Code:
#!/bin/sh
DIR="/opt/davmail-4.8.0/"
for JAR in $( find "${DIR}"/lib/ -type f -name \*.jar ); do
   CLASSPATH="${CLASSPATH}:${JAR}"
done
java -cp "${DIR}"/bin/davmail.jar${CLASSPATH} davmail.DavGateway "${DIR}"/conf/davmail.properties

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
y351
n00b
n00b


Joined: 21 May 2017
Posts: 6

PostPosted: Thu Jan 11, 2018 1:58 pm    Post subject: Reply with quote

J'étais en train de regarder la conf du /etc/init.d/davmail...:-)
En effet, ça lance mieux.
Mais erreur :
Quote:

2018-01-11 12:59:11,848 WARN [ImapConnection-55286] org.apache.commons.httpclient.HttpMethodBase - Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
2018-01-11 12:59:12,216 ERROR [ImapConnection-55286] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password, retry with domain\user or use default domain setting
2018-01-11 12:59:12,216 ERROR [ImapConnection-55286] davmail - Authentication failed: invalid user or password, retry with domain\user or use default domain setting
davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password, retry with domain\user or use default domain setting
at davmail.exchange.ExchangeSession.throwAuthenticationFailed(ExchangeSession.java:752)
at davmail.exchange.ExchangeSession.postLogonMethod(ExchangeSession.java:583)
at davmail.exchange.ExchangeSession.formLogin(ExchangeSession.java:653)
at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:240)
at davmail.exchange.dav.DavExchangeSession.<init>(DavExchangeSession.java:500)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:147)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:90)
at davmail.imap.ImapConnection.run(ImapConnection.java:112)


Et ce n'est pas le mot de passe
Je vais tester plusieurs comptes : LDAP(AD), compte mail
Back to top
View user's profile Send private message
y351
n00b
n00b


Joined: 21 May 2017
Posts: 6

PostPosted: Thu Jan 11, 2018 2:01 pm    Post subject: Reply with quote

Quote:

davmail.server=true
davmail.enableEws=auto
davmail.url=https://toto.example.org
davmail.popPort=1110
davmail.imapPort=1143
davmail.smtpPort=1025
davmail.caldavPort=1080
davmail.ldapPort=1389
davmail.proxyUser=
davmail.proxyHost=
davmail.proxyPort=
davmail.proxyPassword=
davmail.enableProxy=false
davmail.useSystemProxies=false
davmail.noProxyFor=
davmail.allowRemote=true
davmail.bindAddress=
davmail.clientSoTimeout=
davmail.ssl.keystoreType=JKS
davmail.ssl.keystoreFile=
davmail.ssl.keystorePass=
davmail.ssl.keyPass=
davmail.server.certificate.hash=
davmail.ssl.nosecurecaldav=false
davmail.ssl.nosecureimap=false
davmail.ssl.nosecureldap=false
davmail.ssl.nosecurepop=false
davmail.ssl.nosecuresmtp=false
davmail.disableUpdateCheck=true
davmail.enableKeepalive=false
davmail.folderSizeLimit=0
davmail.defaultDomain=
davmail.caldavPastDelay=90
davmail.forceActiveSyncUpdate=false
davmail.imapAutoExpunge=true
davmail.imapIdleDelay=
davmail.imapAlwaysApproxMsgSize=
davmail.keepDelay=30
davmail.sentKeepDelay=90
davmail.popMarkReadOnRetr=false
davmail.smtpSaveInSent=true
davmail.logFilePath=/var/log/davmail.log
davmail.logFileSize=1MB
log4j.logger.davmail=WARN
log4j.logger.httpclient.wire=WARN
log4j.logger.org.apache.commons.httpclient=WARN
log4j.rootLogger=WARN
Back to top
View user's profile Send private message
El_Goretto
Moderator
Moderator


Joined: 29 May 2004
Posts: 3041
Location: Paris

PostPosted: Thu Jan 11, 2018 7:32 pm    Post subject: Reply with quote

y351 wrote:
J'étais en train de regarder la conf du /etc/init.d/davmail...:-)
En effet, ça lance mieux.
Mais erreur :
Quote:

2018-01-11 12:59:11,848 WARN [ImapConnection-55286] org.apache.commons.httpclient.HttpMethodBase - Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
2018-01-11 12:59:12,216 ERROR [ImapConnection-55286] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password, retry with domain\user or use default domain setting
2018-01-11 12:59:12,216 ERROR [ImapConnection-55286] davmail - Authentication failed: invalid user or password, retry with domain\user or use default domain setting
davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password, retry with domain\user or use default domain setting
at davmail.exchange.ExchangeSession.throwAuthenticationFailed(ExchangeSession.java:752)
at davmail.exchange.ExchangeSession.postLogonMethod(ExchangeSession.java:583)
at davmail.exchange.ExchangeSession.formLogin(ExchangeSession.java:653)
at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:240)
at davmail.exchange.dav.DavExchangeSession.<init>(DavExchangeSession.java:500)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:147)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:90)
at davmail.imap.ImapConnection.run(ImapConnection.java:112)


Et ce n'est pas le mot de passe
Je vais tester plusieurs comptes : LDAP(AD), compte mail

Hohé l'autre comment il y va, il traite le log de menteur :)

Bon, j'ai repéré un gros mot dans le post de départ (Exchange, beurk), et je vois "IMAP" et "Authentication Failed". Est-ce que l'accès IMAP que tu tentes est bien activé sur le bousin côté serveur?

PS: je me permets d'être désagréable vis à vis du produit parce que typiquement dans ma boîte l'accès IMAP est désactivé sur cette cochonnerie d'Office365. Et v'là l'accès moisi en POP3 pour la messagerie et l'impossibilité d'accéder au calendrier depuis des outils standards...
_________________
-Gentoo hardened [EoL]: µ-serv Gen8 G1610T, 8Go ECC ; NF9D-2700, 4Go
-FreeBSD 11/Vimage/Jails: DS61, i3 2100T, 16Go ; FreeNAS: µ-serv N40L, 8Go ECC
-Réseau: ERL-3 + ESL-24 + GS108Tv2
-NAS: RN312
Back to top
View user's profile Send private message
y351
n00b
n00b


Joined: 21 May 2017
Posts: 6

PostPosted: Fri Jan 12, 2018 5:19 pm    Post subject: Reply with quote

Il n'y a pas de problème de mot de passe. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum