Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

An error occurred when sending a notification using 'email' notifier. NoMethodError: undefined method `constantize' for nil:NilClass

58 views
Skip to first unread message

John Doe

unread,
Sep 23, 2016, 4:03:35 AM9/23/16
to jobsworth
We are getting closer to getting this work! :)

Jobsworth asks me for user and pass. I enter defaults and

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.


Afterwards, in logs I get a



An error occurred when sending a notification using 'email' notifier. NoMethodError: undefined method `constantize' for nil:NilClass



What is happening?

Aristedes Maniatis

unread,
Sep 25, 2016, 10:31:17 PM9/25/16
to jobs...@googlegroups.com
On 23/09/2016 6:03pm, John Doe wrote:
> An error occurred when sending a notification using 'email' notifier. NoMethodError: undefined method `constantize' for nil:NilClass

That's not the real error. That's an error the system generates when trying to email you the real error because you haven't entered a valid email address in the context.xml file.

Ari



--
-------------------------->
Aristedes Maniatis
CEO, ish
https://www.ish.com.au
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A

signature.asc

John Doe

unread,
Sep 26, 2016, 4:26:57 AM9/26/16
to jobsworth
Yeah, I mostly left everything as is except domain and a few other parts.

I put a email now there and now:

The change you wanted was rejected.

?

John Doe

unread,
Sep 26, 2016, 4:36:30 AM9/26/16
to jobsworth
Here is my context.xml :

<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is an example. You will need to customise it for your own needs, and rename it
to context.xml. In Apache Tomcat it belongs inside a folder called "config".
You can change the mysql driver to postgresql and you will need to replace all the variables
which look like this ${VARIABLE} either at runtime using a script, or by editing this file
directly.
-->
<Context swallowOutput="true">
  <Resource name="jdbc/jobsworth"
            removeAbandoned="true"
            auth="Container" type="javax.sql.DataSource"
            maxActive="100" maxIdle="30" maxWait="10000"
            username="usernametodatabase" password="passwordtodatabase"
            driverClassName="com.mysql.jdbc.Driver" batchSize="-1"
            url="jdbc:mysql://localhost:3306/jobsworth?autoReconnect=true&amp;zeroDateTimeBehavior=convertToNull&amp;useUnicode=true&amp;characterEncoding=utf8"
            validationQuery="select 1"/>
  <!-- The base domain of the running application. The actual URL you use to access the system is the name of the tenant followed by this. So you might have 'company1.acme.com' and 'company2.acme.com' -->
  <Parameter name="config.domain" value="mydomain.com" override="false"/>
  <!-- Jobsworth can be branded as something else -->
  <Parameter name="config.productName" value="jobsworth" override="false"/>
  <!-- SSL is good. But you may want to turn it off while you are first setting this up.
    This doesn't cause encryption to be applied, you still need to do that in a load balancer or
    in tomcat or Apache httpd. But it will cause jobsworth to redirect the user to https. -->
  <Parameter name="config.ssl" value="false" override="false"/>
   <!-- A path to a folder on disk where jobsworth will store task attachments -->
  <Parameter name="config.storeroot" value="/var/jobsworth/assets" override="false"/>
  <!-- What domain will mail from jobsworth come from? -->
  <Parameter name="config.email_domain" value="mydomain.com" override="false"/>
  <!-- Some emails like password resets will come from this user name. So in this example, it will be jobs...@acme.com -->
  <Parameter name="config.email_replyto" value="webm...@mydomain.com" override="false"/>
  <!-- The from user name. This is usually the same as the reply-to username -->
  <Parameter name="config.email_from" value="webmaster" override="false"/>
  <!-- Something to put at the start of every subject on emails from jobsworth -->
  <Parameter name="config.email_prefix" value="'[jobsworth]'" override="false"/>
  <!-- SMTP settings -->
  <Parameter name="config.smtp_host" value="smtp.mydomain.com" override="false"/>
  <Parameter name="config.smtp_port" value="25" override="false"/>
  <Parameter name="config.smtp_domain" value="mydomain.com" override="false"/>
  <!-- This value is used for integration with your incoming mail server. Change it! -->
  <Parameter name="config.secret" value="mydomain" override="false"/>
  <!-- Used by devise to generate tokens for user login and password resets.
      It is really really important you change this to something random. -->
  <Parameter name="config.secret_key" value="mf8892f2aebc7b250a31b9678eee0c3a784bbb9f5d5384884d0d2204dde2d446823e15fcbeeb3ce526a407956ca8ff6543367e67386b075571a7277f54a73a5f9" override="false"/>
  <!-- Email notification of errors.
      Hopefully you never get one of these, but jobsworth will complain if something goes wrong. -->
  <Parameter name="config.error_email_prefix" value="'[jobsworth error]'" override="false"/>
  <Parameter name="config.error_sender_address" value="webm...@mydomain.com" override="false"/>
  <Parameter name="config.error_exception_recipients" value="['sup...@example.com','sysa...@example.com']" override="false"/>
  <!-- Jobsworth cache store file path. Lots of files will be written here so make it a fast disk. -->
  <Parameter name="config.cache_path" value="/var/jobsworth/cache" override="false"/>

</Context>

Obviously my domain is my REAL domain and user and password are my REAL ones...

di...@orlet.eu

unread,
Dec 9, 2016, 9:51:27 AM12/9/16
to jobsworth
Error occurs here if "Remember me" is checked at login.

Aristedes Maniatis

unread,
Dec 9, 2016, 6:44:59 PM12/9/16
to jobs...@googlegroups.com, di...@orlet.eu
Hard to see what your error is since it seems to be buried inside another error when emailing you the error itself.

Ari

On 10/12/16 1:51am, di...@orlet.eu wrote:
> Error occurs here if "Remember me" is checked at login.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "jobsworth" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jobsworth+...@googlegroups.com <mailto:jobsworth+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
signature.asc
Reply all
Reply to author
Forward
0 new messages