Hi Stefan, thank you very much! Now it works fine...
Tobias > -----Urspr�ngliche Nachricht----- > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Auftrag von Stefan > Weber > Gesendet: Donnerstag, 30. Oktober 2003 08:40 > An: [EMAIL PROTECTED] > Betreff: [Xdoclet-user] Re: Own TagsHandler > > > Hi, > to me it seems, that xdoclet doesn't find the WMSTagsHandler class > itself - not any class it depends on. > XDoclet tries to instantiate WMSTagsHandler by reflection. If > that fails > a ClassNotFoundException is thrown by the reflection API. > If a class that is used by WMSTagsHandler is not found there would be > a NoClassDefFoundError as loading such a class is not done by > reflection. > > So I think it is just a configuration problem. > here is snippet from an ant script: > > <path id="your.classpath"> > <fileset dir="${xdoclet.lib.dir}" includes="*.jar"/> > <fileset dir="${your.lib.dir}" includes="${your.jar}"/> > </path> > > <taskdef > classpathref="your.classpath" > classname="xdoclet.DocletTask" > name="xdoclet"/> > <xdoclet> > <fileset .../> > <templateOrWhatEver ... /> > </xdoclet> > > your.jar should include your TagsHandler and a > xdoclet.xml-file. You can write that file on your > own (see xdoclet-jars) or generate it by xdoclet. > Be shure that your.jar is NOT on the > classpath you start ant with. > > Regards, > Stefan > > --- "Joch Tobias (FF)" <[EMAIL PROTECTED]> > wrote: > > Hi, > > > > I have an own tagshandler 'XyzTagsHandler' written > > and this one still works > > well also I put it into the 'xdoclet.tagshandler' > > package. But when I try to > > put it into another package the following exception > > happens: > > > > [xdoclettest] (TemplateEngine.registerTagHandlers > > 641 ) Couldn't > > instantiate xdoclet.tagshandler.WmsTagsHandler > > taghandler > > [xdoclettest] java.lang.ClassNotFoundException: > > xdoclet.tagshandler.WmsTagsHandler > > [xdoclettest] at > > > org.apache.tools.ant.AntClassLoader.findClassInComponents(AntC > lassLoader.jav > > a(Compiled Code)) > > [xdoclettest] at > > > org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.j > ava:1036) > > [xdoclettest] at > > > org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925) > > [xdoclettest] at > > > java.lang.ClassLoader.loadClass(ClassLoader.java:448) > > [xdoclettest] at java.lang.Class.forName1(Native > > Method) > > [xdoclettest] at > > java.lang.Class.forName(Class.java:142) > > [xdoclettest] at > > > xdoclet.template.TemplateEngine.registerTagHandlers(TemplateEn > gine.java:627) > > [xdoclettest] at > > > xdoclet.template.TemplateEngine.<init>(TemplateEngine.java:92) > > [xdoclettest] at > > > xdoclet.template.TemplateEngine.<clinit>(TemplateEngine.java:50) > > [xdoclettest] at > > > xdoclet.TemplateSubTask.init(TemplateSubTask.java:456) > > [xdoclettest] at > > xdoclet.XDocletMain.start(XDocletMain.java:44) > > [xdoclettest] at > > xdoclet.DocletTask.start(DocletTask.java:458) > > [xdoclettest] at > > > xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:95) > > [xdoclettest] at > > org.apache.tools.ant.Task.perform(Task.java:341) > > [xdoclettest] at > > org.apache.tools.ant.Target.execute(Target.java:309) > > [xdoclettest] at > > > org.apache.tools.ant.Target.performTasks(Target.java:336) > > [xdoclettest] at > > > org.apache.tools.ant.Project.executeTarget(Project.java:1339) > > [xdoclettest] at > > > org.apache.tools.ant.Project.executeTargets(Project.java:1255) > > [xdoclettest] at > > org.apache.tools.ant.Main.runBuild(Main.java:609) > > [xdoclettest] at > > org.apache.tools.ant.Main.start(Main.java:196) > > [xdoclettest] at > > org.apache.tools.ant.Main.main(Main.java:235) > > > > Must I register the new tagshandler anywhere? The > > class is in the classpath > > but in another package... > > > > Thanks for any tips! > > Tobias > > Hi Tobias, it could be that your class can not > beinstantiated due to some missing dependency. > As you can see, xdoclet does nonest try.... > > All dependencies shall be on xdoclet invication > classpath... > > gr�� an Christopf Eichler ( falls ich mit der > Abteilung nicht geirrt habe :) ) > > gr��, > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > xdoclet-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
