I haven't tried to deploy the sample on JBoss (I don't really know 
JBoss), so my below comments are guesses only.

----- Original Message -----
From: M-Leander Reimer <[EMAIL PROTECTED]>
Date: Monday, June 24, 2002 11:47 am
Subject: [Middlegen-user] Error in web.xml with <ejb-local-ref> ?

> Hi there,
> 
> I compiled the sample and everything runs fine. When I deploy the EAR
> unter JBoss 3.0.0, I get something this:
> 
> org.jboss.deployment.DeploymentException: Error during deploy; - 
> nestedthrowable: (javax.naming.NamingException: ejb-local-ref: 
> ejb/Flight,target not found, add valid ejb-link)
> 

I have no idea what this could be. I suggest you ask the JBoss guys. If 
you find out what the problem is, I'd be grateful if you enlighten me. 
It would be nice if this worked without a link too.

> So I look into the generated web.xml and I find:
> 
> <ejb-local-ref>
>      <ejb-ref-name>ejb/Person</ejb-ref-name>
>      <ejb-ref-type>Entity</ejb-ref-type>
>      <local-home>airline.ejb.interfaces.PersonLocalHome</local-home>
>      <local>airline.ejb.interfaces.PersonLocal</local>
> </ejb-local-ref>
> 
> I guess this is necessary to use the local interfaces of the EJBs from
> other beans (an servlets) in the webapp.
> 

Correct, that's the intention, and WebLogic Server doesn't complain.

> 1. What would the correct value of the optional <ejb-link> 
> attribute be,
> so it would work?
> 

See http://xdoclet.sourceforge.net/webdoclet.html#web_ejb-local-ref

> 2. Why are there more than one <ejb-local-ref> declarations per 
> bean (up
> to 5 times in case of the person bean) in the web.xml? Is this 
> required?

http://sourceforge.net/tracker/?
group_id=31602&atid=402704&func=detail&aid=573059

> 3. Can I modify the behaviour of Middlegen or XDoclet somehow, so a
> correct deployment descriptor is generated?
> 

Middlegen's output for CMP EJBs can be modified in the following 
Velocity template:
middlegen\plugins\entitybean\src\middlegen\plugins\entitybean\entity-
cmp-20.vm

To modify XDoclet's output, see the various *.xdt files under 
xdoclet/modules/ejb

HTH,
/Aslak

> 
> Thanks for the help guys!
> 
> CU
> Leander
> 
> 
> 
> 
> -------------------------------------------------------
> Sponsored by:
> ThinkGeek at http://www.ThinkGeek.com/
> _______________________________________________
> middlegen-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/middlegen-user
> 



-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to