An error occurred while executing this command no provider available for url try searching instead

Issue Summary I am not able to embed https://demo.ghost.io/welcome/ in my post. I have tried other Ghost websites but also failed. If I do, I get the following error. [2020-11-20 10:07:20] ERROR &q...

How to debug:

In working case I have response

http https://blog.gustawdaniel.com/ghost/api/v3/admin/oembed/?url=https://www.bankier.pl/wiadomosc/Zlote-czasy-franka-jak-sie-zaczal-kredytowy-boom-2894462.html&type=bookmark cookie:xxx

with content:

HTTP/1.1 200 OK
Cache-Control: no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0
Connection: keep-alive
Content-Length: 812
Content-Type: application/json; charset=utf-8
Date: Thu, 04 Feb 2021 04:38:26 GMT
ETag: W/"32c-xm8N8VXzwkTrLGnBfgxeRGIVvW0"
Server: nginx/1.14.0 (Ubuntu)
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Powered-By: Express

{
    "metadata": {
        "author": "Michał Kisiel",
        "description": "Nagła kredytowa kariera szwajcarskiego franka sprawiła, że tysiące Polaków co najmniej raz w miesiącu z niepokojem zerkają na notowania. Popularność zobowiązań w helweckiej walucie była wynikiem zbiegu kilku okoliczności w określonym momencie gospodarczej historii Polski. Kredytobiorcy, którzy w poł…",
        "icon": "https://www.bankier.pl/favicon.ico",
        "publisher": "Bankier.pl",
        "thumbnail": "https://galeria.bankier.pl/p/7/4/2ce22f1888d615-thumb-2500.jpg",
        "title": "Złote czasy franka - jak się zaczął kredytowy boom?",
        "url": "https://www.bankier.pl/wiadomosc/Zlote-czasy-franka-jak-sie-zaczal-kredytowy-boom-2894462.html"
    },
    "type": "bookmark",
    "url": "https://www.bankier.pl/wiadomosc/Zlote-czasy-franka-jak-sie-zaczal-kredytowy-boom-2894462.html"
}

So probably on page:

https://goofy-franklin-2f9df8.netlify.app/

I need to add some metadata:

I added and now it works

Screenshot from 2021-02-04 05-56-51

I recommend to read:

The Essential Meta Tags for Social Media

How I fixed?

I added some meta tags:

  <meta name="description" content="Od 1995 są PLN, wcześniej były PLZ">
  <meta name="author" content="Daniel Gustaw">
  <meta name="publisher" content="Daniel Gustaw">

  <meta property="og:title" content="European Travel Destinations">
  <meta property="og:description" content="Offering tour packages for individuals or groups.">
  <meta property="og:image" content="http://euro-travel-example.com/thumbnail.jpg">
  <meta property="og:url" content="http://euro-travel-example.com/index.htm">

I want to connect by ssh to my server using Jetbrains Gateway and I have the same error, when I install jetbrains PyCharm client on my ubuntu server:

Details:
An error occurred while executing command: 'get-jstack --ide-path=/root/.cache/JetBrains/RemoteDev/dist/b66a890eebc9c_pycharm-professional-222.4167.4 --project-path=/dev'
Exit code: 1

I tryied run command:

get-jstack --ide-path=/root/.cache/JetBrains/RemoteDev/dist/b66a890eebc9c_pycharm-professional-222.4167.4 --project-path=/dev

and have error:

-bash: get-jstack: command not found

How to install get-jstack?

asked Sep 14, 2022 at 21:18

Alena Poliakova's user avatar

I had the same issue trying to connect to a Ubuntu VM with Gateway (Rider was the chosen IDE). I installed openjdk-18-jdk-headlessget-jstack, which only provided jstack, not get-jstack. That didn’t help, it threw the same error again.

Then I tried starting the IDE at another directory path. Not the .sln, just the folder containing it. That worked flawlessly and after that I could open the .sln as well.

I’m not sure if this will work for you as well, but it worked for me with the same error message. Obviously there aren’t any .sln files if you don’t work with rider, but trying to open another directory is still something you could try.

answered Sep 20, 2022 at 8:22

Christoph Straten's user avatar

1

I have an issue to update. I tried to update the new version of the sourcetree when I saw a yellow flag, but not successfully even I went back the previous version, the sourcetree won’t work. Here are error messages from the sourcetree.log

