On Fri, 2004-02-20 at 09:11, DDU DUQUENNOY Didier wrote:
> Thanks to Andrew Stevens, I have solved my previous problem (see thread [XDoclet 
> 1.2] String manipulation in a XDT file?) by creating a new namespace.
> My XDT file used to generate a BusinessDelegate now looks like : 
> 
> <XDtTagDef:tagDef namespace="Sofaxis" 
> handler="com.dexia.tools.xdoclet.SofaxisTagsHandler"/>
> [...]
> <XDtSofaxis:ifThrowsException name="javax.ejb.CreateException">
>       } catch(javax.ejb.CreateException ce) {
>           throw new SystemException("Erreur de creation avec l'EJB", ce);
> </XDtSofaxis:ifThrowsException>
> <XDtSofaxis:ifThrowsException name="javax.ejb.FinderException">
>       } catch(javax.ejb.FinderException fe) {
>           throw new SystemException("Erreur de recherche avec l'EJB", fe);
> </XDtSofaxis:ifThrowsException>
>       }
> [...]
> 
> This works perfeclty as long as I need to rebuild the Business Delegate.
> The problem is that I get an error if the file does not need to be rebuilt:
> 
> (XDocletMain.start                   47  ) Running <delegate/>
> (TemplateEngine.getTagHandlerFor     206 ) Could not find tag handler for prefix: 
> 'XDtSofaxis'
> (TemplateEngine.invokeMethod         519 ) Error occured at/around line 18, 
> offending template tag: XDtSofaxis:ifThrowsException
> (XDocletMain.start                   53  ) Running XDoclet failed.
> (XDocletMain.start                   54  ) <<xdoclet.template.TemplateException: 
> Could not find tag handler for prefix: 'XDtSofaxis'>>
> xdoclet.template.TemplateException: Could not find tag handler for prefix: 
> 'XDtSofaxis'
>     at xdoclet.template.TemplateEngine.getTagHandlerFor(TemplateEngine.java:207)
>     at xdoclet.template.TemplateParser.getTagHandlerFor(TemplateParser.java:56)
>     at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:516)
>     at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java:959)
>     [...]
> 
> I don't understand why the TagHandler for the namespace XDtSofaxis is not found 
> *only* if no rebuild is needed?
> 
> Any info about this?

I was going to suggest you raise a bug report in JIRA, but I found there
already was one
(http://opensource.atlassian.com/projects/xdoclet/secure/ViewIssue.jspa?key=XDT-349)

There's a good explanation in there of why the namespace isn't found,
and a workaround that involves subclassing the doclettask to register
the tag handler.

An alternative  workaround in your case might be to use Ant's uptodate
task to skip the ejbdoclet call completely if nothing's changed.


Andrew.



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to