I'm using Hibernate to connect to Exasol Database using Exasol Hibernate Dialect. When I use the following persistence.xml, everything works fine:
<persistence-unit name="exasol">
<description>exasol</description>
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="javax.persistence.jdbc.driver" value="com.exasol.jdbc.EXADriver" />
<property name="javax.persistence.jdbc.url" value="jdbc:exa:192.168.6.11:8563" />
<property name="javax.persistence.jdbc.user" value="user" />
<property name="javax.persistence.jdbc.password" value="pass" />
<property name="hibernate.dialect" value="com.incuda.config.ExasolDialect"/>
<property name="hibernate.default_schema" value="my_schema" />
</properties>
</persistence-unit>
But now I don't want to use the following property for some internal reasons (e.g this reason):
<property name="hibernate.default_schema" value="my_schema" />
and replace it by incorporating schema name inside connection string URL, like the one suggested in EXASolution User Manual, page 349 (download URL):
<property name="javax.persistence.jdbc.url" value="jdbc:exa:192.168.6.11:8563;schema=my_schema" />
But when I do so, I get the following exception:
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at com.incuda.config.ExasolIdentityColumnSupport.getIdentitySelectString(ExasolIdentityColumnSupport.java:25)
So, what is the correct way of incorporating schema name into Exasol connection string URL?