Hibernate version: 3.2.1GA
Hello,
I write a template for the generic exporter, with a single file output.
Inside i use the differents references from the configuration:
Code:
${cfg.getProperty("hibernate.connection.driver_class")}
${cfg.getProperty("hibernate.connection.url")}
${cfg.getProperty("hibernate.connection.username")}
this work well, but when i want to use the password:
Code:
${cfg.getProperty("hibernate.connection.password")}
there is the following exception:
org.hibernate.tool.hbm2x.ExporterException: Error while processing Configuration with template springBeans.ftl
freemarker.core.InvalidReferenceException: Expression cfg.getProperty("hibernate.connection.password") is undefined on line 36, column 42 in springBeans.ftl.
Yet, all these properties are in my hibernate.cfg.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.bytecode.use_reflection_optimizer">false</property>
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost/</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password">hello</property>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
</session-factory>
</hibernate-configuration>
Is there some security restriction or anything?
Thank you by advance.