Hi
 
I am getting the following error while compiling my source files, however if I remove the following tag from build-ejbgen.xml I get no errors and the sources are compiled fine.
 
  <jboss destdir="${ejb.deployment.dir}"
   version="3.2"/>
 
/************** error *******************************/
 
file:C:/MyStore/build-ejbgen.xml:22: Can't create a jboss element under ejbdoclet. Make sure the jar file containing the corresponding subtask class is on the classpath specified in the <taskdef> that defined {2}.
        at xdoclet.DocletTask.createDynamicElement(DocletTask.java:347)
        at org.apache.tools.ant.IntrospectionHelper.createElement(IntrospectionHelper.java:510)
        at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:239)
        at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:122)
        at org.apache.tools.ant.Task.perform(Task.java:340)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
Total time: 1 second
 
 
/****************************************************/
 
I have attached the build.xml and build-ejbgen.xml.
 
I would really appreciate any help.
 
Regards
Arup
 


Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
<?xml version="1.0" encoding="UTF-8"?>

<project name="MyStore" default="buildonly" basedir=".">
	<description>My Store example</description>

	<property name="application.xml" location="application.xml"/>
	<property name="app.name" value="MyStore"/>
	
	<property name="some.dummy.value" value="Howdy!" />
	
	<property name="LOG_LEVEL" value="debug"/>
	<property name="OwnerRole" value="mystoreowner"/>	

	
  <!-- REGULAR DIRECTORIES -->	
	<property name="src.dir" location="src"/>
	<property name="build.dir" location="build"/>
	<property name="distro.dir" location="distro"/>
	<property name="lib.dir" location="lib"/>
	<property name="merge.dir" location="mergeDir"/>
	<property name="ejb.jar.dir" location="ejbjars"/>


	<!-- GENERATED DIRECTORIES -->
	<property name="gen.src.dir" location="gensrc"/>	
	<property name="generated.dir" location="generated"/>
	<property name="ejb.deployment.dir" location="${generated.dir}/ejbdeploy"/>
	
	<!-- WHERE XDOCLET JARS ARE -->
	<property name="xdoclet.lib.dir" location="xdocletlib"/>
	
    <!-- WHERE TO DEPLOY THE FINISHED EAR FILE -->
    <property name="deploy.path" location="C:/jboss-3.2.1/server/default/deploy"/>

	<path id="compile.path">
		<fileset dir="${lib.dir}" includes="*.jar"/>
    </path>
    
    <path id="xdoclet.lib.path">
      <fileset dir="${lib.dir}" includes="*.jar"/>
      <fileset dir="${xdoclet.lib.dir}" includes="*.jar"/>
    </path>
	
	<target name="clean" description="Delete all directories and files created in the build.">
		<delete dir="${gen.src.dir}/com"/>
		<delete dir="${ejb.deployment.dir}"/>
		<delete dir="${ejb.jar.dir}"/>
		<delete dir="${build.dir}"/>
		<delete dir="${distro.dir}"/>
		<delete dir="${generated.dir}"/>
	</target>

	<target name="generate" description="Generate files with XDoclet.">
		<ant antfile="build-ejbgen.xml" target="generate-ejb"/>
	</target>

  <target name="compile" depends="generate" description="Compile source code.">
  	<mkdir dir="${build.dir}"/>
    <javac destdir="${build.dir}" 
    	classpathref="xdoclet.lib.path">
    	<src path="${gen.src.dir};${src.dir}"/>
    </javac>
  </target>
  
  <target name="package-app" depends="compile" description="Create an EAR file to deploy.">
    <ant antfile="build-package.xml" target="build-ear"/>
  </target>

  <target name="deploy" description="Deploy EAR file.">
  	<copy file="${distro.dir}/${app.name}.ear" 
  		todir="${deploy.path}"/>
  </target>

  <target name="build-clean" depends="clean,package-app"/>  

  <target name="buildonly" depends="package-app"/>  

  <target name="builddeploy" depends="buildonly,deploy"/>
  
  <target name="zipItUp" depends="clean">
    <mkdir dir="${distro.dir}"/>
    
    <zip destfile="${distro.dir}/${ant.project.name}.zip">
      <zipfileset dir="." prefix="${ant.project.name}">
        <include name="**"/>
        <exclude name="lib/*.jar" unless="zipJars"/>
        <exclude name="xdocletlib/*.jar" unless="zipJars"/>
        <exclude name="bin/**"/>
        <exclude name="distro/**"/>
      </zipfileset>
    </zip>
  </target>
