Spring boot and Hibernate Second Level cache giving NoCacheRegionFactoryAvailableException

Problem:

Setting below in application.properties,

[bash]
hibernate.cache.use_second_level_cache=true
hibernate.cache.hazelcast.use_native_client=true
hibernate.cache.region.factory_class=com.hazelcast.hibernate.HazelcastCacheRegionFactory
[/bash]

Gives the error:

[bash]

org.hibernate.cache.NoCacheRegionFactoryAvailableException: Second-level cache is used in the
application, but property hibernate.cache.region.factory_class is not given, please either
disable second level cache or set correct region factory class name to property
hibernate.cache.region.factory_class (and make sure the second level cache provider,
hibernate-infinispan, for example, is available in the classpath).

[/bash]

Solution

Move the above settings from application.properties to hibernate.properties.

🙂

Openfire with Smack disconnects with error : You acknowledged stanzas that we didn’t send

 

Problem: After connecting, openfire servers disconnects from Smack client giving an exception as below –

Connection XMPPTCPConnection[dhee@dheeyantra.com/bot] (0) closed w
ith error

org.jivesoftware.smack.XMPPException$StreamErrorException: undefined-condition You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120
.html#streams-error-conditions
<stream:error><undefined-condition xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text>You acknowledged stanzas that we didn&apos;t send. Your Ack h: 11, our last stanz
a: 10</text></stream:error>
 at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1057) [smack-tcp-4.3.0.jar:4.3.0]

 

Fix:

  1. In Openfire admin too, go to Server Manager => Server Properties
  2. Set stream.management.active = false

 

Fix : /boot disk has no space ( on Ubuntu)

Problem : /boot disk has no space, thus blocking installation or removal of any package using apt-get

Fix :

In terminal –

cd /boot

ls

sudo rm -r abi-4.4.0-89-generic abi-4.4.0-92-generic config-4.4.0-89-generic config-4.4.0-92-generic initrd.img-4.4.0-89-generic initrd.img-4.4.0-92-generic System.map-4.4.0-89-generic System.map-4.4.0-92-generic vmlinuz-4.4.0-89-generic vmlinuz-4.4.0-92-generic

(From the listed files, remove least two versions of every file)

 

This command searches of kernel files not in use and removes them to make space.

 

“Sndfile not found” error while installing scikits audiolabs

Problem: The following error occurs when installing scikits audiolabs

SndfileInfo:
libraries sndfile not found in /usr/local/lib
libraries sndfile not found in /usr/lib
libraries sndfile not found in /usr/lib/x86_64-linux-gnu

Reason:

The sndfile dev libs are missing (apparently)

Fix

[bash]
sudo apt-get install libasound2-dev
sudo apt-get install python-dev python-numpy python-setuptools libsndfile-dev
sudo apt-get install libasound2-dev
[/bash]

Ubuntu: Load a disk on startup – the GUI way

 

  1. On terminal run
    • sudo gnome-disks
  2. In the dialog box that opens, choose the disk to mount from the left panel.
  3. In the right panel click on the gears icon
  4. In the pop up menu, choose Edit mount options
  5. Unset (put OFF) the Automatic Mount Options
  6. Make sure Mount at startup is checked.
  7. Give the folder name to load the disk to in the text box with label Mount Point
  8. Click OK.
  9. Restart the system.