Discussion:
[Middlegen-user] Error in web.xml with <ejb-local-ref> ?
M-Leander Reimer
2002-06-24 07:47:02 UTC
Permalink
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; - nested
throwable: (javax.naming.NamingException: ejb-local-ref: ejb/Flight,
target not found, add valid ejb-link)

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.

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

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?

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


Thanks for the help guys!

CU
Leander
a***@netcom.no
2002-06-24 08:50:05 UTC
Permalink
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 <***@gmx.net>
Date: Monday, June 24, 2002 11:47 am
Subject: [Middlegen-user] Error in web.xml with <ejb-local-ref> ?
Post by M-Leander Reimer
Hi there,
I compiled the sample and everything runs fine. When I deploy the EAR
org.jboss.deployment.DeploymentException: Error during deploy; -
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.
Post by M-Leander Reimer
<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.
Post by M-Leander Reimer
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
Post by M-Leander Reimer
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
Post by M-Leander Reimer
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
Post by M-Leander Reimer
Thanks for the help guys!
CU
Leander
-------------------------------------------------------
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...