Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stopped working on Ubuntu 18.04 LTS #27

Closed
Ri0n opened this issue Apr 19, 2019 · 12 comments
Closed

Stopped working on Ubuntu 18.04 LTS #27

Ri0n opened this issue Apr 19, 2019 · 12 comments

Comments

@Ri0n
Copy link

Ri0n commented Apr 19, 2019

It's what I see with recent deb trunk package

2019-04-19 13:02:24,986 ERROR [ImapConnection-53304] davmail.exchange.auth.O365InteractiveAuthenticator  - Authentication failed Unable to load JavaFX (OpenJFX)
2019-04-19 13:02:24,986 INFO  [ImapConnection-53304] davmail.connection  - FAILED - 127.0.0.1:53304 sergey_ilinykh@epam.com
2019-04-19 13:02:24,986 ERROR [ImapConnection-53304] davmail  - Authentication failed Unable to load JavaFX (OpenJFX)
davmail.exception.DavMailException: Authentication failed Unable to load JavaFX (OpenJFX)
        at davmail.exchange.auth.O365InteractiveAuthenticator.authenticate(O365InteractiveAuthenticator.java:171)
        at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:175)
        at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:97)
        at davmail.imap.ImapConnection.run(ImapConnection.java:112)

Just in case I have next installed jfx packages

libopenjfx-java 11.0.2+1-1~18.04.2
libopenjfx-jni 11.0.2+1-1~18.04.2
openjfx 11.0.2+1-1~18.04.2
openjfx-source 11.0.2+1-1~18.04.2
@Ri0n
Copy link
Author

Ri0n commented Apr 19, 2019

I tried to switch default java from 8 to 11 but result is the same.

@Ri0n
Copy link
Author

Ri0n commented Apr 19, 2019

And I don't see O365Interactive with either java

@knixeur
Copy link

knixeur commented Apr 23, 2019

Hi @Ri0n, I'm currently running it in 18.04.
I had auth issues with trunk version so I'm using 5.2.0, but had no troubles regarding javafx. Are you running it using the provided dist/davmail script?

@Ri0n
Copy link
Author

Ri0n commented Apr 23, 2019

Are you running it using the provided dist/davmail script?

yes

@knixeur
Copy link

knixeur commented Apr 23, 2019

It seems we've the same version.

gb@gb:~$ dpkg -l *jfx*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version              Architecture         Description
+++-===============================-====================-====================-====================================================================
ii  libopenjfx-java                 11.0.2+1-1~18.04.2   all                  JavaFX/OpenJFX - Rich client application platform for Java (Java lib
ii  libopenjfx-jni                  11.0.2+1-1~18.04.2   amd64                JavaFX/OpenJFX - Rich client application platform for Java (native l
ii  openjfx                         11.0.2+1-1~18.04.2   amd64                JavaFX/OpenJFX - Rich client application platform for Java
ii  openjfx-source                  11.0.2+1-1~18.04.2   all                  JavaFX/OpenJFX - Rich client application platform for Java (sources)
gb@gb:~$ java --version
openjdk 11.0.2 2019-01-15
OpenJDK Runtime Environment (build 11.0.2+9-Ubuntu-3ubuntu118.04.3)
OpenJDK 64-Bit Server VM (build 11.0.2+9-Ubuntu-3ubuntu118.04.3, mixed mode, sharing)

In dist/davmail you should see:

JFX_CLASSPATH=/usr/share/java/javafx-base.jar:/usr/share/java/javafx-controls.jar:/usr/share/java/javafx-fxml.jar:/usr/share/java/javafx-graphics.jar:/usr/share/java/javafx-media.jar:/usr/share/java/javafx-swing.jar:/usr/share/java/javafx-web.jar

Verify just in case those files exist.

@knixeur
Copy link

knixeur commented Apr 23, 2019

Reading dist/davmail

If you happen to have swt and not running davmail.jar from the same directory as davmail script, it may enter this condition

elif [ -e /usr/share/java/swt.jar ]; then
    # SWT 3 is available
    export LD_LIBRARY_PATH=/usr/lib/jni
    exec ${JAVA} $JAVA_OPTS -cp /usr/share/davmail/davmail.jar:/usr/share/java/swt.jar:/usr/share/davmail/lib/* davmail.DavGateway "$@"

It's not loading jfx in that case, check if /usr/share/java/swt.jar exists in your system, if it is, rename it temporarily and try again.

@Ri0n
Copy link
Author

Ri0n commented Apr 23, 2019

renaming /usr/share/java/swt.jar made the trick. works now

@knixeur
Copy link

knixeur commented Apr 23, 2019

Great, if you can try changing the following it may be fixed upstream, rename swt.jar back to it's place
and change the launcher inside davmail to include JFX_CLASSPATH

elif [ -e /usr/share/java/swt.jar ]; then
    # SWT 3 is available
    export LD_LIBRARY_PATH=/usr/lib/jni
    exec ${JAVA} $JAVA_OPTS -cp /usr/share/davmail/davmail.jar:/usr/share/java/swt.jar:${JFX_CLASSPATH}:/usr/share/davmail/lib/* davmail.DavGateway "$@"

@Ri0n
Copy link
Author

Ri0n commented Apr 23, 2019

yep, including JFX_CLASSPATH also works :)
gracias :)

@mguessan
Copy link
Owner

mguessan commented May 6, 2019

According to my tests OpenJFX is not compatible SWT => jvm crashes during authentication.

If you manage to make it work, can you please confirm:

  • JDK version
  • OpenJFX version
  • SWT version
  • DavMail build

@knixeur
Copy link

knixeur commented May 7, 2019

Maybe his /usr/share/java/swt.jar wasn't actually SWT 3 but SWT 4.
elif [ -e /usr/share/java/swt.jar ]; then doesn't include JFX but elif [ -e /usr/share/java/swt4.jar ]; then does.

@mguessan
Copy link
Owner

Ok, after more tests on Ubuntu, I can confirm it's working better with provided patch
=> merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants