[ 
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1656?page=comments#action_17764
 ] 

Andrew Stevens commented on XDT-1656:
-------------------------------------

Is the build script really in the root of your package hierarchy? i.e. is the 
ejb subdirectory in the same directory?  It would be more usual to use a 
separate source subdirectory, so that other directories (e.g. the generated 
directory that you create) don't also get treated as packages and scanned by 
the parser.

Also, is the ejb-jar.xml that is generated well-formed?  If there's an error 
during the processing, it's likely left half finished.  If it's complete but no 
bean data in it, it's more likely it found no files that match the pattern it's 
using (or the package in the files doesn't match the path to them under the 
fileset's root, in which case the parser skips them).

Asides from that, it's been over six months; is this still an issue anyway?


> Unable to generate remote and home interfaces using XDoclet-1.2.3
> -----------------------------------------------------------------
>
>          Key: XDT-1656
>          URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1656
>      Project: XDoclet
>         Type: Bug

>   Components: EJB Module
>     Versions: 1.2.3
>  Environment: Windows XP, Ant-1.6.5, XDoclet-1.2.3
>     Reporter: viswabharathi
>     Assignee: xdoclet-devel (Use for new issues)

>
>
> Hai,
>                         I am new to XDoclet. I wrote a simple session bean 
> and build file with ejbdoclet task.  The ejbdoclet task is 
> not creating the interfaces. It created ejb-jar.xml. But there is no EJB 
> details in it.  Also, I found another bug. Even when I 
> give a non-existing file in fileset inside ejbdoclet, it is not giving any 
> error.
> I am attaching the code I tried. Please let me know, what should I do, in 
> order to solve the above problems.
> package ejb;
> import java.rmi.RemoteException;
> import javax.ejb.EJBException;
> import javax.ejb.SessionBean;
> import javax.ejb.SessionContext;
> /**
>  * @ejb:bean class="ejb.OperationsBean" name="ejb.OperationsBean" 
> jndi-name="JNDI.OperationsHome" type="Stateless" display-name="OperationsEJB" 
> view-type="remote"
>  * @ejb:home remote-class="ejb.OperationsHome"
>  * @ejb:interface remote-class="ejb.Operations"
>  * 
>  */
> public class OperationsBean implements SessionBean
> {
>       SessionContext sessionContext = null;
>       
>       public OperationsBean()
>       {
>       }
>       
>       public void ejbCreate() throws EJBException, RemoteException
>       {
>       }
>       public void ejbActivate() throws EJBException, RemoteException
>       {
>       }
>       public void ejbPassivate() throws EJBException, RemoteException
>       {
>       }
>       public void ejbRemove() throws EJBException, RemoteException
>       {
>       }
>       public void setSessionContext(SessionContext context) throws 
> EJBException, RemoteException
>       {
>               sessionContext = context;
>       }
>       /**
>        * @ejb:interface-method view-type="remote"
>        */
>       public int add(int x, int y)
>       {
>               return (x+y);
>       }
>       /**
>        * @ejb.interface-method view-type="remote"
>        */
>       public int sub(int x, int y)
>       {
>               return (x-y);
>       }
> }
>                                                
> -----------------------------------------------------------------------------
> Here is the build file
> -----------------------------------
> <project name="Checking_XDoclet" basedir="." default="generate">
> <property environment="env"/>
> <target name = "init">
>       <mkdir dir="generated"/>
>       <taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask">
>               <classpath>
>                       <pathelement 
> location="${env.XDOCLET}/lib/xdoclet-ejb-module-1.2.3.jar"/>
>                       <pathelement 
> location="${env.XDOCLET}/lib/xdoclet-1.2.3.jar"/>
>                       <pathelement 
> location="${env.XDOCLET}/lib/xjavadoc-1.1.jar"/>
>                       <pathelement 
> location="${env.XDOCLET}/lib/commons-collections-2.0.jar"/>
>                       <pathelement 
> location="${env.XDOCLET}/lib/commons-logging.jar"/>
>               </classpath>
>       </taskdef> 
> </target>
> <target name = "generate" depends="init">
>       <echo message="${basedir}"/>
>       <ejbdoclet destdir="generated" ejbspec="2.0" force="true">
>               <fileset dir="${basedir}"/>
>               <remoteinterface pattern="{0}Remote"/>
>               <homeinterface pattern="{0}Remote"/>
>               <session/>
>               <deploymentdescriptor destdir="generated" displayname="My 
> Deployment Descriptor" description="My first XDoclet"/>
>       </ejbdoclet>
> </target>
> <target name = "clean">
>       <delete dir="generated"/>
> </target>
> </project>
> Ok. Thanks in advance

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to