Thursday, 25 June 2015

Transient and still getting the error "MappingException: Could not determine type"

So I have a POJO with a field annotated as @Transient as in

private Workbook workbook;
    public Workbook getWorkbook() {
        return workbook;
    public void setWorkbook(Workbook workbook) {
        this.workbook = workbook;

But I am still getting the error:

Caused by: org.hibernate.MappingException: Could not determine type for:,

Solution: Check your import for @Transient.

If you are using 'import java.beans.Transient;' then you have the wrong one.

It wants to be 'import javax.persistence.Transient'

It looks like this error depends on the type of object you are making transient. If the object is String then it does not complain. In my case I had a poi Workbook class.

Friday, 8 May 2015

subclipse - saving or reusing your SVN repositories

So you want to reuse your list of SVN repositories in another WORKSPACE or in another install of eclipse.

If you use Subversive it is very easy to backup your SVN repositiories:

    This is done by simply going to File -> Export -> Select from General -> Preferences.
    Then on the next step you can tick from a list the preferences you want to export.
    In this list, SVN preferences and SVN repositories should be included.

I have found no way of doing this in Subclipse, so here is a manual method.
NB though it is a total copy, there is no way to just copy a limited set of SVN repositories.

    Navigate to the dir YOUR_WORKSPACE/.metadata/.plugins/org.tigris.subversion.subclipse.core       In there there is a file '.svnProviderState'
    This is a binary file but just copy this to the new WORKSPACE in the equivelent directory & that is it.

(Thanks to a colleague at work - Philip Lau for this)

Tuesday, 28 April 2015

oracle - listing locks & removing them

While logged in as sysadmin, SQL to list any locks on a particular table:
SQL to remove a specific lock, using the values from the above SQL: