Is it just me or does the Artifact Generation not create POJO from mapping files (what hbm2java used to do)?
I continue to get the following error, no matter what database I use, no matter what is in the mapping file. I can only guess that it's something fundamentally stupid that I did. From the Hibernate Console I can create a session successfully, and I did successfully reverse-engineer a few tables I created into mappings and pojo. I know the database is working, I know I can talk to it, I know the tools can get *something* done. So why can't I go from hbm to POJO?
Here is the error:
Error under artifact generation
Reason:
org.hibernate.MappingException: Could not configure datastore from file:/Users/ryan/Projects/BayPort/src/com/bayport/intermodal/Driver.hbm.xml
Here is my hibernate:
<?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.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/bayport</property>
<property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password"></property>
</session-factory>
</hibernate-configuration>
Here is the mapping file:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.bayport.intermodal.Driver" table="Driver">
<id name="id">
<generator class="native"/>
</id>
<property name="driverNo" not-null="true" type="integer" unique="true"/>
<property name="commercialDLNumber" type="long"/>
<property name="commercialDLState" type="string"/>
<property name="notes" type="string"/>
</class>
</hibernate-mapping>
|