[teneo] entity class not found [message #558270] |
Fri, 10 September 2010 13:32  |
Eclipse User |
|
|
|
Hello,
a hibernate.hbm.xml that I have generated with teneo causes a ClassNotFoundException. The classname within the hibernate.hbm.xml references a class at the impl folder that I have generated with an ecore genmodel before. When I deploy my project as war to JBoss 5.1 I get the error.
My hibernate.hbm.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping auto-import="false">
<class name="timetracker.impl.ProjectImpl" entity-name="Project" abstract="false" lazy="false" discriminator-value="Project" table="`project`">
<meta attribute="eclassName">Project</meta>
<meta attribute="epackage">http://timetracker/1.0</meta>
<id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
<meta attribute="syntheticId">true</meta>
<generator class="native"/>
</id>
<discriminator type="string">
<column name="dtype" index="projectdtype" length="255" not-null="true"/>
</discriminator>
<version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
<meta attribute="syntheticVersion">true</meta>
</version>
<many-to-one name="operator" entity-name="Operator" lazy="false" foreign-key="project_operator" insert="true" update="true" not-null="false"/>
<property name="bezeichnung" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`bezeichnung`"/>
</property>
<property name="nummer" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`nummer`"/>
</property>
</class>
<class name="timetracker.impl.Operator" entity-name="Operator" abstract="false" lazy="false" discriminator-value="Operator" table="`operator`">
<meta attribute="eclassName">Operator</meta>
<meta attribute="epackage">http://timetracker/1.0</meta>
<id type="long" name="e_id" column="e_id" access="org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierPropertyHandler">
<meta attribute="syntheticId">true</meta>
<generator class="native"/>
</id>
<discriminator type="string">
<column name="dtype" index="operatordtype" length="255" not-null="true"/>
</discriminator>
<version name="e_version" column="e_version" access="org.eclipse.emf.teneo.hibernate.mapping.property.VersionPropertyHandler">
<meta attribute="syntheticVersion">true</meta>
</version>
<list name="project" table="`operator_project`" lazy="true">
<key update="true">
<column name="`operator_e_id`" not-null="true" unique="false"/>
</key>
<list-index column="`operator_project_idx`"/>
<many-to-many entity-name="Project" unique="true">
<column name="`project_e_id`" not-null="true" unique="false"/>
</many-to-many>
</list>
<property name="vorname" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`vorname`"/>
</property>
<property name="nachname" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.lang.String">
<column not-null="false" unique="false" name="`nachname`"/>
</property>
</class>
</hibernate-mapping>
Error:
DEPLOYMENTS IN ERROR:
Deployment "persistence.unit:unitName=#timetracker-persistence" is in error due to the following reason(s): java.lang.ClassNotFoundException: timetracker.impl.OperatorImpl from BaseClassLoader
Amazingly the server doesn't complain about the other class timetracker.impl.Project.
Does anybody have a hint?
Daniel
|
|
|
Re: [teneo] entity class not found [message #558402 is a reply to message #558270] |
Sun, 12 September 2010 08:12  |
Eclipse User |
|
|
|
Hi Daniel,
Hmm, I can't really say why this happens (I don't have experience with jboss myself).
gr. Martin
On 09/10/2010 07:32 PM, Daniel wrote:
> Hello,
>
> a hibernate.hbm.xml that I have generated with teneo causes a
> ClassNotFoundException. The classname within the hibernate.hbm.xml
> references a class at the impl folder that I have generated with an
> ecore genmodel before. When I deploy my project as war to JBoss 5.1 I
> get the error.
>
> My hibernate.hbm.xml
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD
> 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
>
> <hibernate-mapping auto-import="false">
> <class name="timetracker.impl.ProjectImpl" entity-name="Project"
> abstract="false" lazy="false" discriminator-value="Project"
> table="`project`">
> <meta attribute="eclassName">Project</meta>
> <meta attribute="epackage">http://timetracker/1.0</meta>
> <id type="long" name="e_id" column="e_id"
> access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropertyHandler ">
>
> <meta attribute="syntheticId">true</meta>
> <generator class="native"/>
> </id>
> <discriminator type="string">
> <column name="dtype" index="projectdtype" length="255" not-null="true"/>
> </discriminator>
> <version name="e_version" column="e_version"
> access=" org.eclipse.emf.teneo.hibernate.mapping.property.VersionProp ertyHandler ">
>
> <meta attribute="syntheticVersion">true</meta>
> </version>
> <many-to-one name="operator" entity-name="Operator" lazy="false"
> foreign-key="project_operator" insert="true" update="true"
> not-null="false"/>
> <property name="bezeichnung" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`bezeichnung`"/>
> </property>
> <property name="nummer" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`nummer`"/>
> </property>
> </class>
> <class name="timetracker.impl.Operator" entity-name="Operator"
> abstract="false" lazy="false" discriminator-value="Operator"
> table="`operator`">
> <meta attribute="eclassName">Operator</meta>
> <meta attribute="epackage">http://timetracker/1.0</meta>
> <id type="long" name="e_id" column="e_id"
> access=" org.eclipse.emf.teneo.hibernate.mapping.identifier.Identifie rPropertyHandler ">
>
> <meta attribute="syntheticId">true</meta>
> <generator class="native"/>
> </id>
> <discriminator type="string">
> <column name="dtype" index="operatordtype" length="255" not-null="true"/>
> </discriminator>
> <version name="e_version" column="e_version"
> access=" org.eclipse.emf.teneo.hibernate.mapping.property.VersionProp ertyHandler ">
>
> <meta attribute="syntheticVersion">true</meta>
> </version>
> <list name="project" table="`operator_project`" lazy="true">
> <key update="true">
> <column name="`operator_e_id`" not-null="true" unique="false"/>
> </key>
> <list-index column="`operator_project_idx`"/>
> <many-to-many entity-name="Project" unique="true">
> <column name="`project_e_id`" not-null="true" unique="false"/>
> </many-to-many>
> </list>
> <property name="vorname" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`vorname`"/>
> </property>
> <property name="nachname" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String">
> <column not-null="false" unique="false" name="`nachname`"/>
> </property>
> </class>
> </hibernate-mapping>
>
>
> Error:
>
> DEPLOYMENTS IN ERROR:
> Deployment "persistence.unit:unitName=#timetracker-persistence" is in
> error due to the following reason(s): java.lang.ClassNotFoundException:
> timetracker.impl.OperatorImpl from BaseClassLoader
>
>
> Amazingly the server doesn't complain about the other class
> timetracker.impl.Project.
>
> Does anybody have a hint?
> Daniel
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.03248 seconds