blob: b79b9f0e9738246bd05ca55fcf8bb20243603c6f [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>Validating mappings and reporting problems</title>
<meta name="generator" content="Oracle DARB XHTML Converter (Mode = document) - Version 1.0.11" />
<meta name="date" content="2012-12-19T9:17:44Z" />
<meta name="robots" content="noarchive" />
<meta name="doctitle" content="Validating mappings and reporting problems" />
<meta name="relnum" content="Release 3.2" />
<meta name="partnum" content="Release 3.2" />
<link rel="copyright" href="dcommon/html/cpyr.htm" title="Copyright" type="text/html" />
<link rel="stylesheet" href="dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" />
<link rel="contents" href="toc.htm" title="Contents" type="text/html" />
<link rel="up" href="../../index.htm" title="Home" type="text/html" />
<link rel="up" href="toc.htm" title="User Guide" type="text/html" />
<link rel="up" href="tasks.htm" title="Tasks" type="text/html" />
<link rel="up" href="tasks011.htm" title="Validating mappings and rep..." type="text/html" />
<link rel="index" href="index.htm" title="Index" type="text/html" />
<link rel="prev" href="tasks010.htm" title="Converting JPA metadata to XML" type="text/html" />
<link rel="next" href="reference.htm" title="Reference" type="text/html" />
</head>
<body>
<div class="header"><a id="top" name="top"></a>
<div class="zz-skip-header"><a href="#BEGIN">Skip Headers</a></div>
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" valign="top"><b>Dali Java Persistence Tools User Guide</b><br />
<b>Release 3.2</b><br />
Release 3.2</td>
<td valign="bottom" align="right">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="225">
<tr>
<td>&nbsp;</td>
<td align="center" valign="top"><a href="../dali_user_guide.pdf"><img src="dcommon/gifs/pdf_icon.png" alt="PDF" height="24" /><br /><span class="icon">PDF</span></a></td><td align="center" valign="top"><a href="toc.htm"><img src="dcommon/gifs/toc.gif" alt="Go To Table Of Contents" /><br />
<span class="icon">Contents</span></a></td>
<td align="center" valign="top"><a href="index.htm"><img src="dcommon/gifs/index.gif" alt="Go To Index" /><br />
<span class="icon">Index</span></a></td>
</tr>
</table>
</td>
</tr>
</table>
<hr />
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100">
<tr>
<td align="center"><a href="tasks010.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br />
<span class="icon">Converting JPA metadata to XML</span></a>&nbsp;</td>
<td align="center"><a href="reference.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br />
<span class="icon">Reference</span></a></td>
<td>&nbsp;</td>
</tr>
</table>
<p id="BREADCRUMBING"><a href="../../index.htm" title="Home">Home</a> &gt; <a href="toc.htm" title="User Guide">User Guide</a> &gt; <a href="tasks.htm" title="Tasks">Tasks</a> &gt; Validating mappings and rep...</p>
<a name="BEGIN" id="BEGIN"></a></div>
<!-- class="header" -->
<div class="ind"><!-- End Header --><a id="BABFAIBA" name="BABFAIBA"></a>
<div class="sect1">
<h1 class="sect1">Validating mappings and reporting problems</h1>
<p><a id="sthref328" name="sthref328"></a><a id="sthref329" name="sthref329"></a><a id="sthref330" name="sthref330"></a><a id="sthref331" name="sthref331"></a>Errors and warnings on persistent entities and mappings are indicated with a red error or yellow warning next to the resource with the error, as well as the parent containers up to the project.</p>
<div align="center">
<div class="inftblnotealso"><br />
<table class="NoteAlso oac_no_warn" summary="" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<td align="left">
<p class="notep1">Tip:</p>
<p>Use the <a href="reference003.htm#CACEEJJB">Project Properties page &ndash; Errors/Warnings</a> and <a href="reference003.htm#CACFGIDG">Java Persistence Preferences page &ndash; Errors/Warnings</a> to specify which problems Dali will report.</p>
</td>
</tr>
</tbody>
</table>
<br /></div>
<!-- class="inftblnotealso" --></div>
<div class="figure"><a id="sthref332" name="sthref332"></a>
<p class="titleinfigure">Figure 3-74 Sample Errors and Warnings</p>
<img src="img/error_sample.png" alt="This figure shows sample error and warning icons in the Explorer view." title="This figure shows sample error and warning icons in the Explorer view." /><br /></div>
<!-- class="figure" -->
<p>This section contains information on the following:</p>
<ul>
<li>
<p><a href="#CIHFEDEI">Error messages</a></p>
</li>
<li>
<p><a href="#CIHGEAIJ">Warning messages</a></p>
</li>
</ul>
<a id="sthref333" name="sthref333"></a>
<p class="subhead2">Related reference</p>
<ul>
<li>
<p><a href="reference003.htm#CACEEJJB">Project Properties page &ndash; Errors/Warnings</a></p>
</li>
<li>
<p><a href="reference003.htm#CACFGIDG">Java Persistence Preferences page &ndash; Errors/Warnings</a></p>
</li>
</ul>
<a id="sthref334" name="sthref334"></a>
<p class="subhead2">Related concepts</p>
<ul>
<li>
<p><a href="../org.eclipse.platform.doc.user/concepts/cprbview.htm">Problems view</a></p>
</li>
</ul>
<a id="CIHFEDEI" name="CIHFEDEI"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2">Error messages<a id="sthref335" name="sthref335"></a></h2>
<p>This section contains information on error messages (including how to resolve the issue) you may encounter while working with Dali.</p>
<a id="sthref336" name="sthref336"></a>
<p class="subhead2">An exception handler class should be specified.</p>
<p>When using a custom exception handler, you must select (or create) a Java class to handle exceptions. See <a href="reference002.htm#CIAJAFEG">"Customization"</a>.</p>
<a id="sthref337" name="sthref337"></a>
<p class="subhead2">Attribute "<span class="italic">&lt;ATTRIBUTE__NAME&gt;</span>" has invalid mapping type in this context</p>
<p>The mapped attribute is invalid. Either change the mapping type or change the entity type.</p>
<p>See <a href="task_mapping.htm#BABDGBIJ">"Mapping an entity"</a> for more information.</p>
<a id="sthref338" name="sthref338"></a>
<p class="subhead2">Attribute "<span class="italic">&lt;ATTRIBUTE_NAME&gt;</span>" cannot be resolved.</p>
<p>Dali cannot map the attribute to a database table and column. Verify that you database connection information is correct.</p>
<p>See <a href="task_create_new_project.htm#CIHHEJCJ">"Creating a new JPA project"</a> for more information.</p>
<a id="sthref339" name="sthref339"></a>
<p class="subhead2">Class "<span class="italic">&lt;CLASS_NAME&gt;</span>" is not annotated as a persistent class.</p>
<p>The class has not been identified as a persistent class. Configure the class as an Entity, Mapped Superclass, or Embeddable persistent entity.</p>
<p>See <a href="task_add_persistence.htm#BABHICAI">"Adding persistence to a class"</a>.</p>
<a id="sthref340" name="sthref340"></a>
<p class="subhead2">Column "<span class="italic">&lt;COLUMN_NAME&gt;</span>" cannot be resolved.</p>
<p>You mapped an entity's field to an incorrect or invalid column in the database table. By default, Dali will attempt to map each field in the entity with an identically named row in the database table. If the field's name differs from the row's name, you must explicitly create the mapping.</p>
<p>Map the field to a valid row in the database table as shown in <a href="task_mapping.htm#BABDGBIJ">"Mapping an entity"</a>.</p>
<a id="sthref341" name="sthref341"></a>
<p class="subhead2">Converter is unnamed. All converters require a name.</p>
<p>When creating a converter, you must specify its name. See <a href="reference002.htm#CACJGDAJ">"Converters"</a>.</p>
<a id="sthref342" name="sthref342"></a>
<p class="subhead2">Converter name must not be a reserved converter name.</p>
<p>When creating a converter, you must cannot use the following reserved names:</p>
<ul>
<li>
<p><code>serialized</code></p>
</li>
<li>
<p><code>class-instance</code></p>
</li>
<li>
<p><code>none</code></p>
</li>
</ul>
<a id="sthref343" name="sthref343"></a>
<p class="subhead2">Duplicate class "<span class="italic">&lt;CLASS_NAME&gt;</span>".</p>
<p>You created to persistence classes with the same name. Each Java class must have a unique name. See <a href="task_add_persistence.htm#BABHICAI">"Adding persistence to a class"</a> for more information.</p>
<a id="sthref344" name="sthref344"></a>
<p class="subhead2">Entity does not have an Id or Embedded Id.</p>
<p>You created a persistent entity without identifying its primary key. A persistent entity must have a primary key field designated with an <code>@Id</code> or <code>@EmbeddedId</code> annotation.</p>
<p>Add an ID mapping to the entity as shown in <a href="task_mapping.htm#BABGCBHG">"ID mapping"</a> or <a href="task_mapping.htm#CIHDIAEE">"Embedded ID mapping"</a>.</p>
<a id="sthref345" name="sthref345"></a>
<p class="subhead2">Multiple generators named "&lt;GENERATOR_NAME&gt;" defined in this persistence unit.</p>
<p>When creating generators, the converter <span class="bold">Name</span> must be unique within the persistence unit. See <a href="reference002.htm#CACCJJDC">"Primary Key Generation"</a>.</p>
<a id="sthref346" name="sthref346"></a>
<p class="subhead2">Multiple persistence.xml files in project.</p>
<p>You created a JPA project with more than one <code>persistence.xml</code> file. Each JPA project must contain a <span class="italic">single</span> <code>persistence.xml</code> file.</p>
<p>See <a href="task_manage_persistence.htm#CIHDAJID">"Managing the persistence.xml file"</a> for more information.</p>
<a id="sthref347" name="sthref347"></a>
<p class="subhead2">Multiple converters named "<span class="italic">&lt;CONVERTER_NAME&gt;</span>" defined in this persistence unit</p>
<p>When creating converters, the converter <span class="bold">Name</span> must be unique within the persistence unit. See <a href="reference004.htm#CIAGCGIJ">"Add Converter dialog"</a>.</p>
<a id="sthref348" name="sthref348"></a>
<p class="subhead2">No persistence unit defined.</p>
<p>There is no persistence unit defined in the <code>persistence.xml</code> file. Use the &lt;persistence-unit name="<span class="italic">&lt;PERSISTENCE_UNIT_NAME&gt;</span>" tag to define the persistent unit.</p>
<p>See <a href="task_manage_orm.htm#CIHDGDCD">"Managing the orm.xml file"</a> for more information.</p>
<a id="sthref349" name="sthref349"></a>
<p class="subhead2">No persistence.xml file in project.</p>
<p>You created a JPA project without a <code>persistence.xml</code> file. Each JPA project must contain a <span class="italic">single</span> <code>persistence.xml</code> file.</p>
<p>See <a href="task_manage_persistence.htm#CIHDAJID">"Managing the persistence.xml file"</a> for more information.</p>
<a id="sthref350" name="sthref350"></a>
<p class="subhead2">Property "&lt;PROPERTY_NAME&gt;" will be ignored as shared-cache-mode is set to NONE.</p>
<p>Because the <span class="bold">Shared cache mode</span> option is set to <span class="bold">NONE</span>, Dali will ignore the property. See <a href="reference002.htm#CIABEDCH">"Caching"</a>.</p>
<a id="sthref351" name="sthref351"></a>
<p class="subhead2">Referenced column "<span class="italic">&lt;COLUMN_NAME&gt;</span>" in join column "<span class="italic">&lt;COLUMN_NAME&gt;</span>" cannot be resolved.</p>
<p>The column that you selected to join a relationship mapping does not exist on the database table. Either select a different column on the <a href="reference002.htm#CACIJEGI">Joining Strategy</a> or create the necessary column on the database table.</p>
<p>See <a href="reference002.htm#BABIFBAF">"JPA Details view (for attributes)"</a> for more information.</p>
<a id="sthref352" name="sthref352"></a>
<p class="subhead2">Schema "&lt;<span class="italic">SCHEMA_NAME</span>&gt;" cannot be resolved for table/join table "&lt;<span class="italic">TABLE_NAME</span>&gt;".</p>
<p>Define the default database schema information in the persistence unit.</p>
<p>See <a href="task_manage_orm.htm#CIHDGDCD">"Managing the orm.xml file"</a> for more information.</p>
<a id="sthref353" name="sthref353"></a>
<p class="subhead2">Table "<span class="italic">&lt;TABLE_NAME&gt;</span>" cannot be resolved.</p>
<p>You associated a persistent entity to an incorrect or invalid database table. By default, Dali will attempt to associate each persistent entity with an identically named database table. If the entity's name differs from the table's name, you must explicitly create the association.</p>
<p>Associate the entity with a valid database table as shown in <a href="task_add_persistence.htm#BABHICAI">"Adding persistence to a class"</a>.</p>
<a id="sthref354" name="sthref354"></a>
<p class="subhead2">The @Cache annotation on entity <span class="italic">&lt;ENTITY_NAME&gt;</span> has both expiry() and expiryTimeOfDay() specified.</p>
<p>You attempted to include both <code>expiry</code> and <code>expiryTimeOfDay</code> in the <code>@Cache</code> annotation. You may use only one. See<a href="reference002.htm#CACJBBCA">"Caching"</a>.</p>
<a id="sthref355" name="sthref355"></a>
<p class="subhead2">The converter class <span class="italic">"&lt;CLASS_NAME&gt;"</span> does not exist on the project classpath.</p>
<p>You defined a convert class but did not include the class within the project. See<a href="reference002.htm#CACJGDAJ">"Converters"</a>.</p>
<a id="sthref356" name="sthref356"></a>
<p class="subhead2">The converter class "<span class="italic">&lt;CLASS_NAME&gt;</span>" does not implement the org.eclipse.persistence.mappings.converters.Converter interface</p>
<p>When creating a converter, its class must implement the <code>org.eclipse.persistence.mappings.converters.Converter</code> interface. See<a href="reference002.htm#CACJGDAJ">"Converters"</a>.</p>
<a id="sthref357" name="sthref357"></a>
<p class="subhead2">The converter class must be defined.</p>
<p>You attempted to use a converter without defining the class. See<a href="reference002.htm#CACJGDAJ">"Converters"</a>.</p>
<a id="sthref358" name="sthref358"></a>
<p class="subhead2">The entity customizer class "&lt;CLASS_NAME&gt;" does not implement the org.eclipse.persistence.config.DescriptorCustomizer interface.</p>
<p>When using a customer class for an entity, the class must implement the <code>org.eclipse.persistence.config.DescriptorCustomizer</code> interface. See <a href="reference002.htm#CACJEEDE">"Advanced"</a></p>
<a id="sthref359" name="sthref359"></a>
<p class="subhead2">The exception handler class "<span class="italic">&lt;CLASS_NAME&gt;</span>" does not implement the org.eclipse.persistence.exceptions.ExceptionHandler interface.</p>
<p>When using a custom exception handler, you must select (or create) a Java class that implements the <code>org.eclipse.persistence.exceptions.ExceptionHandler</code> class. See <a href="reference002.htm#CIAJAFEG">"Customization"</a>.</p>
<a id="sthref360" name="sthref360"></a>
<p class="subhead2">The persistent field or property for a Version mapping must be of type int, Integer, short, Short, long, Long, or Timestamp.</p>
<p>Version mappings may be used only with the following attribute types:</p>
<ul>
<li>
<p><code>int</code></p>
</li>
<li>
<p><code>Integer</code></p>
</li>
<li>
<p><code>short, Short</code></p>
</li>
<li>
<p><code>long, Long</code></p>
</li>
<li>
<p><code>Timestamp</code></p>
</li>
</ul>
<p>See <a href="task_mapping.htm#BABHIBII">"Version mapping"</a>.</p>
<a id="sthref361" name="sthref361"></a>
<p class="subhead2">The struct converter class "<span class="italic">&lt;CLASS_NAME&gt;</span>" does not implement the org.eclipse.persistence.platform.database.converters.StructConverter interface.</p>
<p>When creating a Struct converter (to enable custom processing of <code>java.sql.Struct</code> types), its class must implement the <code>org.eclipse.persistence.mappings.converters.StructConverter</code> interface. See<a href="reference002.htm#CACJGDAJ">"Converters"</a>.</p>
<a id="sthref362" name="sthref362"></a>
<p class="subhead2">Unresolved generator "<span class="italic">&lt;GENERATOR_NAME&gt;</span>" is defined in persistence unit.</p>
<p>You created a persistence entity that uses sequencing or a table generator, but did not define the generator in the persistence unit. Either define the generator by using an annotation or including it in the XML mapping file.</p>
<a id="sthref363" name="sthref363"></a>
<p class="subhead2">Related concepts</p>
<ul>
<li>
<p><a href="../org.eclipse.platform.doc.user/concepts/cprbview.htm">Problems view</a></p>
</li>
</ul>
</div>
<!-- class="sect2" -->
<a id="CIHGEAIJ" name="CIHGEAIJ"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2">Warning messages</h2>
<p>This section contains information on warning messages (including how to resolve the issue) you may encounter while working with Dali.</p>
<a id="sthref364" name="sthref364"></a>
<p class="subhead2">Connection "<span class="italic">&lt;CONNECTION_NAME&gt;</span>" is not active. No validation will be done against the data source.</p>
<p>The database connection you specified to use with the JPA project is not active. The JPA project requires an active connection.</p>
<a id="sthref365" name="sthref365"></a>
<p class="subhead2">No connection specified for the project. No data-specific validation will be performed.</p>
<p>You created a JPA project without specifying a database connection. The JPA project requires an active connection.</p>
<p>See <a href="task_create_new_project.htm#CIHHEJCJ">"Creating a new JPA project"</a> or <a href="tasks009.htm#BABDBCBI">"Modifying persistent project properties"</a> for information on specifying a database connection.</p>
<a id="sthref366" name="sthref366"></a>
<p class="subhead2">Related concepts</p>
<ul>
<li>
<p><a href="../org.eclipse.platform.doc.user/concepts/cprbview.htm">Problems view</a></p>
</li>
</ul>
</div>
<!-- class="sect2" --></div>
<!-- class="sect1" --></div>
<!-- class="ind" -->
<!-- Start Footer -->
<div class="footer">
<hr />
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<col width="33%" />
<col width="*" />
<col width="33%" />
<tr>
<td valign="bottom">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100">
<col width="*" />
<col width="48%" />
<col width="48%" />
<tr>
<td>&nbsp;</td>
<td align="center"><a href="tasks010.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br />
<span class="icon">Converting JPA metadata to XML</span></a>&nbsp;</td>
<td align="center"><a href="reference.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br />
<span class="icon">Reference</span></a></td>
</tr>
</table>
</td>
<td class="copyrightlogo"><img class="copyrightlogo" src="http://www.eclipse.org/eclipse.org-common/themes/Nova/images/eclipse.png" alt="Eclipse Logo" width="150"/><br />
<span class="copyrightlogo">Copyright&nbsp;&copy;&nbsp;2011, 2012,&nbspby The Eclipse Foundation under the Eclipse Public License (EPL).</span> <a href="legal.htm"><br />
<span class="copyrightlogo">Legal Notices</span></a></td>
<td valign="bottom" align="right">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="225">
<tr>
<td>&nbsp;</td>
<td align="center" valign="top"><a href="../dali_user_guide.pdf"><img src="dcommon/gifs/pdf_icon.png" alt="PDF" height="24" /><br /><span class="icon">PDF</span></a></td><td align="center" valign="top"><a href="toc.htm"><img src="dcommon/gifs/toc.gif" alt="Go To Table Of Contents" /><br />
<span class="icon">Contents</span></a></td>
<td align="center" valign="top"><a href="index.htm"><img src="dcommon/gifs/index.gif" alt="Go To Index" /><br />
<span class="icon">Index</span></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- class="footer" -->
</body>
</html>