Hi Patrick
Sorry for my very late reply. Been away on other business and also sick
:-(
I can see what you are getting at. The problem is, that the tag in
question looks like this:
* @ejb:ejb-ref view-type="local" ejb-name="Language"
So I dont even use the ref-name tag at all, but xdoclet seems to insert
a ref-name="null" by itself
ref-name is according to documentation not required.
This has worked with xdoclet 1.1.2 and an 1.2.0b1 (as far as I can tell)
I'll try to play around with the tags a bit. But if you have any other
hints, then feel free to kick them in my direction
/Thomas
ons, 2003-11-26 kl. 01:34 skrev Patrick Bakker:
> Thomas,
> This line in your log dump stands out to me:
> Current tag: @ejb.ejb-ref ref-name="null" ejb-name="Language"
> view-type="local"
>
> I haven't actually used an @ejb.ejb-ref tag before but from a quick glance
> at the documentation I don't think a ref-name of "null" is doing what you
> are expecting it to. My read of the documentation would be that ref-name
> should be "Language" which you can then reference as
> "java:comp/env/Language" (and as per the documentation remember to import
> the appropriate EJB as well). If you have used the value of "null" in more
> than one @ejb.ejb-ref tags I can see why it is getting confused since you
> will be trying to assign the same name ("null") to multiple EJBs.
>
> Just to be clear I think you need something like:
>
> import package.name.LanguageBean;
> import package.name.LanguageLocal;
> import package.name.LanguageLocalHome;
>
> ...
>
> /**
> * ...
> * @ejb.ejb-ref ejb-name="Language" view-type="local" ref-name="Language"
> */
> public class ExampleBean
> implements EntityBean
> {
> public void some-method()
> {
> Context context = (Context)
> new InitialContext().lookup("java:comp/env");
> LanguageHome home = (LanguageLocalHome) context.lookup("Language");
> ...
> }
> }
>
>
> But like I said, I haven't used @ejb.ejb-ref before so I could be wrong.
>
> Patrick
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Thomas
> Hentschel Lund
> Sent: Thursday, November 20, 2003 2:40 AM
> To: [EMAIL PROTECTED]
> Subject: [Xdoclet-user] JBoss 3.2 support broken in 1.2b3 ?
>
> I am trying to convert out application from JBoss 3.0.8 to 3.2.2, and
> when I insert the jboss deploymentdescriptor tag with 3.2 I get some
> weird errors about "duplicate @ejb.ejb-ref with different parameters"
>
> I have checked the generated files, and there are no duplicate ejb-ref's
> that I can find.
>
> Does anyone have any clue? I've searched the maillist, the bug database
> and the web in general, with absolutely no luck.
>
> /Thomas
>
> Top of stackdump:
>
> [ejbdoclet] 31756 [main] INFO XDocletMain.start - Running
> <deploymentdescriptor/>
> [ejbdoclet] Generating EJB deployment descriptor (ejb-jar.xml).
> [ejbdoclet] 34221 [main] ERROR EjbRefTagsHandler.forAllEjbRefs -
> Duplicate @ejb.ejb-ref found with different parameters!
> [ejbdoclet] 34286 [main] ERROR EjbRefTagsHandler.forAllEjbRefs -
> Previous tag:
> @ejb.ejb-ref ref-name="null" ejb-name="Language" view-type="local"
> [ejbdoclet] 34350 [main] ERROR EjbRefTagsHandler.forAllEjbRefs -
> Current tag: @ejb.ejb-ref ref-name="null" ejb-name="Language"
> view-type="local"
> [ejbdoclet] 34405 [main] ERROR XDocletMain.start - Running XDoclet
> failed.
> [ejbdoclet] 34432 [main] ERROR XDocletMain.start - <<Duplicate
> @ejb.ejb-ref with different parameters>>
> [ejbdoclet] file:/home/thomas/src/1.2.0/neupart-sa/build.xml:910:
> XDoclet failed.
> [ejbdoclet] at xdoclet.DocletTask.start(DocletTask.java:461)
> [ejbdoclet] at
> xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:95)
> [ejbdoclet] at org.apache.tools.ant.Task.perform(Task.java:341)
> [ejbdoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
> [ejbdoclet] at
> org.apache.tools.ant.Target.performTasks(Target.java:336)
> [ejbdoclet] at
> org.apache.tools.ant.Project.executeTarget(Project.java:1339)[ejbdoclet]
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
> [ejbdoclet] at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
> [ejbdoclet] at org.apache.tools.ant.Task.perform(Task.java:341)
>
>
>
>
> -------------------------------------------------------
> 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
-------------------------------------------------------
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