Sitecore 8: Deleting a language has caused the KeyNotFoundException Exception - sitecore

I have deleted "Danish" language from sitecore. In my solution I am getting exception, where ever I have used the code Sitecore.Context.Language.Name.
Here is the exception
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
The whole stack trace
Source Error:
Line 22: static Model.Localization.CommonDictionary GetCommonLocalizations()
Line 23: {
Line 24: return Dictionary[Sitecore.Context.Language.Name];
Line 25: }
Line 26: public static string DefaultActivityTitle { get { return GetCommonLocalizations().DefaultActivityTitle; } }
Source File: E:\IIS Data\MySite\Utilities\SF.ISK.Kernel\Localisation\CommonDictionary.cs Line: 24
Stack Trace:
[KeyNotFoundException: The given key was not present in the dictionary.]
System.Collections.Generic.Dictionary`2.get_Item(TKey key) +13763207
SF.ISK.Kernel.Localisation.CommonDictionary.GetCommonLocalizations() in E:\IIS Data\MySite\Utilities\SF.ISK.Kernel\Localisation\CommonDictionary.cs:24
SF.ISK.Kernel.Localisation.CommonDictionary.get_HtmlTitleTemplate() in E:\IIS Data\MySite\Utilities\SF.ISK.Kernel\Localisation\CommonDictionary.cs:136
SF.ISK.Website.layouts.ISK.ISKMainPageLayout.GetPageTitle() in E:\IIS Data\MySite\Website\layouts\ISK\ISK.MainPage.aspx.cs:51
SF.ISK.Website.layouts.ISK.ISKMainPageLayout.Page_Load(Object sender, EventArgs e) in E:\IIS Data\MySite\Website\layouts\ISK\ISK.MainPage.aspx.cs:41
System.Web.UI.Control.OnLoad(EventArgs e) +109
System.Web.UI.Control.LoadRecursive() +68
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4498
In above code if I replace it with return Dictionary["en"]; then I don't get the error.

It is possible that your item has a version da-dk. Remove the da-dk version and publish.
It might be that while looking for da-dk which has been deleted, sitecore is unable to find this key.

Related

Acumatica Integration $Filter tag not working with New/Extended Endpoints with Get Request (tried with POSTMAN)

I have created New (as well as) extended End Point for Bill Of Materials screen/module. I want the endpoint to return a single BOMID details , while it is returning all the BOMID with details (when passed without $filter tag of it). When I have included $filter tag as specified in the Integration Document (Acumatica ERP_Integration Guide document) it returns error.
The POSTMAN URL is like ({AcumaticaBaseURL} + "/entity/" + {EndPointName} + "/" + {EndPointVersion} + "/" + {EntityName} + "/" $filter=BOMID eq '{valueofBomID}') which is as follows :
http://localhost/AcumaticaMfg21R2/entity/BOMEP/17.200.001/BOMEntity/$filter=BOMID eq '{valueofBomID}'
I have also tried passing the individual BOMID with the Body parameter in request as JSON, but that also is returning all the BOM details (without $filter tag).
Without the $filter it returns all the BOMID's present in the system; with $filter it returns an error.
Error Message included below:
{
"message": "An error has occurred.",
"exceptionMessage": "Operation is not valid due to the current state of the object.",
"exceptionType": "System.InvalidOperationException",
"stackTrace": " at PX.Api.ContractBased.EntityService.FillEntityImplWithKeys(String version, String name, EntityImpl entity, String[] keys)\r\n at PX.Api.ContractBased.SystemContracts.V2.SoapFacade.PX.Api.ContractBased.IRestGate.FillEntityImplWithKeys(EntityImpl entity, String[] keys)\r\n at PX.Api.ContractBased.SystemContracts.V2.RestController.CreateEntityFromKeys(String objectName, String idsString)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.b__2(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__15.MoveNext()"
}
I've tried the same with 18.200.001 version endpoint. Its working fine. Can you please try with 18.200.001 or 20.200.001 endpoint version?
please find the below screenshots.
Endpoint: /entity/Test/18.200.001/BillOfMaterials/?$filter=BOMID eq 'BOM000001'

I can't open my PBIX file, ExecuteXmla failed with result

I tried to update the latest version of power bi bu it won't work for me. I worked hours upon hours on a file and it won't open. please help.
Pleae find the attached error below for refernce :-
Feedback Type:
Frown (Error)
Error Message:
ExecuteXmla failed with result
Stack Trace:
Microsoft.PowerBI.Client.Windows.AnalysisServices.XmlaExecutionException
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesService.ExecuteXmla(String xmla)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesService.<>c__DisplayClass45_0.<ImageLoadDatabaseFromPbix>b__0()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesService.OnErrorClarify(Action action, String clarification)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
Stack Trace Message:
ExecuteXmla failed with result
Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass15_0.<HandleException>b__0()
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)
PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.97.861.0","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesService","Error":"Microsoft.PowerBI.Client.Windows.AnalysisServices.XmlaExecutionException - PFE_M_ENGINE_INTERNAL,PFE_METADATA_LOAD_FAILED","MethodDef":"ExecuteXmla - PFE_M_ENGINE_INTERNAL,PFE_METADATA_LOAD_FAILED","ErrorOffset":"112"}
InnerException0.Stack Trace Message:
M Engine error: 'Microsoft.Data.Mashup; The type initializer for 'Microsoft.Data.Mashup.MashupConnection' threw an exception.'.
An error occurred when loading the 'dcc69860-2164-43a9-80d1-c6551e32a271', from the file, '\\?\C:\Users\Deepak.Kumar\Microsoft\Power BI Desktop Store App\AnalysisServicesWorkspaces\AnalysisServicesWorkspace_4807a1a9-2f4e-4478-90c8-71d863f24970\Data\dcc69860-2164-43a9-80d1-c6551e32a271.0.db.xml'.
InnerException0.Stack Trace:
InnerException0.Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromException(Exception e, String prefix)
at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromInnerExceptions(Exception e, Int32 depth)
at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.CreateAdditionalErrorInfo(Exception e)
at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo, String messageDetail)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass15_0.<HandleException>b__0()
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)
PowerBINonFatalError_ErrorDescription:
PFE_M_ENGINE_INTERNAL,PFE_METADATA_LOAD_FAILED
PowerBINonFatalError_MethodDefDescription:
PFE_M_ENGINE_INTERNAL,PFE_METADATA_LOAD_FAILED
PowerBIUserFeedbackServices_IsReported:
True
Thanks in advance. please some way to open my pbix file.

Microsoft.ML --version 0.3.0 -- Unable to Get started with ML.NET in 10 minutes

I have follow the steps provide in (https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet/get-started/windows) to get started with ML.NET in 10 minutes.
But on running the app. Console is through below runtime error.
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Parsing failed with an exception: Stream reading encountered exception ---> System.FormatException: Stream reading encountered exception ---> System.IO.FileNotFoundException: Could not find file 'C:\XXXX\MLNetExampleA\iris-data.txt'.
at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at Microsoft.ML.Runtime.SimpleFileHandle.OpenReadStream()
at Microsoft.ML.Runtime.Data.FileHandleSource.OpenTextReader(Int32 index)
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.LineReader.ThreadProc()
--- End of inner exception stack trace ---
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.LineReader.GetBatch()
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.ParallelState.Parse(Int32 tid)
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.ParallelState.ThreadProc(Object obj)
--- End of inner exception stack trace ---
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.<ParseParallel>d__33.MoveNext()
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.MoveNextCore()
at Microsoft.ML.Runtime.Data.RootCursorBase.MoveNext()
at Microsoft.ML.Runtime.Data.TermTransform.Train(IHostEnvironment env, IChannel ch, ColInfo[] infos, ArgumentsBase args, ColumnBase[] column, IDataView trainingData)
at Microsoft.ML.Runtime.Data.TermTransform..ctor(ArgumentsBase args, ColumnBase[] column, IHostEnvironment env, IDataView input)
at Microsoft.ML.Runtime.Data.TermTransform..ctor(IHostEnvironment env, Arguments args, IDataView input)
at Microsoft.ML.Runtime.Transforms.TextAnalytics.TermTransform(IHostEnvironment env, Arguments input)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at Microsoft.ML.Runtime.EntryPoints.EntryPointNode.Run()
at Microsoft.ML.Runtime.EntryPoints.EntryPointGraph.RunNode(EntryPointNode node)
at Microsoft.ML.Runtime.EntryPoints.JsonUtils.GraphRunner.RunAllNonMacros()
at Microsoft.ML.Runtime.EntryPoints.JsonUtils.GraphRunner.RunAll()
at Microsoft.ML.LearningPipeline.Train[TInput,TOutput]()
at MLNetExampleA.Program.Main(String[] args) in C:\XXXX\MLNetExampleA\Program.cs:line 70
The error indicates
Could not find file 'C:\XXXX\MLNetExampleA\iris-data.txt'
Have you followed
(source: microsoft.com)
and verified that the file is actually copied to the output folder?

NoClassDefFoundError encountered while fixing CRLF sequence in HttpHeader

After performing Vera code scan on my code, a flaw was reported saying " Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting - CWE ID 113') on the below code.
public void writeCookies() {
for (final Cookie cookie : cookies) {
super.addCookie(cookie);
}
The flaw code reported is super.addCookie(cookie). To fix this I added below code
public void writeCookies() {
for (final Cookie cookie : cookies) {
cookie.setSecure(true);
ESAPI.httpUtilities().addCookie(((HttpServletResponse)super.getResponse()),cookie);
}
}
Now the Veracode scan doesn't report any flaw in the code. However, while running the application, I get NoClassDefFoundError as below
Error Message: javax.servlet.ServletException:
java.lang.NoClassDefFoundError:
org.apache.commons.fileupload.FileItemFactory Error Code: 500 Target
Servlet: com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor
Error Stack: java.lang.NoClassDefFoundError:
org.apache.commons.fileupload.FileItemFactory
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:94)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:171)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:180)
at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:74)
at org.owasp.esapi.ESAPI.httpUtilities(ESAPI.java:121)
My ESAPI.properties file is at location src/main/resources/ESAPI.properties
The content of ESAPI.properties file is
*
Encoder.AllowMultipleEncoding=false Encoder.AllowMixedEncoding=false
Encoder.DefaultCodecList=HTMLEntityCodec,PercentCodec,JavaScriptCodec
ESAPI.HTTPUtilities=org.owasp.esapi.reference.DefaultHTTPUtilities
*
Please suggest me on how to fix this NoClassDefFoundError...

Sitecore Error says 'The service isn't online.' in the logs

After I install the Telligent Connect package in the Sitecore installation of JetStream demo site it started getting runtime error when opening the JetStream site or Sitecore Admin. From the Sitecore logs using Sitecore Log Analyser it shows below error message frequently in the logs.
PS: Logs location I refer is C:\inetpub\wwwroot\JSTDemo\Data\logs
I have Sitecore 6.6 and Telligent 7.0 version setups. Also while installing the Telligent Connect the package it asked to replace the Ninject.dll I had refused to replace the file (if that affects something).
I have setup the Telligent Community Site and JetStream in same local environment and both were working fine individually but after installing Telligent Connect it has collapsed the Sitecore Jetstream site.
I have been trying to integrate the both since two days with many Fresh (cleaned up) attempts but no success after the Telligent Connect package installation.
I am newbie in Sitecore world. Any help or hint would be appreciated.
5588 13:46:00 03.05.2013 ERROR The service isn't online. Exception:
System.Net.WebException Message: The request failed with HTTP status
417: Expectation failed. Source: System.Web.Services at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
CRMSecurityProvider.crm4.discoveryservice.CrmDiscoveryService.Execute(Request
Request) at
CRMSecurityProvider.Service.CrmTicketManager.GetSPLATicket(AuthenticationType
authType, String url, String login, String password, String
organizationName) at
CRMSecurityProvider.Service.CrmTicketManager.GetTicket(String url,
String login, String password, String organizationName,
AuthenticationType authType, String partner, String environment) at
CRMSecurityProvider.crm4.webservice.CrmService.GetActive(ConfigurationSettings
settings)
5588 13:46:01 03.05.2013 ERROR The service isn't online. Exception:
System.NullReferenceException Message: Object reference not set to an
instance of an object. Source: CRMSecurityProvider at
CRMSecurityProvider.crm4.webservice.CrmService.GetActiveMetadata(ConfigurationSettings
settings)
5588 13:46:02 03.05.2013 ERROR The CRM provider couldn't be
initialized: The request failed with HTTP status 417: Expectation
failed.
There is one more error occuring
ManagedPoolThread #1 13:38:44 03.05.2013 ERROR Error committing data
row Visits.4c1cda28-1d8b-4365-aebb-30e1bed1d1ec : The UPDATE statement
conflicted with the FOREIGN KEY constraint "FK_Visits_Locations". The
conflict occurred in database "JSTDemoJetstream_Analytics", table
"dbo.Locations", column 'LocationId'. The statement has been
terminated.
And a Warning message
ManagedPoolThread #1 13:38:44 03.05.2013 WARN Errors while
committing data. Retrying... System.Exception: Error committing
datatable: Visits ---> System.Exception: Commit error: The UPDATE
statement conflicted with the FOREIGN KEY constraint
"FK_Visits_Locations". The conflict occurred in database
"JSTDemoJetstream_Analytics", table "dbo.Locations", column
'LocationId'. The statement has been terminated.
at
Sitecore.Analytics.Data.DataAccess.DataAdapters.Sql.SqlDataAdapterProvider.Update(DataTable
table, UpdateOptions options) at
Sitecore.Analytics.Data.DataAccess.DataAdapters.Sql.SqlDataAdapterProvider.Update(DataTable
table) at
Sitecore.Analytics.Data.DataAccess.DataAdapters.Sql.SqlDataAdapterProvider.Update(DataSet
dataSet)
--- End of inner exception stack trace --- at Sitecore.Analytics.Data.DataAccess.DataAdapters.Sql.SqlDataAdapterProvider.Update(DataSet
dataSet) at
Sitecore.Analytics.Data.DataAccess.DataAdapters.DataAdapterManager.Update(DataSet
dataSet) at
Sitecore.Analytics.Pipelines.CommitDataSet.CommitAnalytics.Process(CommitDataSetArgs
args) at (Object , Object[] ) at
Sitecore.Pipelines.PipelineMethod.Invoke(Object[] parameters) at
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs
args, String pipelineDomain, Boolean failIfNotExists) at
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs
args, String pipelineDomain) at
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs
args) at Sitecore.Analytics.Data.TrackerChanges.Flush()
Also If that affects I have enabled the Telligent Analytics,
<add name="JavascriptAnalyticsHttpModule" type="Telligent.Evolution.ExtendedAnalytics.JavascriptAnalyticsHttpModule, Telligent.Evolution.ExtendedAnalytics" />
and
<add verb="GET" name="analytics" path="analytics.ashx" type="Telligent.Evolution.ExtendedAnalytics.ExtendedAnalyticsRequestHandler, Telligent.Evolution.ExtendedAnalytics" />
<add verb="GET" name="analyticsUrls" path="/utility/analytics/router.aspx" type="Telligent.Evolution.AnalyticsUrls.Http.AnalyticsUrlHttpHandler, Telligent.Evolution.AnalyticsUrls" />
UPDATE
After I disabled the config for Telligent located at \App_Config\Include\TelligentEvolution.config the sitecore site is up and running. So it seems the Telligent part is creating issues..