History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XDP-167
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Unassigned
Reporter: Espen Amble Kolstad
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
XDoclet 2 Plugins

HibernateConfigPlugin generates empty xml for all properties

Created: 24/Feb/06 03:09 AM   Updated: 06/May/06 10:16 AM
Component/s: hibernate
Affects Version/s: 1.0.4
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
HibernateConfigPlugin generates empty xml for all properties

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class"/>
<property name="hibernate.connection.url"/>
<property name="hibernate.connection.username"/>
<property name="hibernate.connection.password"/>
<property name="hibernate.connection.autocommit"/>
<property name="hibernate.connection.autoReconnect"/>
<property name="hibernate.connection.autoReconnectForPools"/>
<property name="hibernate.connection.is-connection-validation-required"/>
<property name="hibernate.connection.pool_size"/>
<property name="hibernate.jdbc.fetch_size"/>
<property name="hibernate.jdbc.batch_size"/>
<property name="hibernate.jdbc.batch_versioned_data"/>
<property name="hibernate.jdbc.use_scrollable_resultset"/>
<property name="hibernate.jdbc.use_streams_for_binary"/>
<property name="hibernate.jdbc.use_get_generated_keys"/>
<property name="hibernate.connection.isolation"/>
<property name="hibernate.cglib.use_reflection_optimizer"/>
<property name="hibernate.connection.provider_class"/>
<property name="hibernate.connection.datasource"/>
<property name="hibernate.jndi.url"/>
<property name="hibernate.jndi.class"/>
<property name="hibernate.dialect"/>
<property name="hibernate.default_schema"/>
<property name="hibernate.default_entity_mode"/>
<property name="hibernate.session_factory_name"/>
<property name="hibernate.use_outer_join"/>
<property name="hibernate.max_fetch_depth"/>
<property name="hibernate.cache.provider_class"/>
<property name="hibernate.cache.use_minimal_puts"/>
<property name="hibernate.cache.use_query_cache"/>
<property name="hibernate.cache.query_cache_factory"/>
<property name="hibernate.cache.region_prefix"/>
<property name="hibernate.transaction.factory_class"/>
<property name="jta.UserTransaction"/>
<property name="hibernate.transaction.manager_lookup_class"/>
<property name="hibernate.query.substitutions"/>
<property name="hibernate.show_sql"/>
<property name="hibernate.hbm2ddl.auto">true</property>
<property name="hibernate.c3p0.max_size"/>
<property name="hibernate.c3p0.min_size"/>
<property name="hibernate.c3p0.timeout"/>
<property name="hibernate.c3p0.max_statements"/>
<property name="hibernate.c3p0.idle_test_period"/>
<property name="hibernate.c3p0.acquire_increment"/>
<mapping resource="a/b/ABC.hbm.xml"/>
</session-factory>
</hibernate-configuration>

It seems jelly-tag:
<j:if test="${!empty(plugin.Transactionmanagerlookup)}">
fails to detect empty properties

Tried with:
<j:if test="${plugin.notEmpty(plugin.Transactionmanagerlookup)}">

public class HibernateConfigPlugin extends AbstractHibernatePlugin {
...
public boolean notEmpty(Object object) {
if (object != null) {
if (object instanceof String) { return ((CharSequence) object).length() > 0; }
return true;
}
return false;
}
...
}

And it generates the config correctly.

Espen



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Espen Amble Kolstad - 24/Feb/06 03:48 AM
This was a problem with the dependencies of the maven2-plugin