Cannot start service SPUserCodeV4 on computer

This week I was creating my first SharePoint 2010 Sandboxed solution using Visual Studio 2010.  I have successfully built and deployed other SharePoint projects on the server but I always used Farm based solution due to the requirements.

When I built the Sandboxed solution the project would build and package without any errors but when I tried to deploy it to the SharePoint site the following error occurred:

Error    1    Error occurred in deployment step ‘Activate Features’: Cannot start service SPUserCodeV4 on computer ‘SERVERNAME’ 0    0    SP2010Dev1

The error can be easily resolved by starting the Microsoft SharePoint Foundation Sandboxed Code Service which can be accessed through the Central Administration site in SharePoint.   Open the Central Administration site and go to System Settings and click on Manage Service on server:

image

Check to see if Microsoft SharePoint Foundation Sandboxed Code Service  is running, it should be stopped :

image

Start the service and try deploying the Sandboxed solution.

Thanks to Sergey Hyper Kravchenko for his post on the MSDN SharePoint discussion forum:

error occurred in deployment step ‘retract solution’ cannot start service SPUserCodeV4 on this computer

Troy

Running Eclipse Helios on Windows 7 (64 bit)

 

If you have installed Eclipse Helios (64-bit) on Windows 7 (64-bit), make sure the correct version of java (64-bit) is installed on the computer:

http://www.java.com/en/download/manual.jsp

If you have java installed and you get the error shown below when you try to run Eclipse chances are you have the 32-bit version of Java installed:

"Failed to load the JNI shared library "C:\Program Files(x86)…”

Thanks to this post from the Eclipse Community Forums

http://www.eclipse.org/forums/index.php?t=msg&goto=542940&#msg_542940

 

Troy

Building BI Application’s with SharePoint 2010

 

SharePoint 2010 is an excellent Platform for creating enterprise applications that leverage your current Business Intelligence infrastructure and operational systems.  Of course your not going to build mission critical applications like POS or Supply Chain Ordering system but what about tracking weekly sales and expenses or building a pricing model that requires data from multiple data sources.    Using a combination of SharePoint 2010 and the Office 2010 products it is possible to create robust enterprise applications with a reasonable amount of effort.

Business Connectivity Services (BCS) in SharePoint 2010 and SharePoint Designer 2010 is what makes these applications possible.  Sure you could build your application using native SharePoint list but this approach is limited and does not allow you to leverage existing systems like your corporate data warehouse.    Below is a simple diagram which show how BCS allows business user’s to access external data:

image

The best way to learn about how these tools work is to work through a practical example.    Over the next few blog posts I will walk through how to create a simple sales forecasting application.   I am assuming that you have access to a desktop machine or server with at least the following software:

  • SQL Server Express 2008 R2
    • Adventure Works DW R2
  • SharePoint 2010 Foundation Server
  • SharePoint 2010 Designer

In this scenario the business users want to create a weekly forecasting model which will forecast Internet Sales by Territory by Product Category.  Execute the following to create a forecasting table in the Adventure Works DW R2 database:

select fcst.* into dbo.WeeklySalesForecast from ( select dt.CalendarYear,'Week ' + convert(nvarchar(2),dt.WeekNumberOfYear) WeekNumber , dt.MonthNumberOfYear, dt.EnglishMonthName, ter.SalesTerritoryGroup, ter.SalesTerritoryRegion, cat.EnglishProductCategoryName Category, sum(fct.OrderQuantity) LastYearQuantity, sum(fct.SalesAmount) LastYearAmount, null ForecastQuantity, null ForecastAmount from dbo.FactInternetSales fct inner join dbo.DimDate dt on fct.OrderDateKey = dt.DateKey inner join dbo.DimProduct prd on fct.ProductKey = prd.ProductKey inner join dbo.DimSalesTerritory ter on fct.SalesTerritoryKey = ter.SalesTerritoryKey inner join dbo.DimProductSubcategory sub on prd.ProductSubcategoryKey = sub.ProductSubcategoryKey inner join dbo.DimProductCategory cat on sub.ProductCategoryKey = cat.ProductCategoryKey where dt.CalendarYear = 2008 group by dt.CalendarYear,dt.WeekNumberOfYear, dt.MonthNumberOfYear, dt.EnglishMonthName, ter.SalesTerritoryGroup, ter.SalesTerritoryRegion, cat.EnglishProductCategoryName) fcst

This will create a table that can be used for building the BCS.   In this post we are going to simply create a SharePoint site using SharePoint Designer to host our SharePoint application using SharePoint Designer 2010.   Open SharePoint Designer 2010 and open the Main Site.  In my case my main site is on my laptop and can be accessed at http://localhost.  From the Site Actions menu select “New Site”:

image

 

We are now going to create a new Site called Ops Forecast (http://localhost/opsforecast) use the Team Site template:

  • Title: Ops Forecast
  • Url Name:  opsforecast

image

Now click Create and the site will be created.  In the next post we will build 2 stored procedures and create an External Content Type which will be used as a list to view the forecast data in SharePoint.

 

Troy