# Issue with default schema with liquibase 2.0 -- Help

**URL:** <https://forum.liquibase.org/t/issue-with-default-schema-with-liquibase-2-0-help/1587>\
**Category:** General Discussion\
**Created:** [August 11, 2011, 3:51pm UTC](https://forum.liquibase.org/t/issue-with-default-schema-with-liquibase-2-0-help/1587 "2011-08-11T15:51:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaidyanathanvs](https://avatars.discourse-cdn.com/v4/letter/v/e79b87/32.png) [@vaidyanathanvs](https://forum.liquibase.org/u/vaidyanathanvs)\
**Post date:** [August 11, 2011, 3:51pm UTC](https://forum.liquibase.org/t/issue-with-default-schema-with-liquibase-2-0-help/1587/1 "2011-08-11T15:51:00Z")

</div>

We are trying to use liquibase 2.0 in our project and are running into some issues.

First of all, thanx to the liquibase dev. community on an excellent product.&nbsp;

We are using liquibase with jboss 5.1.0 on both hypersonic and db2. On hypersonic I am using the default datasource configuration that comes with the jboss&nbsp;

product with the url jdbc:hsqldb:hsql://localhost:1701 . We use hibernate and for hibernate to use a different schema (than public which is default) there&nbsp;

are some -D arguments that we use -Dhibernate.default\_schema which works fine.&nbsp;

The problem is that with liquibase it is not able to use the schema that we set, even if i set -DdefaultSchemaName or -Ddatabase.defaultSchemaName in my&nbsp;

jboss VM arguments . The liquibase tables are still getting created in PUBLIC schema. On command line this works fine , for eg. if i set --defaultSchemaName it works fine but not in jboss.&nbsp;

The only work around that i found is using these in the changeset &nbsp;and tgus creates our tables in the right schema but the liquibase tables are not getting created there.&nbsp;

1.How do i set up liquibase so that it uses the default schema name that we give in jboss as jvm args ?

2.I want liquibase to use the connection that is created with the datasource be it create table or any other ddl commands.&nbsp;

We are running liquibase in a spring container… Following is our configuration&nbsp;

ApplicationContext.xml

=================

&nbsp;

&nbsp; &nbsp;

&nbsp; &nbsp;

&nbsp;

liquibase.xml

===========

\<?xml version="1.0" encoding="UTF-8"?\>

\<beans xmlns=“[http://www.springframework.org/schema/beans](http://www.springframework.org/schema/beans)”

&nbsp;xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)” xmlns:context=“[http://www.springframework.org/schema/context](http://www.springframework.org/schema/context)”

&nbsp;xmlns:tx=“[http://www.springframework.org/schema/tx](http://www.springframework.org/schema/tx)”

&nbsp;xsi:schemaLocation="[http://www.springframework.org/schema/beans](http://www.springframework.org/schema/beans) [http://www.springframework.org/schema/beans/spring-beans.xsd](http://www.springframework.org/schema/beans/spring-beans.xsd)

&nbsp;[http://www.springframework.org/schema/tx](http://www.springframework.org/schema/tx) [http://www.springframework.org/schema/tx/spring-tx-2.0.xsd](http://www.springframework.org/schema/tx/spring-tx-2.0.xsd)

&nbsp;[http://www.springframework.org/schema/context](http://www.springframework.org/schema/context) [http://www.springframework.org/schema/context/spring-context-2.5.xsd](http://www.springframework.org/schema/context/spring-context-2.5.xsd) "\>

&nbsp; &nbsp;

&nbsp; &nbsp;

detectNonLiquibaseInstall.xml reads as follows

&nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; SELECT COALESCE(MAX(id),’-1’)

&nbsp; &nbsp; &nbsp; FROM databasechangelog

&nbsp; &nbsp; &nbsp; WHERE author=‘AppVersion’

&nbsp; &nbsp;

&nbsp; &nbsp; // this is an application table …&nbsp;

&nbsp;

&nbsp;

Thx&nbsp;

Vaidya

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [August 11, 2011, 3:51pm UTC](https://forum.liquibase.org/t/issue-with-default-schema-with-liquibase-2-0-help/1587/2 "2011-08-11T15:51:00Z")

</div>

I have the same issue with v2.0.5 none of the suggested ways of supplying property values (as suggested in the documentation command line -D or ) works for “database.defaultSchemaName” or “database.liquibaseSchemaName”.  
  
But “database.defaultSchemaName” works fine as ex..

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [August 11, 2011, 3:51pm UTC](https://forum.liquibase.org/t/issue-with-default-schema-with-liquibase-2-0-help/1587/3 "2011-08-11T15:51:00Z")

</div>

> But “database.defaultSchemaName” works fine as ex..

  
My bad, it should have said:  
  
But “database. **defaultTableSpace** ” works fine as ex..
