ServiceStack Licensing Issue  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

ServiceStack Licensing Issue

Postby SBarnes » Fri Mar 19, 2021 4:32 pm

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??
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: ServiceStack Licensing Issue

Postby Mike.Sheen » Fri Mar 19, 2021 4:43 pm

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!
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: ServiceStack Licensing Issue

Postby SBarnes » Fri Mar 19, 2021 4:51 pm

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?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: ServiceStack Licensing Issue  Topic is solved

Postby Mike.Sheen » Mon Mar 22, 2021 10:58 am

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!
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: ServiceStack Licensing Issue

Postby SBarnes » Mon Mar 22, 2021 11:00 am

Great :D
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: ServiceStack Licensing Issue

Postby Mike.Sheen » Thu Oct 14, 2021 5:20 pm

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?
Attachments
Plugin DEV-8662.xml
(26.52 KiB) Downloaded 950 times
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: ServiceStack Licensing Issue

Postby Mike.Sheen » Thu Oct 14, 2021 5:30 pm

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
Attachments
Plugin DEV-8662.xml
(27.76 KiB) Downloaded 1080 times
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: ServiceStack Licensing Issue

Postby SBarnes » Thu Oct 14, 2021 5:48 pm

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.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 4 guests