Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-144

CreateDesignDocument() exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.2.1
    • 1.2 Beta
    • library

    Description

      On a Windows 7 x64 VM, single node cluster, Couchbase 2.0 beta, freshly downloaded and installed, I am getting the following exception:
      System.Net.WebException was unhandled
      HResult=-2146233079
      Message=The remote server returned an error: (500) Internal Server Error.
      Source=System
      StackTrace:
      at System.Net.HttpWebRequest.GetResponse()
      at Couchbase.Helpers.HttpHelper.doRequest(Uri uri, String verb, String username, String password, String postData, String contentType) in c:\Cloud\Platform\PlatformSpike\Reference Assemblies\Couchbase\Couchbase\Helpers\HttpHelper.cs:line 77
      at Couchbase.Helpers.HttpHelper.Put(Uri uri, String username, String password, String postData, String contentType) in c:\Cloud\Platform\PlatformSpike\Reference Assemblies\Couchbase\Couchbase\Helpers\HttpHelper.cs:line 42
      at Couchbase.Management.CouchbaseCluster.CreateDesignDocument(String bucket, String name, String document) in c:\Cloud\Platform\PlatformSpike\Reference Assemblies\Couchbase\Couchbase\Management\CouchbaseCluster.cs:line 115
      at Platform.Data.Couchbase.Provisioning.CouchbaseProvisioning.CreateDesignDocument(String bucketName, String name, DesignDocument document) in c:\Cloud\Platform\PlatformSpike\Platform.Data.Couchbase.Provisioning\ProvisioningClient.cs:line 217
      at Platform.Data.Couchbase.Provisioning.CouchbaseProvisioning.Execute() in c:\Cloud\Platform\PlatformSpike\Platform.Data.Couchbase.Provisioning\ProvisioningClient.cs:line 56
      at CouchbaseUpdater.Program.Main(String[] args) in c:\Cloud\Platform\PlatformSpike\CouchbaseUpdater\Program.cs:line 26
      InnerException:

      The server log contains the following entry, but I'm not sure if it is related:
      Client-side error-report for user "admin" on node 'ns_1@192.168.54.178':
      User-Agent:Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
      Got unhandled error: Object doesn't support this action
      At: http://192.168.54.178:8091/js/cells.js:64
      Backtrace:
      Function: collectBacktraceViaCaller
      Args:
      ---------
      Function: appOnError
      Args:
      "Object doesn't support this action"
      "http://192.168.54.178:8091/js/cells.js"
      64
      30
      ---------
      Function: (function ()

      {throw e;}

      )
      Args:
      ---------
      (repeated 1 times)

      Those are the parameters to the doRequest() method:
      uri = http://192.168.54.178:8092/tenants/_design/tenant_views
      verb = PUT
      contentType = application/json
      username = admin
      password = password
      postData =
      {
      "views": {
      "tenants_all": {
      "map": "function(doc,meta) \r\n{\r\n\tif (doc.Schema === \"tenant\") \r\n\t

      { \r\n\t\temit(meta.id, null); \r\n\t}

      \r\n}"
      },
      "tenants_by_status": {
      "map": "function (doc,meta) \r\n{ \r\n\tif (doc.Schema === \"tenant\" && doc.Status) \r\n\t

      { \r\n\t\temit(doc.Status, null); \r\n\t}

      \r\n}"
      },
      "tenants_by_user_application_instance": {
      "map": "function(doc,meta) \r\n{\r\n\tif (doc.Schema === \"tenant\" && doc.UserId && doc.TenantIdentifiers && identifier.Status === 1) \r\n\t{ \r\n\t\tfor (var i = 0; i < doc.TenantIdentifiers.length; i++) \r\n\t\t{\r\n\t\t\tvar identifier = doc.TenantIdentifiers[i];\r\n\t\t\tif (identifier.ApplicationInstanceId)\r\n\t\t\t

      {\r\n\t\t\t\temit([doc.UserId, identifier.ApplicationInstanceId], null); \r\n\t\t\t}

      \r\n\t\t}\r\n\t} \r\n}"
      }
      }
      }

      On the client I am using the compiled latest .NET source code from GitHub with no modifications.

      Attachments

        Activity

          People

            perry Perry Krug
            perry Perry Krug
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty