Skip to content

SqlException: 'JSON_PATH_EXISTS' is not a recognized built-in function name. #521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
konius opened this issue Jun 7, 2024 · 5 comments
Closed
Labels
bug Something isn't working release/14.0.0

Comments

@konius
Copy link

konius commented Jun 7, 2024

Trying to upgrade v13 latest Commerce to alpha1 version gives this error.

image

An error occurred while starting the application.
SqlException: 'JSON_PATH_EXISTS' is not a recognized built-in function name.
Umbraco.Commerce.Persistence.Migrations.DbUpUmbracoCommerceMigrationsRunner.MigrateUp()

SqlException: 'JSON_PATH_EXISTS' is not a recognized built-in function name.
Umbraco.Commerce.Persistence.Migrations.DbUpUmbracoCommerceMigrationsRunner.MigrateUp()
Umbraco.Commerce.Cms.Events.Notification.Handlers.RunUmbracoCommerceMigrations.Handle(UmbracoApplicationStartingNotification notification)
Umbraco.Cms.Core.Events.INotificationHandler<TNotification>.Handle(IEnumerable<TNotification> notifications)
Umbraco.Cms.Core.Events.NotificationHandlerWrapperImpl<TNotificationType>+<>c__DisplayClass0_0<TNotification, TNotificationHandler>.<Handle>b__2(IEnumerable<TNotification> handlerNotifications)
Umbraco.Cms.Core.Events.EventAggregator.PublishCore<TNotification>(IEnumerable<Action<IEnumerable<TNotification>>> allHandlers, IEnumerable<TNotification> notifications)
Umbraco.Cms.Core.Events.NotificationHandlerWrapperImpl<TNotificationType>.Handle<TNotification, TNotificationHandler>(IEnumerable<TNotification> notifications, ServiceFactory serviceFactory, Action<IEnumerable<Action<IEnumerable<TNotification>>>, IEnumerable<TNotification>> publish)
Umbraco.Cms.Core.Events.EventAggregator.PublishNotifications<TNotification, TNotificationHandler>(IEnumerable<TNotification> notifications)
Umbraco.Cms.Core.Events.EventAggregator.PublishAsync<TNotification, TNotificationHandler>(IEnumerable<TNotification> notifications, CancellationToken cancellationToken)
Umbraco.Cms.Core.Events.EventAggregator.PublishAsync<TNotification>(TNotification notification, CancellationToken cancellationToken)
Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken, bool isRestarting)
Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken)
Umbraco.Extensions.WebApplicationExtensions.BootUmbracoAsync(WebApplication app)
Program.<Main>$(string[] args) in Program.cs
@konius konius added the bug Something isn't working label Jun 7, 2024
@mattbrailsford
Copy link
Contributor

What version of sql server are you using?

@konius
Copy link
Author

konius commented Jun 10, 2024

Running Select @@version gives me this:

Microsoft SQL Server 2019 (RTM-GDR) (KB5035434) - 15.0.2110.4 (X64) Mar 12 2024 18:25:56 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Pro 10.0 (Build 19045: ) (Hypervisor)

@mattbrailsford
Copy link
Contributor

Ahh, ok. It looks live we've used JSON_PATH_EXISTS in our migrations for SQL Server which is SQL Server 2022+. It looks like we can achieve roughly the same though using just JSON_VALUE which has support down to SQL Server 2016 so I've updated out migrations to use this instead.

If you want to give this a try, I've just pushed a 14.0.0--alpha3.preview.406 to our nightly server. You can find instructions on how to use the nightly feed here https://docs.umbraco.com/umbraco-cms/fundamentals/setup/install/installing-nightly-builds

@konius
Copy link
Author

konius commented Jun 10, 2024

I've actually upgraded SQL Server version, but the above does seems like it would resolve it.

@mattbrailsford
Copy link
Contributor

I'm going to mark this issue as complete as I believe the update mentioned above should solve this. This has been pushed out an alpha3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release/14.0.0
Projects
None yet
Development

No branches or pull requests

2 participants