title: mixin #5 is not a callable constructor
body: <p>I am creating a  new dijit and in the same html file I am declaring it with markups but I am getting <code>mixin #5 is not a callable constructor</code>  from <code>dojo.js</code> file, please see the below code snippet and  help me figure out what  I am missing in code, Thanks a lot in advance:</p>
  
  <p>Note: When I am using define() instead of require() then it is not rendering template.</p>
  
  <p><strong>Code for dijit creation:</strong></p>
  
  <pre><code>require([
      "dojo/_base/declare",
      "dojo/parser",
      "dijit/_WidgetBase",
      "dijit/_TemplatedMixin",
      "dijit/_WidgetsInTemplateMixin",
      "ecm/widget/viewer/FilenetViewer",
      "ecm/widget/dialog/ErrorDialog",
      "ecm/model/Desktop",
      "ecm/model/Repository",
      "ecm/model/Request",
      "dojo/ready",
      "dojo/text!./templates/DocumentViewerWidgetv0.003.html"
  ], function(declare, parser, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, FilenetViewer, ErrorDialog, Desktop, Repository, Request, ready, template) {
      declare("STViewer", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, FilenetViewer, ErrorDialog, Desktop, Repository, Request, template], {
          documentID: '',
          templateString: template,
          _setdocumentIDAttr: function(documentID) {
              this.documentID = documentID;
          },
          constructor: function()
          {
              console.log("&gt;&gt; constructor Called &lt;&lt;");
          },
          postCreate: function() {
  
              console.log("Trace 1 &gt;&gt;" + JSON.stringify(ecm.model.desktop) + "&lt;&lt;");
              this.inherited(arguments);
  
              var errorDialog = new ErrorDialog();
              dojo.connect(ecm.model.desktop, onMessageAdded",errorDialog,"messageAddedHandler");
                      console.log("Trace 3 &gt;&gt;" + JSON.stringify(ecm.model.desktop) + "&lt;&lt;");
  
              //Credentials  needs to map with logged in user
              var userId = 'username';
              var password = 'password';
  
              var desktopName = 'General';
  
  
              ecm.model.desktop.servicesUrl = "http://8181testapp001/navigator";
              ecm.model.desktop.loadDesktop(desktopName, function() {
                  console.log("Trace 3.2 &gt;&gt; ");
  
                  ecm.model.desktop.userId = userId;
  
                  console.log("Trace 3.3 &gt;&gt;" + userId + "&lt;&lt;,&gt;&gt;" + password + "&lt;&lt;");
  
                  ecm.model.desktop.logon(password, function() {
  
                      console.log("Trace 3.4 &gt;&gt; successfully logged on to desktop &lt;&lt;");
                      // alert("successfully logged on to desktop");
                      console.log("Trace 4");
                      var dtop = ecm.model.desktop;
                      var repository = dtop.getDefaultRepository();
                      //alert("sucessfully logged on to desktop");
                      console.log("Trace 4.1 &gt;&gt; " + JSON.stringify(repository) + "&lt;&lt;");
                      repository.userId = userId;
                      //repository.setUserId(userId);
  
                      repository.logon(password, function() {
                          console.log("Trace 4.2 &gt;&gt; successfully logged on to repository &lt;&lt;");
                          var itemId = 'FCEA28D1-6D78-4756-8171-8C33F47316CA';
                          repository.retrieveItem(itemId, function(item) {
                              console.log("Trace 5 &gt;&gt; Document retrieved Successfully &lt;&lt;");
  
                              this.filenetViewer.setitem(item);
                              console.log("Trace 5.2 &gt;&gt; Document set successfully" + JSON.stringify(this.filenetViewer) + " &lt;&lt;");
  
                              this.filenetViewer.showItem();
  
                              console.log("Trace 5.3 &gt;&gt; Document opened Successfully" + JSON.stringify(this.filenetViewer) + " &lt;&lt;");
  
                          });
                      });//repository.logon end
  
                  });// desktop.logon end
              });//desktop.loadDesktop end
  
          }, // postCreate
  
          startup: function() {
              this.inherited(arguments);
          }
  
      });// declare
  
      ready(function() {
          parser.parse();
      });
  });// require
  </code></pre>
  
  <p><strong>Template html:</strong></p>
  
  <pre><code>&lt;div&gt;
      &lt;div  data-dojo-attach-point="filenetViewer" data-dojo-type="ecm.widget.viewer.FilenetViewer"  style="width: 100%; height: 100%; position: absolute; margin: 0; overflow:hidden" isChildWindow="true" showNextPrev="false"sideChrome="0"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Dijit Markup in body element</strong></p>
  
  <pre><code>&lt;body class="ecm oneui"&gt;
     &lt;div &gt;
        &lt;div data-dojo-type="STViewer"  data-dojo-props="documentID:'FCEA28D1-6D78-4756-8171-8C33F47316CA'" &gt; &lt;/div&gt;
     &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>