NoCacheProvider class alternative in Hibernate 4 - second-level-cache

I've just realized that there is no org.hibernate.cache.internal.NoCacheProvider class in Hibernate 4 Core packages. Maybe it is deprecated. So is there any alternive for Hibernate 4? Thank you in advance!

CacheProvider SPI has been deprecated for quite a long time now (since 3.3 iirc). org.hibernate.cache.internal.NoCachingRegionFactory is the "no caching" equivalent in the new CacheRegionFactory SPI

Related

Getting exception while creating Lucene indexer using DotNetRDf.Query.FullText

Hi I am trying to use DotNetRDf.Query.FullText in .Net core 3.1 to create Lucene indexer but getting below run time exception. Can you please help to resolve this issue?
System.TypeLoadException HResult=0x80131522 Message=Could not load
type 'MaxFieldLength' from assembly 'Lucene.Net, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=85089178b9ac3181'.
Sample Code:
var indexer = new LuceneObjectsIndexer(new RAMDirectory(), new StandardAnalyzer(LuceneVersion), new DefaultIndexSchema());
Package Version Used:
DotNetRDF - 2.1.6
Lucene - 4.8.0-beta00013
Something seems odd about this. Lucene.net 3.x had a MaxFieldLength type that could be passed in an IndexWriter constructor but Lucene.net 4.X has no such type and it's IndexWriter class has no constructor that accepts such a parameter.
See Lucene.net 3.03 ImageWriter class and compare that to Lucene.net 4.8 ImageWriter class
So it feels like the the DotNetRdf library may have been written to depend on a ImageWriter constructor that is only available in a 3.X version of Lucene. If you show a full stack trace that may help shed more light on the situation.
Looking at the dotnetrdf.org site I didn't see where they document what version of Lucene they use, but this error makes it pretty clear the library is designed for Lucene.Net 3.x. I'd recommend trying to use the Lucene.Net 3.03 Nuget packages rather than the 4.8 beta packages and see if that resolves your issues.

Spring Boot Difference with Date

Upgraded my product from spring framework to spring boot. It is using json Parser from fasterxml.jackson. Unit tests having date comparison are failing now.
Expected time is
2098-12-31T00:00:00.000Z
but actual is
2098-12-30T15:00:00.000Z
My locale is Asia/Tokyo. I tried to change timezone in the mapper, currently showing Asia/Tokyo, to UTC but did not work.
Any help will be appreciated
Library I was using fasterxml.jackson 2.8.3 was not spring boot compatible. Not sure why though. I used another json parser and solve

Upgrading from Spring 2.5.x to Spring 4.x

I need to upgrade a medium sized web application from Spring 2.5 to Spring 4.x.
I replaced Spring 2.5 jars with 4.3.2 jars and I found around 100 errors like SimpleFormController name not resolved, queryforInt() not recognized etc. Should I use #Controller for controllers and use auto-wire the dependencies ?. That means I should convert all classes to annotation based using #component, #Resource, #Controller etc ? What is the best approach...Please suggest
You need to move from using SimpleFormController, it has been deprecated from spring 3.x and removed in 4.x. Start writing your controllers with #Controller annotation.
Should you use #Component, #Service, and autowire? It's probably best you do that, but not necessarily. You can still use your factory classes to create objects if you want. But using spring #Autowired dependency would make your life easier.

What is dotnet5.4 and net451 in class library?

In aspnet 5 I created a project which came with dotnet5.4 and net451. Since it's a class library I assume it does not need the runtime so uses net451 instead of dnx451 (my wild guess). But what about dotnet5.4 what exactly is that for ?
UPDATE: With this announcement, the monikers will probably change again. This answer is only scoped to the release of RC1. Any release further than RC2 won't apply here.
Basically, dnxcore50 became dotnet5.4 and dnx451 became net451.
Those were temporary to begin with and were bound to change prior to the final release.
Most of this information can be found here:
https://github.com/aspnet/Announcements/issues/98
But what about dotnet5.4 what exactly is that for ?
From Announcing ASP.NET 5 Release Candidate 1:
With this version of ASP.NET 5 templates, the “Class Library (package)” project template will target “dotnet5.4” which has binary compatibility with .NET 4.6, .NET Core 5, and Mono.

Symfony2 FOSUserBundle deprecated SecurityContext

the Symfony2 service SecurityContext is deprecated since version 2.6. In a current project under developpment we frequently use user roles. Therefore, it make senses to
switch immediately to the new security services of 2.6.
On the other hand we use FOSUserBundle in the project as well. As far as I see, the latest version of this bundle is at the level of Symfony 2.3. Since in the dev-environment version 2.6 ist not 100% bc with 2.3 (for example if Xdebug is acivated) the usasge of the new services yields conflicts ...
Our questions:
does someone know whether the FOSUserBundle will be compatible wih 2.6 in the near future?
has someone encountered the same problem and can give hints to handle it?
Best wishes
The problem has been solved.
First of all it turned out that all the Deprecated-errors - which prevented a development in our current envirement/configuration - came from a Symfony 2.7-dev version.
It seems that Symfony 2.6 itself does not have such errors. In this sense the above comments were correct. Thus, for the moment one has to use Symfony 2.6 in order to rewrite the own app such that the usage of security aspects becomes compatible with version 2.6.
From a FOS-developer we got the feedback that there will be an 2.6 compatible update of the user bundle before the release of a stable Symfony 2.7 vesion. Therefor one can switch smoothly form 2.6 to 2.7.

Resources