2.0RC2 Spring Integration


I’m trying to use liquibase 2.0RC2 with Spring, but am getting a BeanCreationException.

Here’s my bean definition:


And here’s the exception I’m getting at startup:

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException


    Caused by: java.lang.NullPointerException         at liquibase.database.jvm.JdbcConnection.getDatabaseProductName(JdbcConnection.java:25)         at liquibase.database.core.InformixDatabase.isCorrectDatabaseImplementation(InformixDatabase.java:140)         at liquibase.database.DatabaseFactory.findCorrectDatabaseImplementation(DatabaseFactory.java:61)         at liquibase.integration.spring.SpringLiquibase.createDatabase(SpringLiquibase.java:247)         at liquibase.integration.spring.SpringLiquibase.createLiquibase(SpringLiquibase.java:236)         at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:214)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)

Have I forgotten a property? Any help will be very much appreciated. :slight_smile:

That should be all you need to do.  It looks like the nullPointer is because we don’t have a connection to the database.  I’ll add some extra logging into SpringLiquibase to try to tell what is going on. 


Thanks, Nathan.

Just for clarification, should I be downloading the latest trunk version and report back with the logs, or are you guys on it? :slight_smile:

I’ll try to duplicate it when I get a chance, but if you could test out the newest trunk build, that would be great help.



I’ve the same problems, any idea what it is?


In JdbcConnection class field conn is null.

how soon will fix this error?

?You can see the bug here:

    Connection c = null;         Liquibase liquibase = createLiquibase(c);         try {             c = getDataSource().getConnection();

            } catch (SQLException e) {

calling createLiquibase(c); where c is null.

It is fixed in trunk now.  Thanks for the code pointer and for creating the issue in jira as well.