-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Problem mit @hibernate.set von Xdoclet2
PostPosted: Wed Jun 22, 2005 7:26 am 
Newbie

Joined: Tue Jun 21, 2005 6:57 am
Posts: 4
Ich möchte die notwendigen hbm.xml Files aus den JavaBeans mit Xdoclet2 generieren lassen.
Leider funktioniert das Tag @hibernate.set nicht.

Wer kennt den Fehler und kann mir helfen.
Danke


Hier mein Javacode

package com.test.vo.gen;

import java.util.HashSet;
import java.util.Set;


/**
*
* @hibernate.class table = "TEST_TABLE"
*/
public class TestVo {

/**
*
*/
private Long id;

private Set mySet = new HashSet();

public TestVo(){
}


/**
* @hibernate.id
* type = "java.lang.Long"
* generator-class = "identity"
*
*
* @return
*/
public Long getId() {
return id;
}


private void setId(Long id) {
this.id = id;
}


/**
* @return Returns the mySet.
*
* @hibernate.set inverse = "true"
* @hibernate.collection-key column = "childId"
* @hibernate.collection-one-to-many class = "Child"
*/
public Set getMySet() {
return mySet;
}



/**
* @param mySet The mySet to set.
*/
public void setMySet(Set mySet) {
this.mySet = mySet;
}

}

Hier die Fehlermeldung nach dem Antlauf:

Buildfile: C:\peschg\java\projekte\SystematikLS\Admin\build.xml
xdoclet2:
remove:
[delete] Deleting 3 files from C:\peschg\java\projekte\SystematikLS\Admin\src
hibernate:
[xdoclet2] Running org.xdoclet.plugin.hibernate.HibernateMappingPlugin
[xdoclet2] * Generate mapping for 'Schlagwort' entity
[xdoclet2] * Generate mapping for 'TestVo' entity
[xdoclet2] 22.06.2005 12:56:15 org.apache.commons.jelly.expression.jexl.JexlExpression evaluate
[xdoclet2] WARNUNG: Caught exception evaluating: org.apache.commons.jexl.ExpressionImpl@f01771. Reason: java.lang.RuntimeException: no element tag deined in class TestVo for mySet
[xdoclet2] java.lang.RuntimeException: no element tag deined in class TestVo for mySet
[xdoclet2] at org.generama.Plugin.assertTrue(Plugin.java:158)
[xdoclet2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[xdoclet2] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[xdoclet2] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[xdoclet2] at java.lang.reflect.Method.invoke(Method.java:324)
[xdoclet2] at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:268)
[xdoclet2] at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:61)
[xdoclet2] at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:68)
[xdoclet2] at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:50)
[xdoclet2] at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:86)
[xdoclet2] at org.apache.commons.jelly.expression.jexl.JexlExpression.evaluate(JexlExpression.java:69)
[xdoclet2] at org.apache.commons.jelly.impl.ExpressionScript.run(ExpressionScript.java:66)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:42)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:692)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:656)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:632)
[xdoclet2] at org.apache.commons.jelly.tags.core.ImportTag.doTag(ImportTag.java:80)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65)
[xdoclet2] at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:102)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:692)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:656)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:632)
[xdoclet2] at org.apache.commons.jelly.tags.core.ImportTag.doTag(ImportTag.java:80)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:42)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:692)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:656)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:632)
[xdoclet2] at org.apache.commons.jelly.tags.core.ImportTag.doTag(ImportTag.java:80)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:42)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65)
[xdoclet2] at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:102)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:692)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:656)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:632)
[xdoclet2] at org.apache.commons.jelly.tags.core.ImportTag.doTag(ImportTag.java:80)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65)
[xdoclet2] at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:102)
[xdoclet2] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[xdoclet2] at org.apache.commons.jelly.impl.WeakReferenceWrapperScript.run(WeakReferenceWrapperScript.java:74)
[xdoclet2] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[xdoclet2] at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
[xdoclet2] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:253)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:692)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:656)
[xdoclet2] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:578)
[xdoclet2] at org.generama.JellyTemplateEngine.generate(JellyTemplateEngine.java:51)
[xdoclet2] at org.generama.Plugin.start(Plugin.java:186)
[xdoclet2] at org.picocontainer.defaults.DefaultPicoContainer.start(DefaultPicoContainer.java:349)
[xdoclet2] at org.nanocontainer.integrationkit.LifecycleContainerBuilder.autoStart(LifecycleContainerBuilder.java:52)
[xdoclet2] at org.nanocontainer.integrationkit.LifecycleContainerBuilder.buildContainer(LifecycleContainerBuilder.java:45)
[xdoclet2] at org.nanocontainer.ant.PicoContainerTask.execute(PicoContainerTask.java:95)
[xdoclet2] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[xdoclet2] at org.apache.tools.ant.Task.perform(Task.java:364)
[xdoclet2] at org.apache.tools.ant.Target.execute(Target.java:341)
[xdoclet2] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[xdoclet2] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[xdoclet2] at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[xdoclet2] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:403)
[xdoclet2] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:139)
[xdoclet2] File /C:/peschg/java/projekte/SystematikLS/Admin/src/com/test/vo/gen/TestVo.hbm.xml did not pass validation:
[xdoclet2] Line: 11 Column: -1
[xdoclet2] Message: Element "set" erfordert zusätzliche Elemente.

BUILD FAILED
C:\peschg\java\projekte\SystematikLS\Admin\build.xml:48: org.generama.OutputValidationError:
Line: 11 Column: -1
Message: Element "set" erfordert zusätzliche Elemente.

Total time: 7 seconds


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 22, 2005 10:03 am 
Newbie

Joined: Tue Jun 21, 2005 6:57 am
Posts: 4
Hallo,

habe den Fehler selber gefunden

LG
ziab


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 09, 2005 5:54 am 
Newbie

Joined: Tue Aug 09, 2005 4:38 am
Posts: 1
Hallo,

kannst Du uns Deine Lösung bitte verraten?

Danke und Gruß,

Michael


Top
 Profile  
 
 Post subject: Re: Problem mit @hibernate.set von Xdoclet2
PostPosted: Tue Nov 29, 2005 8:37 am 
Newbie

Joined: Tue Nov 29, 2005 8:30 am
Posts: 1
Hi,

I had the same problem and solved it by using the tags "@hibernate.one-to-many" instead of "collection-one-to-many" and
"@hibernate.key" instead of "@hibernate.collection-key".

So you just have to leave the "collection" away and everything works fine.


Top
 Profile  
 
 Post subject: Thanks much!
PostPosted: Tue Apr 11, 2006 3:57 pm 
Newbie

Joined: Sun Apr 25, 2004 11:09 am
Posts: 2
You fixed my problem. Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.