ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Modha Kumar <MKu...@calcas.com>
Subject ant and xdoclet
Date Sat, 22 Feb 2003 01:36:23 GMT
Hi

This is XDoclet and ant problem. Please let me know if consider this is not
the forum
to post this.

I got xdoclet working with ant. I have under
com/xxx/yyy/server/ 2 beans CommandServerBean.java    and  PolicyBean.java 
when I run "ant xdoclet-generate"
It is generating 4 files for each bean 
CommandServerBean CommandServerBeanHome CommandServerBeanLocal
CommandServerBeanLocalHome
PolicyBean PolicyBeanHome PolicyBeanLocal PolicyBeanLocalHome

"=======Intresting thing is both my Bean and RemoteInterface has same
name.====="
and when i try to compile I am getting 3 types of errors

================ I get this for each of the 8 generated files
==================
compile:
    [mkdir] Created dir: C:\fnol\build\classes
    [javac] Compiling 25 source files to C:\fnol\build\classes
    [javac] C:\fnol\com\xxx\yyy\server\CommandServerBean.java:21: duplicate
cl
ass: com.ccmc.cure.server.CommandServerBean
    [javac] public class CommandServerBean implements SessionBean {
======================================================================

========================= For Both my CommandServer and Policy
=================
    [javac]
C:\fnol\build\generate\com\xxx\yyy\server\CommandServerBeanHome.ja
va:13: modifier public static not allowed here
    [javac]    public static final String
JNDI_NAME="server/CommandServerBean";
    [javac]                               ^
    [javac]
C:\fnol\build\generate\com\xxx\yyy\server\CommandServerBeanLocalHo
me.java:12: modifier public static not allowed here
    [javac]    public static final String
COMP_NAME="java:comp/env/ejb/server/Co
mmandServerBeanLocal";
    [javac]                               ^
    [javac]
C:\fnol\build\generate\com\xxx\yyy\server\CommandServerBeanLocalHo
me.java:13: modifier public static not allowed here
    [javac]    public static final String
JNDI_NAME="CommandServerLocalHome";
    [javac]                               ^
    [javac]
C:\fnol\build\generate\com\xxx\yyy\server\PolicyBeanHome.java:12:
modifier public static not allowed here
    [javac]    public static final String
COMP_NAME="java:comp/env/ejb/server/Po
licyBean";
============================================================================
===========


My build file tasks

<target name="xdoclet-generate" depends="init"> 
	<mkdir dir="${build.generate.dir}" /> 
	<ejbdoclet 
		destdir="${build.generate.dir}" 
		excludedtags="@version,@author" 
		ejbspec="${ejb.version}" 
		mergedir="${src.resources.dir}/xdoclet" 
		force="${xdoclet.force}" 
	> 
		<fileset dir="${src.main.dir}"> 
			<include name="**/*Bean.java"/> 
		</fileset> 
		<remoteinterface/> 
		<localinterface/> 
		<homeinterface/> 
		<localhomeinterface/> 
		<entitypk/> 
		<entitycmp/> 
		<deploymentdescriptor destdir="${build.meta-inf.dir}"/> 
	</ejbdoclet> 
</target> 

<target name="compile" depends="xdoclet-generate"> 
	<mkdir dir="${build.classes.dir}"/> 
	<javac srcdir="${src.dir}" 
		destdir="${build.classes.dir}" 
		debug="on" 
		deprecation="on" 
		classpathref="build.path" 
		optimize="off" 
		includes="**/*.java"> 
		<src path="${src.dir}"/> 
		<src path="${build.generate.dir}"/> 
	</javac> 
</target> 

======================================
and in the bean I have put
====================================
/**
 * CommandServerBean is a CommandServer which accepts Command Beans from the
Client
 * call their execute method and returns back the result.
 *
 * @ejb:bean
 *     type="Stateless"
 *     name="server/CommandServerBean"
 *     local-jndi-name="CommandServerLocalHome"
 *     view-type="both"
 *
 */


=========================================
on the method i want to be in remote interface

/**
   *  The method that executes command bean.
   *
   *  @param Command inCommingCommand
   *
   *  @throws CommandException
   *  @ejb:interface-method view-type="remote"
*/

What could be the problem.
Thanks for any input.



Mime
View raw message