EMail module and javax.activation.DataSource

Wednesday, 25 August 2021 · 2 messages
D
dudzikp25 Aug 2021 13:57 #
Dear all, I am trying to use a basex Email module http://files.basex.org/modules/org/basex/modules/email/EMail.jar. I downloaded a new basex instance (9.6 version) and added this jar to lib directory. Based on the xquery/email.xq file I created the following file: import module namespace email = 'http://basex.org/modules/email/EMail';
let $mail :=
  <email>
    <from>myuser@machine-office</from>
    <to>myuser@machine-office</to>
    <host>localhost</host>
    <subject>Hello!</subject>
    <message>Enjoy</message>
  </email>
return
  email:send($mail)
While running the file I obtain: Stopped at /home/myuser/Downloads/basex/file, 12/13: [XPTY0004] javax.activation.DataSource. Caused by: org.basex.modules.email.EMail:send(element()). What's the problem? Shouldn't I use this module? BR
OS
Omar Siam25 Aug 2021 15:54 #
Hello, Are you using JDK 11 (or newer)? javax.activation is no longer part of the JDK but the jar is available separately. I stumbled upon this in exist-db but maybe it is the same problem here? So JDK 1.8 should work and adding the jar https://search.maven.org/remotecontent?filepath=javax/activation/activation/1.1.1/activation-1.1.1.jar to the lib or lib/custom folder should work to. Best regards Omar Siam
Quoted text · dudzikp · 26 lines
Am 25.08.2021 um 13:57 schrieb dudzikp at yahoo.com: > Dear all, > > I am trying to use a basex Email module http://files.basex.org/modules/org/basex/modules/email/EMail.jar. I downloaded a new basex instance (9.6 version) and added this jar to lib directory. Based on the xquery/email.xq file I created the following file: > > import module namespace email = 'http://basex.org/modules/email/EMail'; > > let $mail := > <email> > <from>myuser@machine-office</from> > <to>myuser@machine-office</to> > <host>localhost</host> > <subject>Hello!</subject> > <message>Enjoy</message> > </email> > return > email:send($mail) > > While running the file I obtain: > > Stopped at /home/myuser/Downloads/basex/file, 12/13: > [XPTY0004] javax.activation.DataSource. Caused by: org.basex.modules.email.EMail:send(element()). > > What's the problem? Shouldn't I use this module? > > BR
-- Mag. Ing. Omar Siam Austrian Center for Digital Humanities and Cultural Heritage Österreichische Akademie der Wissenschaften | Austrian Academy of Sciences Stellvertretende Behindertenvertrauensperson | Deputy representative for disabled persons Wohllebengasse 12-14, 1040 Wien, Österreich | Vienna, Austria T: +43 1 51581-7295 omar.siam at oeaw.ac.at | www.oeaw.ac.at/acdh

⚡Generated with XQuery