Start a new topic
Answered

Installation with empty Database

 Hello;


I realized some changes on the default Virto Commerce developper version application and now i'm looking to reinstall this solution with an empty database in order to create new store and have my own products before deploying in the Cloud.


I've already followed this tutorial :

To setup database go to ~\src\Extensions\Setup\VirtoCommerce.PowerShell\ folder and run Powershell script below.

without sample data:

setup-database.ps1 -useSample:$false

 

I've created one catalog, one store and now I get this error :

Server Error in '/store' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /store/

 

Is there something missing ? Do I need to create items, products etc.. before?

Thank you in advance for your anwsers. Stephane

Edit: I think it's a rooting problem because when I launch the solution from Visual Studio, I have an exception in the StoreHttpModule.cs file:
protected virtual void OnBeginRequest(HttpContext context)
        {
            var store = GetStore(context);

            if (store == null)
            {
                throw new HttpException(404, "Store Not Found");
            }

 GetStore sets the store variable to null: it's why I have this exception.


Then, if I try to understand how this function works, I can see that the function try to know what the DefaultStore is...

The default store, which is "SampleStore", seems to be defined in the web.config. I change with the name of my store but it changes nothing... But finally I change with my Store ID and it works!


BUT... I wanted to have my store in french and to be on my store... the url looks like this:

http://localhost:2359/en-us/electronics


(why electronics? my database was empty except my things...)


If I try to go on my store I have the same error that I had before... HOW CAN I GO DIRECTLY ON THE STORE THAT I DEFINED? (

e.g http://localhost:2359/fr-fr/mystore)


EDIT2: Finally I succeed to configure my store in french. but now I have an other problem: I can't display the product I created before with VirtoCommerce Manager...





Best Answer

Hi, Stephane,
"New products" content is generated dynamically and it's configured separately. 

You can set up it manualy:

  1. create "HomeNewProducts" content place in Settings-> Content places 
  2. create "New Products" dynamic content in Marketing -> Dynamic content 
  3. create "New Products" content publishing in Marketing -> Content publishing 
  4. "New products" should appear where expected. 

You can connect to http://virtocommerce-test.cloudapp.net/ and use the data as a reference.

We'll include this script for "empty database" in upcoming VirtoCommerce release.



No it doesn't work sorry :/
Maybe there is an other solution?

 

Are you using ElasticSearch or Lucene as a search? It is specified inside connectionStrings.config file.

Hello,
my previous issue is solved but now I have problem when i want to create a new storage account :

 

 

05/26/2014 11:15:12 - Checking storage account {pixiencevirtocommerce}: Creating new
New-AzureStorageAccount : You MUST specify a certificate. Call Set-AzureSubscription and Select-AzureSubscription
first.
Au caractère C:\Users\ssanchez\Desktop\Migration\vc-community-master2\src\extensions\Setup\VirtoCommerce.PowerShell\azu
re-deploy.ps1:419 : 9
+         New-AzureStorageAccount -StorageAccountName $common_storageaccount -Labe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError : (:) [New-AzureStorageAccount], ArgumentException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.StorageServices.NewAzureStorageAccou
   ntCommand

Get-AzureStorageKey : You MUST specify a certificate. Call Set-AzureSubscription and Select-AzureSubscription first.
Au caractère C:\Users\ssanchez\Desktop\Migration\vc-community-master2\src\extensions\Setup\VirtoCommerce.PowerShell\azu
re-deploy.ps1:429 : 34....

 

 

Do you know how can I resolve this issue please ?


[edit]

I just tried to create this storage account directly from Azure but I still have this problem.

I don't know how and where specify a certificate


I use ElacticSearch

 

The dynamic content displaying new items simply executes the search where startdate is within 1 month of  today date. Can you check what is the StartDate for the new product?

I tried to comment the lines 294-297 to see what happen next and i still have a problem with the schemaVersion which seems not valid again.

 

Build Failed
Au caractère C:\PATH\vc-community-master\src\extensions\Setup\VirtoCommerce.PowerShell\azure-deploy.ps1:303 : 11
+           throw "Build Failed"
+           ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Build Failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Build Failed

I don't understand what's wrong..

(I can't install this soft : Windows Management Framework 3.0 download link, I'm on W8)

 

I've already check the StartDate and it's ok... :/

 

How about looking at the index itself: http://localhost:9200/default/catalogitem/_search?pretty. Can you see what the startdate is in there? And possibly post one of the records.

I have these records:

 

{
  "took" : 51,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0
  },
  "hits" : {
    "total" : 4,
    "max_score" : 1.0,
    "hits" : [ {
      "_index" : "default",
      "_type" : "catalogitem",
      "_id" : "1cfe2590-315b-40d6-b8e3-c824d482e48a",
      "_score" : 1.0, "_source" : {"__key":"1cfe2590-315b-40d6-b8e3-c824d482e48a","__type":"Sku","__sort":"aze","__hidden":"false","code":"a541f0dd-1","name":"aze","startdate":"2014-05-19T00:00:00","enddate":"9999-12-31T23:59:59.9999999","createddate":"2014-05-19T08:07:55.79","lastmodifieddate":"2014-05-19T08:07:55.79","catalog":["pixiencecatalog","pixiencecatalog"],"__browsingoutline":"C-cube","sortpixiencecatalog4e9b8eaf-696c-45aa-8bc6-fdcddc23fb0e":0,"__outline":"pixiencecatalog/4e9b8eaf-696c-45aa-8bc6-fdcddc23fb0e","price_eur_defaulteur":20.00,"price_eur_defaulteur_value":"20,00","__content":["aze","a541f0dd-1"]}
    }, {
      "_index" : "default",
      "_type" : "catalogitem",
      "_id" : "327dd936-9614-49f2-aaad-935ac12a38d8",
      "_score" : 1.0, "_source" : {"__key":"327dd936-9614-49f2-aaad-935ac12a38d8","__type":"Product","__sort":"xcxcxcxcxc","__hidden":"false","code":"1d934755-5","name":"xcxcxcxcxc","startdate":"2014-05-19T00:00:00","enddate":"9999-12-31T23:59:59.9999999","createddate":"2014-05-19T08:10:54.627","lastmodifieddate":"2014-05-19T08:10:54.627","catalog":["pixiencecatalog","pixiencecatalog"],"__browsingoutline":"C-cube","sortpixiencecatalog4e9b8eaf-696c-45aa-8bc6-fdcddc23fb0e":0,"__outline":"pixiencecatalog/4e9b8eaf-696c-45aa-8bc6-fdcddc23fb0e","price_eur_defaulteur":1.00,"price_eur_defaulteur_value":"1,00","__content":["xcxcxcxcxc","1d934755-5"]}
    }, {
      "_index" : "default",
      "_type" : "catalogitem",
      "_id" : "858ec933-e115-47fb-b4cd-e730b217d6a9",
      "_score" : 1.0, "_source" : {"__key":"858ec933-e115-47fb-b4cd-e730b217d6a9","__type":"Sku","__sort":"test","__hidden":"false","code":"2d837df3-a","name":"test","startdate":"2014-05-19T00:00:00","enddate":"9999-12-31T23:59:59.9999999","createddate":"2014-05-16T15:18:22.78","lastmodifieddate":"2014-05-19T07:05:37.377","catalog":["pixiencecatalog","pixiencecatalog"],"__browsingoutline":"C-cube","sortpixiencecatalog4e9b8eaf-696c-45aa-8bc6-fdcddc23fb0e":0,"__outline":"pixiencecatalog/4e9b8eaf-696c-45aa-8bc6-fdcddc23fb0e","price_eur_defaulteur":10.00,"price_eur_defaulteur_value":"10,00","__content":["test","2d837df3-a"]}
    }, {
      "_index" : "default",
      "_type" : "catalogitem",
      "_id" : "8956fbdb-d13a-44fc-8309-ce74a933f97d",
      "_score" : 1.0, "_source" : {"__key":"8956fbdb-d13a-44fc-8309-ce74a933f97d","__type":"Product","__sort":"aaaaaaa","__hidden":"false","code":"6b608267-e","name":"aaaaaaa","startdate":"2014-05-19T00:00:00","enddate":"9999-12-31T23:59:59.9999999","createddate":"2014-05-19T08:05:45.66","lastmodifieddate":"2014-05-19T08:05:45.66","catalog":["pixiencecatalog","pixiencecatalog"],"__browsingoutline":"C-cube","sortpixiencecatalog4e9b8eaf-696c-45aa-8bc6-fdcddc23fb0e":0,"__outline":"pixiencecatalog/4e9b8eaf-696c-45aa-8bc6-fdcddc23fb0e","price_eur_defaulteur":20.00,"price_eur_defaulteur_value":"20,00","__content":["aaaaaaa","6b608267-e"]}
    } ]
  }
}

 


 

Thanks, the last screenshot was very informative, we'll investigate and let you know.

Ok, thanks for the info. We'll try to recreate the issue locally now. You can also try simulating the same issue on our demo site at http://demo.virtocommerce.com. That will help us troubleshoot it better.

Well it's working perfectly. Thank you very much :)

 

euh.. sorry something goes wrong with your solution.

I can display pictures in the "New Products" area but when I click on one of them I get this error :


La référence d'objet n'est pas définie à une instance d'un objet.

Description : Une exception non gérée s'est produite au moment de l'exécution de la requête Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.



Détails de l'exception: System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.

Erreur source:

Ligne 1 :  @model IEnumerable<string>
Ligne 2 :  
Ligne 3 :  @foreach (var placeName in Model)
Ligne 4 :  {
Ligne 5 :      <div id="@placeName">


Fichier source : c:\PATH\vc-community-master\src\Presentation\FrontEnd\StoreWebApp\Views\Banner\MultiBanner.cshtml Ligne : 3

Trace de la pile:

[NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.]
   ASP._Page_Views_banner_MultiBanner_cshtml.Execute() in c:\PATH\vc-community-master\src\Presentation\FrontEnd\StoreWebApp\Views\Banner\MultiBanner.cshtml:3
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +279
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +124
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +195
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +377
   System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +32
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +799724
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +799724
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +799724
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +787092
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +65
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +51
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

 

Re,
I think I found a solution for this problem :
05/26/2014 11:15:12 - Checking storage account {pixiencevirtocommerce}: Creating new
New-AzureStorageAccount : You MUST specify a certificate. Call Set-AzureSubscription and Select-AzureSubscription
first.
Au caractère C:\Users\ssanchez\Desktop\Migration\vc-community-master2\src\extensions\Setup\VirtoCommerce.PowerShell\azu
re-deploy.ps1:419 : 9
+         New-AzureStorageAccount -StorageAccountName $common_storageaccount -Labe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError : (:) [New-AzureStorageAccount], ArgumentException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.StorageServices.NewAzureStorageAccou
   ntCommand

 

I added on azure-deploy.ps1 line 419 :

Select-AzureSubscription "BizSpark" to select the right Subscription


And with that line a new storage account is created.

But now I have this error :

 

 

05/26/2014 17:15:14 - Checking container {mydeployments}: Finished
05/26/2014 17:15:14 - Checking container {software}: In progress
05/26/2014 17:15:14 - Checking storage account {pixiencevirtocommerce}: In progress
05/26/2014 17:15:14 - Checking storage account {pixiencevirtocommerce}: Creating new
COMMENTAIRES : 17:15:14 - Begin Operation: New-AzureStorageAccount
New-AzureStorageAccount : "An exception occurred when calling the ServiceManagement API. HTTP Status Code: 409. Service Management Error Code: ConflictError. Message: A storage account named
'pixiencevirtocommerce' already exists in the subscription.. Operation Tracking ID: 51532xxxxxxxxxxffad0xx966a66xxxx7081."
Au caractère C:\Users\ssanchez\Desktop\Migration\3\vc-community-master\src\extensions\Setup\VirtoCommerce.PowerShell\azure-deploy.ps1:420 : 9
+         New-AzureStorageAccount -StorageAccountName $common_storageaccount -Labe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError : (:) [New-AzureStorageAccount], ServiceManagementClientException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.StorageServices.NewAzureStorageAccountCommand

COMMENTAIRES : 17:15:15 - Completed Operation: New-AzureStorageAccount
COMMENTAIRES : 17:15:15 - Begin Operation: Get-AzureStorageKey
COMMENTAIRES : 17:15:16 - Completed Operation: Get-AzureStorageKey
pixiencevirtocommerce
05/26/2014 17:15:16 - Checking container {software}: Finished


05/26/2014 17:15:16 - SQL Database Deployment: In progress
COMMENTAIRES : Setting: Windows Azure MSDN - Visual Studio Ultimate as the default and current subscription. To view other subscriptions use Get-AzureSubscription
05/26/2014 17:15:19 Started SQL Database Setup
05/26/2014 17:15:19 - SQL Database Deployment: setting credentials
05/26/2014 17:15:19 - SQL Database Deployment: setting db context
AVERTISSEMENT : Client Session Id: '...........-1dad-46e9-b9ba-..........-2014-05-26 15:15:20Z'
AVERTISSEMENT : Client Request Id: '.........-.....-4fa3-......-ef96763a4749'
New-AzureSqlDatabaseServerContext : Authentication:391be3a9-4cf3-4e48-bf95-8a70fd47624c[Microsoft.SqlServer.MessageText=Login failed for user
'virto'.,Microsoft.SqlServer.MessageSeverity=14,Microsoft.SqlServer.MessageId=18456]
Au caractère C:\Users\ssanchez\Desktop\Migration\3\vc-community-master\src\extensions\Setup\VirtoCommerce.PowerShell\azure-db.ps1:36 : 12
+     $ctx = New-AzureSqlDatabaseServerContext -ServerName $db_servername -Credent ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation : (:) [New-AzureSqlDatabaseServerContext], CommunicationException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.SqlDatabase.Database.Cmdlet.NewAzureSqlDatabaseServerContext

 

 

 


 

Well ok thanks.
I created a new Store on it with category and item

Category :

http://demo.virtocommerce.com/fr-fr/essaistore/treatment

It seems like data don't load instantly after an added, is it normal ?


Index Store :

http://demo.virtocommerce.com/fr-fr/essaistore


 

Login or Signup to post a comment