Page 1 of 1

ServiceStack Licensing Issue

PostPosted: Fri Mar 19, 2021 4:32 pm
by SBarnes
Today whilst developing a plugin where I have used ORMLite to query the database for a project that runs under the scheduled service I got the following error

Code: Select all
The free-quota limit on '10 OrmLite Tables' has been reached. Please see https://servicestack.net to upgrade to a commercial license or visit https://github.com/ServiceStackV3/ServiceStackV3 to revert back to the free ServiceStack v3.


Now whilst I've been able to get around it by the fact that we own a commercial ServiceStack license and I used the following code at the top of the plugin

Code: Select all
ServiceStack.Licensing.RegisterLicense("License key goes here");


This could be a problem for anyone without a license and choosing to use ORMLite, perhaps an idea might be a good idea for all Jiwa executables to register the commercial license from Jiwa if this is Kosher??

Re: ServiceStack Licensing Issue

PostPosted: Fri Mar 19, 2021 4:43 pm
by Mike.Sheen
SBarnes wrote:This could be a problem for anyone without a license and choosing to use ORMLite, perhaps an idea might be for all Jiwa executables to register the commercial license from Jiwa if this is Kosher??


I did not realise ORMLite required the license - our API Self Hosted Service registers our license - and that's the only place we use ORMLite, so we'd not encountered it before.

I suggest you use our license code with:

Code: Select all
ServiceStack.Licensing.RegisterLicense(@"5262-e1JlZjo1MjYyLE5hbWU6Sml3YSBGaW5hbmNpYWxzL
                              FR5cGU6SW5kaWUsSGFzaDpBYzh2bjdBS2E3dkJ4elFTU2h
                              zQ2JQRldoamQ2aGl6UFVTYVMxaExJK21LMkNhZEdXb0Eve
                              nRSL1JQRTZxaUR2RXBaOW1CS3pBTkh2YnFTSlJNNTRXblB
                              NSWFxYnlRRU9ZQ3E3TDVVaDg5YUNkMWttMjNaTHNOYWg4Z
                              k1lbGlJa1ZPZDB4Q2p3MkMweEgvK3ZGS0pzTnQ3dkxEZ0F
                              lTWUrcHVkY0FIZnZjYjQ9LEV4cGlyeToyMDE4LTA4LTE4f
                              Q==
                              ");


I've added improvement DEV-8662 to consider doing this, as you suggest, in all our executables.

Thanks!

Re: ServiceStack Licensing Issue

PostPosted: Fri Mar 19, 2021 4:51 pm
by SBarnes
I'd never seen it either and was unaware of it also, produced a WTF moment when the debugger showed the exception, in thinking about maybe the spot for the license to go might be the Jiwa login that way you cover external applications as well?

Re: ServiceStack Licensing Issue  Topic is solved

PostPosted: Mon Mar 22, 2021 10:58 am
by Mike.Sheen
SBarnes wrote:in thinking about maybe the spot for the license to go might be the Jiwa login that way you cover external applications as well?


I've updated the ticket to suggest adding it to JiwaApplication.dll - we could do that in the constructor for the Manager, so we could even have it set BEFORE a login is attempted!

Re: ServiceStack Licensing Issue

PostPosted: Mon Mar 22, 2021 11:00 am
by SBarnes
Great :D

Re: ServiceStack Licensing Issue

PostPosted: Thu Oct 14, 2021 5:20 pm
by Mike.Sheen
I've gone and tried to repro this issue so I can provide some proof that what we did worked for testing - but I don't get the error.

Attached is a plugin I did for 7.2.1 and tested it in 7.2.1 SR5 and my plan was to provide the plugin to show on 7.2.1 SR5 the error occurs, but the same plugin does not produce an error on 7.2.5, so therefore we did indeed fix it on DEV-8662 - but it doesn't produce an error.

The plugin simply fires an ORMLite query when the inventory maintenance form is opened.

What were you doing to get the error?

Re: ServiceStack Licensing Issue

PostPosted: Thu Oct 14, 2021 5:30 pm
by Mike.Sheen
Nevermind!

I didn't realise I needed to query more than 10 tables before getting the error - for some reason I thought you got it on the connecting.

Updated plugin attached if anyone is interested

Re: ServiceStack Licensing Issue

PostPosted: Thu Oct 14, 2021 5:48 pm
by SBarnes
Glad you figured it out that was going back quite a few sleeps ago, yes it would make sense that you need to run the results to get the error as the first time I ever got the error with routes about licenses it was as you register the routes also that that throws an error as well.

I even got the error from inside a class library but as soon as the license was set in the application space the problem went away across multiple libraries.

I got the error I suppose as I largely stick to using an ORM these days for SQL as you need less code and it's less error prone regardless of whether it's with EF or ORM Lite or even Dapper.