[
http://jira.jboss.com/jira/browse/JBSEAM-2348?page=comments#action_12408491 ]
Martin Levett commented on JBSEAM-2348:
---------------------------------------
I also get this error when trying to create OneToOne bidirectional relationships using the
mappedBy attribute. I am using JBoss Developer Studio 1.0.0 with Seam 2.0.1.GA. E.g.
using entities similar to previous comment (getters/setters omitted):
@Entity
public class User implements java.io.Serializable {
@Id
@GeneratedValue
private long id;
@OneToOne
private UserData userData;
...
@Entity
public class UserData implements java.io.Serializable {
@Id
@GeneratedValue
private long id;
@OneToOne(mappedBy="userData")
private User user;
...
Running "Seam Generate Entities" wizard results in the following error message.
Can't generate seam entities
org.hibernate.tool.hbm2x.ExporterException: Error while processing template
view/list.xhtml.ftl
org.hibernate.tool.hbm2x.ExporterException: Error while processing template
view/list.xhtml.ftl
freemarker.core.InvalidReferenceException: Expression property.value.typeName is
undefined on line 50, column 14 in util/TypeInfo.ftl.
seam generate-ui fails for @OneToOne @PrimaryKeyJoinColumn annotated
fields
---------------------------------------------------------------------------
Key: JBSEAM-2348
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2348
Project: Seam
Issue Type: Bug
Components: Tools
Affects Versions: 2.0.0.GA
Environment: Seam 2.0.0.GA
JBoss Tools
Reporter: Thorsten Kunz
Fix For: 2.1.0.GA
Since I do use JBoss Tool I assume that this is cause by an error in the underlying seam
generate-ui. It fails if you have entities annotated like this:
public class User implements Serializable {
@Id
@GeneratedValue
private Long id;
@OneToOne
@PrimaryKeyJoinColumn
private UserData userData;
}
public class UserData implements Serializable {
@Id
private Long id;
@OneToOne
@PrimaryKeyJoinColumn
private User user;
}
This will result in this Exception:
org.eclipse.core.runtime.CoreException: org.hibernate.tool.hbm2x.ExporterException: Error
while processing template view/list.xhtml.ftl
org.eclipse.core.runtime.CoreException[666]: org.hibernate.tool.hbm2x.ExporterException:
Error while processing template view/list.xhtml.ftl
Caused by: freemarker.core.InvalidReferenceException: Expression property.value.typeName
is undefined on line 39, column 6 in view/list.xhtml.ftl
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira