Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Issues List »

[hibernate-issues] [Hibernate-JIRA] Created: (HBX-1079)
@CollectionOfElements cannot be parsed into hbm xml mapping

Anupam M (JIRA)

2008-08-06

Replies: Find Java Web Hosting

Author LoginPost Reply
@CollectionOfElements cannot be parsed into hbm xml mapping
-----------------------------------------------------------

          Key: HBX-1079
          URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1079
        Project: Hibernate Tools
      Issue Type: Bug
  Affects Versions: 3.2.0.GA
       Reporter: Wytze van der Ploeg


I have an annotated entity which uses @CollectionOfElements annotation. When using hibernate tools to generate the corresponding hbm xml files I get an exception on this annotation.

Stacktrace:

11:59:21,447 INFO org.hibernate.tool.Version - Hibernate Tools 3.2.0.b9
11:59:22,057 ERROR freemarker.runtime -
Expression property.getValue().getElement().referencedEntityName is undefined on
line 22, column 41 in hbm/bag.hbm.ftl.
The problematic instruction:
----------
==> ${property.getValue().getElement().referencedEntityName} [on line 22, column
39 in hbm/bag.hbm.ftl]
in include "${c2h.getTag(property)}.hbm.ftl" [on line 93, column 1 in hbm/persi
stentclass.hbm.ftl]
in include "persistentclass.hbm.ftl" [on line 34, column 1 in hbm/hibernate-map
ping.hbm.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression property.getValue().getEle
ment().referencedEntityName is undefined on line 22, column 41 in hbm/bag.hbm.ft
l.
    at freemarker.core.TemplateObject.assertNonNull (TemplateObject.java:124)

    at freemarker.core.Expression.getStringValue (Expression.java:118)
    at freemarker.core.Expression.getStringValue (Expression.java:93)
    at freemarker.core.DollarVariable.accept (DollarVariable.java:76)
    at freemarker.core.Environment.visit (Environment.java:196)
    at freemarker.core.MixedContent.accept (MixedContent.java:92)
    at freemarker.core.Environment.visit (Environment.java:196)
    at freemarker.core.IfBlock.accept (IfBlock.java:82)
    at freemarker.core.Environment.visit (Environment.java:196)
    at freemarker.core.MixedContent.accept (MixedContent.java:92)
    at freemarker.core.Environment.visit (Environment.java:196)
    at freemarker.core.Environment.include (Environment.java:1375)
    at freemarker.core.Include.accept (Include.java:155)
    at freemarker.core.Environment.visit (Environment.java:196)
    at freemarker.core.ConditionalBlock.accept (ConditionalBlock.java:79)
    at freemarker.core.Environment.visit (Environment.java:196)
    at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160)

    at freemarker.core.Environment.visit (Environment.java:351)
    at freemarker.core.IteratorBlock.accept (IteratorBlock.java:95)
    at freemarker.core.Environment.visit (Environment.java:196)
    at freemarker.core.MixedContent.accept (MixedContent.java:92)
    at freemarker.core.Environment.visit (Environment.java:196)
    at freemarker.core.Environment.include (Environment.java:1375)
    at freemarker.core.Include.accept (Include.java:155)
    at freemarker.core.Environment.visit (Environment.java:196)
    at freemarker.core.MixedContent.accept (MixedContent.java:92)
    at freemarker.core.Environment.visit (Environment.java:196)
    at freemarker.core.Environment.process (Environment.java:176)
    at freemarker.template.Template.process (Template.java:231)
    at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelpe
r.java:247)
    at org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplatePro
ducer.java:67)
    at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.ja
va:28)
    at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.ja
va:97)
    at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.j
ava:146)
    at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(Generi
cExporter.java:135)
    at org.hibernate.tool.hbm2x.GenericExporter$2.process(GenericExporter.ja
va:41)
    at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java
:126)
    at org.hibernate.tool.hbm2x.HibernateMappingExporter.doStart(HibernateMa
ppingExporter.java:34)
    at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java
:95)
    at org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute(Hibernat
eExporterMojo.java:241)
    at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateE
xporterMojo.java:140)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:451)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:558)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:512)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:482)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:330)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:291)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:142)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:336)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:129)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:287)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
    at java.lang.reflect.Method.invoke (Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

   
_______________________________________________
hibernate-issues mailing list
hibernate-issues@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-issues
©2008 gg3721.com - Jax Systems, LLC, U.S.A.