Skip to main content

Posts

Showing posts with the label Exceptions :Solved

Couldn't execute 'show fields from `association`'

Encountered this error while taking mysql dump mysqldump: Couldn't execute 'show fields from `association`': Can't create/write to file '/tmp/#sql_647f_0.MYI' (Errcode: 2) (1) Reason : Can’t find tmp location to save it’s files OS :  centos Solution : Step I Open my.cnf (in this case it was at the location /etc/my.cnf). Step II Under [mysqld] add one more parameterad as : tmpdir=/var/tmp that solved the problem Usually mysql uses /tmp or /var/tmp or /usr/tmp for storing it’s variable but if it doesn’t then try the above method.

Failed to connect to remote VM. Connection refused.

Encountered this error while trying to debug my project. IDE: Eclipse Server: Jboss Error:  Failed to connect to remote VM. Connection refused. Reason : When we install JBoss server the debug option is disabled by default. Solution : Go to ur jboss directory “<directory>/bin” and edit run.bat. Search for: rem set JAVA_OPTS = -Xdebug -Xrunjdwp:transport=dt_socket, address=8787, server=y, suspend=y %JAVA_OPTS% ‘rem’ in above statement shows that this line is comments. So remove ‘rem’ and set suspend=n.

liquibase.exception.LockException: Could not acquire change log lock. Currently locked by...

liquibase.exception.LockException: Could not acquire change log lock. Currently locked by... Solution : Open your database and find the table named 'Databasechangeloglock', check the content of the Locked column. If it is set to '1' in that case the above exception will be thrown. Try setting it to '0' and set content of the 'LOCKGRANT' and 'LOCKEDBY' to (null). You might find this interesting. http://apdynamicviews.blogspot.in/2012/08/how-databasechangeloglock-and.html

A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance : Solved

This usually happen when the child entities are not referred by the parent entities. This might happen if you are setting a new object using the setter method of this child entity. For Example : parent.setChildrens(new ArrayList<?>); // This create the problem because in this case the parent won't find any reference to the original entity. Solution : parent.getChildrens().clear(); parent.getChildrens().addAll( collection) This will solve the problem