[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-3712) Number of hbm genetation bugs

Dmitry Geraskov (JIRA) jira-events at lists.jboss.org
Thu Feb 26 05:46:44 EST 2009


    [ https://jira.jboss.org/jira/browse/JBIDE-3712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12454422#action_12454422 ] 

Dmitry Geraskov commented on JBIDE-3712:
----------------------------------------

About Backrefs. You can do the following for each of the following packages in mapping project:
1. Create console configuration based on the hbm files in the package.
2. Create hbmExporter based on the cc
3. run exporter

Packages:  mapping.entitymode.dom4j.many2one, mapping.extralazy, mapping.map, mapping.unidir...

StackTrace:

Method public java.lang.String org.hibernate.tool.hbm2x.Cfg2HbmTool.getTag(org.hibernate.mapping.Property) threw an exception when invoked on org.hibernate.tool.hbm2x.Cfg2HbmTool at 10a9cd
The problematic instruction:
----------
==> if c2h.getTag(property)!="version" && c2h.getTag(property)!="timestamp" [on line 112, column 1 in hbm/persistentclass.hbm.ftl]
 in include "persistentclass.hbm.ftl" [on line 34, column 1 in hbm/hibernate-mapping.hbm.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.tool.hbm2x.Cfg2HbmTool.getTag(org.hibernate.mapping.Property) threw an exception when invoked on org.hibernate.tool.hbm2x.Cfg2HbmTool at 10a9cd
	at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:134)
	at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
	at freemarker.core.ComparisonExpression.isTrue(ComparisonExpression.java:111)

Caused by: java.lang.IllegalArgumentException: No tag for org.hibernate.mapping.DependantValue([org.hibernate.mapping.Column(parentName)])
	at org.hibernate.tool.hbm2x.visitor.HBMTagForValueVisitor.accept(HBMTagForValueVisitor.java:67)
	at org.hibernate.mapping.DependantValue.accept(DependantValue.java:31)
	at org.hibernate.tool.hbm2x.Cfg2HbmTool.getTag(Cfg2HbmTool.java:100)
	at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:616)
	at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:111)
	... 90 more

I'll attach mapping.extralazy to eazy find it.

> Number of hbm genetation bugs
> -----------------------------
>
>                 Key: JBIDE-3712
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-3712
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Hibernate
>    Affects Versions: 3.0.0.CR2
>            Reporter: Dmitry Geraskov
>            Assignee: Max Rydahl Andersen
>             Fix For: 3.1.0
>
>         Attachments: m2a_patch.txt, patch.rar, SetManyToManyTest.java
>
>


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

        



More information about the jbosstools-issues mailing list