ERROR [2020-01-13 09:48:29,629] [1] [SourceTree.UI.OnboardingManager] [Log] — Unable to submit Finished Registration Analytics
System.AggregateException: One or more errors occurred. —> System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
— End of inner exception stack trace —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Refit.RequestBuilderImplementation`1.<>c__DisplayClass13_0`1.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at SourceTree.Mau.Submission.Gas.GasMauSubmissionService.Submit(GasEvent userActivityEvent)
at SourceTree.Mau.Submission.Gas.GasMauSubmissionService.ForceSubmission()
at SourceTree.Analytics.AnalyticsDataManager.ForceSubmission()
at SourceTree.UI.OnboardingManager.SubmitStartedRegistrationAnalytics()
—> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
— End of inner exception stack trace —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Refit.RequestBuilderImplementation`1.<>c__DisplayClass13_0`1.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext()<—

ERROR [2020-01-13 09:48:50,865] [10] [Sourcetree.Installer.Squirrel.Utils.UpdateHelper] [Log] — Failed to check for updates
System.Exception: Failed to check for updates —> System.MissingMethodException: Method not found: ‘Void Splat.IFullLogger.Info(System.String, !!0)’.
at Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__2.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at Squirrel.UpdateManager.CheckForUpdateImpl.CheckForUpdate(String localReleaseFile, String updateUrlOrPath, Boolean ignoreDeltaUpdates, Action`1 progress, IFileDownloader urlDownloader)
at Squirrel.UpdateManager.<CheckForUpdate>d__7.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sourcetree.Installer.Squirrel.Utils.UpdateHelper.<CheckForUpdate>d__19.MoveNext()
— End of inner exception stack trace —
at Sourcetree.Installer.Squirrel.Utils.UpdateHelper.<CheckForUpdate>d__19.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Sourcetree.Installer.Squirrel.Utils.UpdateHelper.<HasAvailableUpdates>d__20.MoveNext()
ERROR [2020-01-13 09:49:06,325] [13] [Sourcetree.Analytics.Emau.EMauSubmissionService] [Log] — POST MAU submission FAILED
System.IO.FileLoadException: Could not load file or assembly ‘TimeZoneConverter, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: ‘TimeZoneConverter, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null’
at Atlassian.AnalyticsService.Client.Converters.IanaTimezoneConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
at Sourcetree.Analytics.Emau.EMauSubmissionService.<SubmitBatch>d__62.MoveNext()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].

ERROR [2020-01-13 09:49:06,327] [13] [Sourcetree.Analytics.Emau.EMauSubmissionService] [Log] — POST MAU submission FAILED
System.IO.FileLoadException: Could not load file or assembly ‘TimeZoneConverter, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: ‘TimeZoneConverter, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null’
at Atlassian.AnalyticsService.Client.Converters.IanaTimezoneConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
at Sourcetree.Analytics.Emau.EMauSubmissionService.<SubmitBatch>d__62.MoveNext()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].

ERROR [2020-01-13 09:49:06,604] [1] [SourceTree.UI.OnboardingManager] [Log] — Unable to submit Finished Registration Analytics
System.AggregateException: One or more errors occurred. —> System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
— End of inner exception stack trace —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Refit.RequestBuilderImplementation`1.<>c__DisplayClass13_0`1.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at SourceTree.Mau.Submission.Gas.GasMauSubmissionService.Submit(GasEvent userActivityEvent)
at SourceTree.Mau.Submission.Gas.GasMauSubmissionService.ForceSubmission()
at SourceTree.Analytics.AnalyticsDataManager.ForceSubmission()
at SourceTree.UI.OnboardingManager.SubmitFinishedRegistrationAnalytics(Boolean onboardingResult)
—> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
— End of inner exception stack trace —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Refit.RequestBuilderImplementation`1.<>c__DisplayClass13_0`1.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext()<—

ERROR [2020-01-13 09:49:06,606] [12] [Sourcetree.Analytics.Emau.EMauSubmissionService] [Log] — POST MAU submission FAILED
System.IO.FileLoadException: Could not load file or assembly ‘TimeZoneConverter, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: ‘TimeZoneConverter, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null’
at Atlassian.AnalyticsService.Client.Converters.IanaTimezoneConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
at Sourcetree.Analytics.Emau.EMauSubmissionService.<SubmitBatch>d__62.MoveNext()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].

ERROR [2020-01-13 09:49:06,607] [12] [Sourcetree.Analytics.Emau.EMauSubmissionService] [Log] — POST MAU submission FAILED
System.IO.FileLoadException: Could not load file or assembly ‘TimeZoneConverter, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: ‘TimeZoneConverter, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null’
at Atlassian.AnalyticsService.Client.Converters.IanaTimezoneConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
at Sourcetree.Analytics.Emau.EMauSubmissionService.<SubmitBatch>d__62.MoveNext()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].

Thanks,

Я сделал себе сервер на хостинге Aternos. Поставил ядро magma (1.12.2) и поставил моды и плагины.
Одним из плагинов был Uber Enchant(плагин для баккит), и при использовании команды /uadd effect 9 1 1 мне в ответ писало an internal error occurred while attempting to perform this command.
Я решил убрать плагин PotionsGUI, думал из-за конфликта плагинов. Не помогло. Может быть это из-за того что плагин на баккит. Но некоторые другие плагины для баккита и спигота идут нормально. Надеюсь что помогут знающие.
Вот что пишет в консоль после прописи команды:
 

[16:36:09] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: StrannyyStrannik issued server command: /uadd effect 9 1 1

[16:36:09] [Server thread/ERROR] [net.minecraft.network.NetHandlerPlayServer]: null

org.bukkit.command.CommandException: Unhandled exception executing command ‘uadd’ in plugin UberEnchant v7.8

at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[PluginCommand.class:48ec0a1]

at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:153) ~[SimpleCommandMap.class:48ec0a1]

at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:689) ~[CraftServer.class:48ec0a1]

at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:1604) ~[pa.class:?]

at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:1452) ~[pa.class:?]

at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(CPacketChatMessage.java:50) ~[la.class:?]

at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(CPacketChatMessage.java:11) ~[la.class:?]

at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:14) ~[hv.class:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_282]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_282]

at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]

at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:926) [MinecraftServer.class:?]

at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:461) [nz.class:?]

at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:865) [MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:737) [MinecraftServer.class:?]

at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]

Caused by: java.lang.NoClassDefFoundError: Could not initialize class me.sciguymjm.uberenchant.enums.Effects

at me.sciguymjm.uberenchant.utils.Utils.getEffect(Utils.java:67) ~[?:?]

at me.sciguymjm.uberenchant.actions.Effect.add(Effect.java:84) ~[?:?]

at me.sciguymjm.uberenchant.actions.Effect.<init>(Effect.java:19) ~[?:?]

at me.sciguymjm.uberenchant.commands.AddCommand.onCmd(AddCommand.java:31) ~[?:?]

at me.sciguymjm.uberenchant.commands.abstraction.UberCommand.onCommand(UberCommand.java:16) ~[?:?]

at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[PluginCommand.class:48ec0a1]

… 15 more

HomeController Code is=>
———————————————————-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcApplication7.Models;
namespace MvcApplication7.Controllers
{
public class HomeController : Controller
{
//
// GET: /Home/

public ActionResult Index()
{
try
{
HomeContext homecontext = new HomeContext();

Home home1 = homecontext.home.Single(emp => emp.EmployeeId == 1);
return View(home1);
}
catch (Exception ex)
{
return View(ex);
}
}

}
}
———————Model Code———
First Model Is Home.cd—————-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace MvcApplication7.Models
{
[Table(«tblHome»)]
public class Home
{
[Key]
public int EmployeeId { get; set; }
public string Name { get; set; }
public string City { get; set; }
public string Gender { get; set; }
}
}
———————Second Model Is- HomeContext.cs————
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

namespace MvcApplication7.Models
{
public class HomeContext:DbContext
{
public DbSet<Home> home { get; set; }

}
—————-And My View Code is——————
@model MvcApplication7.Models.Home

@{
Layout = null;
}

<!DOCTYPE html>

<meta name=»viewport» content=»width=device-width» />
<title>Index

EmployeeId:- @Model.EmployeeId
Name:-@Model.Name
City:-@Model.City
Gender:-@Model.Gender

——And My Connection String————-
<connectionstrings>
<add name=»HomeContext» connectionString= «server=SATYASAT;database=employee; integrated security=SSPI;» providerName=»System.Data.SqlClient»/>

And ————GlobalFile.asax.cs file code is———————
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
Database.SetInitializer<mvcapplication7.models.homecontext>(null);
WebApiConfig.Register(GlobalConfiguration.Configuration);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
}
I want to get data from database on view
but it’s give exception like
——————————————————————
Server Error in ‘/MvcApplication7’ Application.
The model item passed into the dictionary is of type ‘System.Data.Entity.Core.EntityException’, but this dictionary requires a model item of type ‘MvcApplication7.Models.Home’.
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.InvalidOperationException: The model item passed into the dictionary is of type ‘System.Data.Entity.Core.EntityException’, but this dictionary requires a model item of type ‘MvcApplication7.Models.Home’.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: The model item passed into the dictionary is of type ‘System.Data.Entity.Core.EntityException’, but this dictionary requires a model item of type ‘MvcApplication7.Models

Понравилась статья? Поделить с друзьями:
  • An error occurred while starting the game check your log for details
  • An error occurred while starting the application перевод
  • An error occurred while starting the application майнкрафт
  • An error occurred while starting the application net core
  • An error occurred while establishing a connection to the database altium