</project>
<?xml version="1.0" encoding="UTF-8"?>

<project name="MyStore" default="generateEjb" basedir=".">

	<property name="dist.root" value="C:/jboss-3.2.1"/>
	<property name="jboss.dist" value="C:/jboss-3.2.1/server/default"/>


	<path id="xdoclet.lib.path">
		<fileset dir="${lib.dir}" includes="*.jar"/>
		<fileset dir="${xdoclet.lib.dir}" includes="*.jar"/>
		<fileset dir="${dist.root}/client" includes="*.jar"/>
		<!--<fileset dir="${jboss.dist}/lib" includes="*.jar"/> -->
	</path>
	
	<target name="generate-ejb">
		<taskdef name="ejbdoclet" 
			classname="xdoclet.modules.ejb.EjbDocletTask"
			classpathref="xdoclet.lib.path"/>
		
		<!-- Generate EJB "stuff" -->
	  <ejbdoclet destdir="${gen.src.dir}" mergeDir="${merge.dir}">
	  	<packageSubstitution packages="ejb" 
	  		substituteWith="interfaces"/>
	  	
	  	<fileset dir="${src.dir}">
	  		<include name="**/*Bean.java" />
	  		<include name="**/*Service.java" />
	  	</fileset>

      <!-- Generate a deployment descriptor file,
      	   including all beans processed. -->
	  	<deploymentdescriptor 
	  		destdir="${ejb.deployment.dir}"/>
			
		<jboss destdir="${ejb.deployment.dir}"
			version="3.2"/>
        
      <!-- Generate all of the home and logical
      	   interfaces, unless told otherwise in
      	   the meta-information. -->
	  	<homeinterface/>
	  	<remoteinterface/>
	  	<localinterface/>
	  	<localhomeinterface/>
	  	
	  	<!-- Generate a value object if the bean 
	  		   has a @ejb.value-object tag.-->
	  	<valueobject>
	  		<packageSubstitution 
	  			packages="ejb" substituteWith="value"/>
  		</valueobject>

      <!-- Generate a utility object for each EJB. -->
  		<utilobject includeGUID="true" cacheHomes="true">
	  		<packageSubstitution 
	  			packages="ejb" substituteWith="util"/>
 			</utilobject>
	  	
	  	<!-- Generate complete entity and session
	  		   classes (including ejbXXX() methods)
	  		   based on the implementation class. -->
	    <entitybmp/>
     	<entitycmp/>
	  	<session/>
	  	
	  	<entitypk>
	  		<packageSubstitution 
	  			packages="ejb" substituteWith="pk"/>
	  	</entitypk>
	  	<dao pattern="{0}Dao">
	  		<packageSubstitution 
	  			packages="ejb" substituteWith="dao"/>	  		
	  	</dao>
	  </ejbdoclet>
	</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>

<project name="MyStore" default="build-ear" basedir=".">
  <target name="build-ear" depends="build-ejb-jar">
  	<mkdir dir="${distro.dir}"/>
  	
  	<ear destfile="${distro.dir}/${app.name}.ear" 
  		appxml="${application.xml}">
  		
  		<fileset dir="${ejb.jar.dir}" includes="*.jar"/>
  	</ear>
  </target>

  <target name="build-ejb-jar">
  	<mkdir dir="${ejb.jar.dir}"/>
  	
  	<ejbjar srcdir="${build.dir}" 
  		descriptordir="${ejb.deployment.dir}"
		  destdir="${ejb.jar.dir}" 
		  basejarname="${app.name}"
		  naming="basejarname" 
		  genericjarsuffix="-ejb.jar">
		  
		  <include name="*.xml"/>
		  
		  <support dir="${build.dir}">
		  	<include name="**/*Value.class"/>
		  	<include name="**/*Bean.class"/>
		  	<include name="**/*Util.class"/>
		  	<include name="**/*Exception.class"/>
		  </support>
		  
		  <dtd
		  publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
		  location="./ejb-jar_2_0.dtd"
		  />
		</ejbjar>
  </target>

</project>

Reply via email to