Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-4538

Hibernate Tools NPE when adding a table in reverse engineering file (tab Table & Columns)

    XMLWordPrintable

Details

    Description

      Using the new Eclipse 3.5 and either the latest stable release or milestone of Hibernate Tools plugin I get a NullPointerException when adding a new table to reverse engineer.

      Steps to reproduce:

      • Open hibernate.reveng.xml
      • In tab "Table Filters" add a global exclude for every table and one include for the table to reverse engineer (so only the desired table is querried in the next tab).
      • In tab "Table & Columns" add the disired table (making sure to also include the children / fields of the table by expanding the table and then check it - or use the "select all children" button)

      Now I would expect the table including its fields in the list so I can go on and alter the column details. But unfortunately only the table is added - without children. And in the error log the mentioned NPE is shown (I'll add the full stacktrace as a file later).

      Unhandled event loop exception

      java.lang.NullPointerException
      at org.eclipse.wst.xml.core.internal.document.AttrImpl.setValueSource(AttrImpl.java:761)

      It doesn't matter which table I choose. Even tables which were previously added successfully (using Eclipse 3.4 and Hibernate Tools 3.2.4.GA-R200903141626-H5) are not working anymore.

      The hibernate.cfg.xml which I use:

      <?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.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
      <property name="hibernate.connection.password">[removed]</property>
      <property name="hibernate.connection.url">jdbc:jtds:sqlserver://[removed]/[removed]</property>
      <property name="hibernate.connection.username">[removed]</property>
      <property name="hibernate.default_catalog">[removed]</property>
      <property name="hibernate.default_schema">dbo</property>
      <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
      <property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
      <property name="hibernate.cache.use_second_level_cache">false</property>
      <property name="hibernate.cache.use_query_cache">false</property>
      <property name="hibernate.bytecode.use_reflection_optimizer">false</property>
      <property name="hibernate.use_outer_join">true</property>
      </session-factory>
      </hibernate-configuration>

      Attachments

        Issue Links

          Activity

            People

              anis_jira Aliaksey Nis (Inactive)
              codesoeldner Philipp Rosenhagen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: