novato
April 14, 2021, 10:13pm
1
i want to override physical_naming_strategy in referenceUrl
hibernate:ejb3:source?hibernate.physical_naming_strategy=com.exmple.phIml but is not working .
liquiabse always use physical_naming_strategy in cfg.xml
ronak
April 23, 2021, 12:29pm
2
Hi @novato ,
May I confirm you are using the liquibase hibernate extension ? If so, this does look like an issue possibly a defect, I would log it to the hibernate extension’s issue tracker here .
Is this issue you are facing similar to this issue?
opened 03:55PM - 15 Feb 18 UTC
Hacktoberfest
When the attributes hibernate.physical_naming_strategy and hibernate.implicit_na… ming_strategy of option "referenceUrl" are configured with classes that are inside the same project being built the following error occurs: "Error setting up or running Liquibase: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: java.lang.ClassNotFoundException"
But if I move those classes to another project and add a dependency on the current project, everything works fine.
I was looking the class HibernateDatabase to the point the error occurs...
`builder.applyPhysicalNamingStrategy((PhysicalNamingStrategy) Class.forName(namingStrategy).newInstance());`
And tried to instantiate any class defined on the current project, the Class.forName(..) returned ClassNotFoundException. But if I tried to execute with a class defined on any dependency, it worked.
Here is my config parameters
[liquibase-maven-plugin-3.5.4-diff.log](https://github.com/liquibase/liquibase-hibernate/files/1728362/liquibase-maven-plugin-3.5.4-diff.log)
I believe there is a minor problem with the Classpath Loader which not recognize classes inside the same project.
┆Issue is synchronized with this [Jira Bug](https://datical.atlassian.net/browse/LB-478) by [Unito](https://www.unito.io/learn-more)