From: Marco M. <mmi...@gm...> - 2006-08-09 08:13:34
|
hi all, i m currently using xdoclet for generating sources for my EJBs.. problem is, my project is a Multi-Project..... its structure is as follows MyProject |____ EJB1 |____ EJB2 i m generating sources for both EJB1 project and EJB2 project issue is that one of the beans in EJB2 has to have a reference to one of the beans of EJB1. for example, in EJB1 i have a bean named 'Contact', and in EJB2 one of the ejbs has a reference to my 'Contact' bean when generating sources in EJB2, XDoclete raises the following error [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error executing ant tasks Embedded error: Unexpected error No such EJB defined: Contact [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal( DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks( AbstractAntMojo.java:77) at org.codehaus.mojo.xdoclet.XDocletMojo.execute(XDocletMojo.java:102) at org.apache.maven.plugin.DefaultPluginManager.executeMojo( DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( DefaultLifecycleExecutor.java:534) ... 16 more Caused by: Unexpected error at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:118) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks( AbstractAntMojo.java:71) ... 19 more Caused by: XDoclet failed. at xdoclet.DocletTask.start(DocletTask.java:471) at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:105) ... 23 more Caused by: xdoclet.XDocletException: No such EJB defined: Contact at xdoclet.modules.ejb.env.EnvEjbRefTagsHandler.findEjb( EnvEjbRefTagsHandler.java:392) at xdoclet.modules.ejb.env.EnvEjbRefTagsHandler.doGenerate( EnvEjbRefTagsHandler.java:312) at xdoclet.modules.ejb.env.EnvTagsHandler.forTagsInternal( EnvTagsHandler.java:531) at xdoclet.modules.ejb.env.EnvTagsHandler.forTags(EnvTagsHandler.java :451) at xdoclet.modules.ejb.env.EnvEjbRefTagsHandler.forAllEjbRefs( EnvEjbRefTagsHandler.java:79) at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:641) at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:540) at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java :965) at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java :932) at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:472) at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:348) at xdoclet.XDocletTagSupport.generate(XDocletTagSupport.java:742) at xdoclet.tagshandler.MergeTagsHandler.generateUsingMergedFile( MergeTagsHandler.java:297) at xdoclet.tagshandler.MergeTagsHandler.merge(MergeTagsHandler.java:120) at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:641) at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:540) at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java :965) at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java :932) at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:472) at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:348) at xdoclet.XDocletTagSupport.generate(XDocletTagSupport.java:742) at xdoclet.tagshandler.MergeTagsHandler.generateUsingMergedFile( MergeTagsHandler.java:297) at xdoclet.tagshandler.MergeTagsHandler.merge(MergeTagsHandler.java:120) at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:641) at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:540) at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java :965) at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java :932) at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:472) at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:348) at xdoclet.XDocletTagSupport.generate(XDocletTagSupport.java:742) at xdoclet.modules.ejb.EjbTagsHandler.ifIsAConcreteEJBean( EjbTagsHandler.java:642) at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:641) at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:567) at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java :965) at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java :932) at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:472) at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:348) at xdoclet.XDocletTagSupport.generate(XDocletTagSupport.java:742) at xdoclet.modules.ejb.session.SessionTagsHandler.forAllSessionBeans( SessionTagsHandler.java:253) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:641) at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:540) at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java :965) at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java :932) at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:472) at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:348) at xdoclet.template.TemplateEngine.start(TemplateEngine.java:415) at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:562) at xdoclet.TemplateSubTask.startProcessForAll(TemplateSubTask.java:618) at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:599) at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:227) at xdoclet.modules.ejb.dd.EjbDotXmlSubTask.execute(EjbDotXmlSubTask.java :240) at xdoclet.XDocletMain.start(XDocletMain.java:48) at xdoclet.DocletTask.start(DocletTask.java:468) ... 24 more and that's because my Contact EJB is in EJB1 project..... am i doing something wrong? are there any workarounds? thanks in advance and regards Marco |