jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • XDoclet 2 Plugins
  • XDP-167

HibernateConfigPlugin generates empty xml for all properties

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.0.4
  • Fix Version/s: None
  • Component/s: hibernate
  • Labels:
    None

Description

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

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Espen Amble Kolstad added a comment - 24/Feb/06 3:48 AM

This was a problem with the dependencies of the maven2-plugin

Show
Espen Amble Kolstad added a comment - 24/Feb/06 3:48 AM This was a problem with the dependencies of the maven2-plugin

People

  • Assignee:
    Unassigned
    Reporter:
    Espen Amble Kolstad
Vote (0)
Watch (1)

Dates

  • Created:
    24/Feb/06 3:09 AM
    Updated:
    06/May/06 10:16 AM
    Resolved:
    24/Feb/06 3:48 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.