JBoss-IDE 1.3.0 - Tutorial - interface not created!
weichang May 12, 2005 4:21 PMHi all,
I'm using Eclipse 3.0.2 with JBoss-IDE and X-DOC 4.0.X(also tried 3.2.x).
I went through the tutorial step by step, no problem at all.
But after run the x-doclet, there is no "tutorial.interfaces" package and no interface classes at all.
everything looks fine don't why. Here is the code:
------------------------------------------------------------
/* * Created on May 12, 2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package tutorial.ejb; import java.rmi.RemoteException; import javax.ejb.EJBException; import javax.ejb.SessionBean; import javax.ejb.SessionContext; import javax.ejb.CreateException; /** * @ejb.bean name="Fibo" * display-name="Name for Fibo" * description="Description for Fibo" * jndi-name="ejb/Fibo" * type="Stateless" * view-type="remote" */ public class FiboBean implements SessionBean { /** * */ public FiboBean() { super(); // TODO Auto-generated constructor stub } /* (non-Javadoc) * @see javax.ejb.SessionBean#ejbActivate() */ public void ejbActivate() throws EJBException, RemoteException { // TODO Auto-generated method stub } /* (non-Javadoc) * @see javax.ejb.SessionBean#ejbPassivate() */ public void ejbPassivate() throws EJBException, RemoteException { // TODO Auto-generated method stub } /* (non-Javadoc) * @see javax.ejb.SessionBean#ejbRemove() */ public void ejbRemove() throws EJBException, RemoteException { // TODO Auto-generated method stub } /* (non-Javadoc) * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext) */ public void setSessionContext(SessionContext ctx) throws EJBException, RemoteException { // TODO Auto-generated method stub } /** * Default create method * * @throws CreateException * @ejb.create-method */ public void ejbCreate() throws CreateException { // TODO Auto-generated method stub } /** * Business method * @ejb.interface-method view-type = "remote" */ public double[] compute(int number) { if (number < 0) { throw new EJBException("Argument should be positive"); } double[] suite = new double[number + 1]; suite[0] = 0; if (number == 0) { return suite; } suite[1] = 1; for (int i = 2; i <= number; i++) { suite = suite[i - 1] + suite[i - 2]; } return suite; } }
the x-doclet file:
<?xml version="1.0" encoding="UTF-8"?> <project default="_xdoclet_generation_" name="XDoclet Generator"> <property file="xdoclet-build.properties"/> <property name="eclipse.home" value="D:/eclipse"/> <property name="xdoclet.basedir" value="${eclipse.home}/plugins/org.jboss.ide.eclipse.xdoclet.core_1.4.1.e31-jre14"/> <property name="jboss.net.version" value="4.0"/> <path id="project.classpath"><pathelement location="bin"/> <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.4.1.e31-jre14/lib/j2ee-1.3/ejb-api.jar"/> <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.4.1.e31-jre14/lib/j2ee-1.3/jca-api.jar"/> <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.4.1.e31-jre14/lib/j2ee-1.3/jms-api.jar"/> <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.4.1.e31-jre14/lib/j2ee-1.3/jsp-api.jar"/> <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.4.1.e31-jre14/lib/j2ee-1.3/jta-api.jar"/> <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.4.1.e31-jre14/lib/j2ee-1.3/servlet-api.jar"/> <pathelement location="${eclipse.home}/plugins/org.jboss.ide.eclipse.jdt.j2ee.core_1.4.1.e31-jre14/lib/j2ee-1.3/sql-api.jar"/> </path> <path id="xdoclet.classpath"> <path refid="project.classpath"/> <fileset dir="${xdoclet.basedir}"> <include name="*.jar"/> <exclude name="xdoclet-module-jboss-net-*.jar"/> </fileset> <fileset dir="${xdoclet.basedir}"> <include name="xdoclet-module-jboss-net-${jboss.net.version}*.jar"/> </fileset> </path> <target name="_xdoclet_generation_" depends="N10004"/> <target name="N10004" description="EJB"> <taskdef classpathref="xdoclet.classpath" classname="xdoclet.modules.ejb.EjbDocletTask" name="ejbdoclet"/><ejbdoclet ejbSpec="2.0" destDir="src" > <fileset dir="src" includes="**.*/*Bean.java" > </fileset> <deploymentdescriptor destDir="src/META-INF" > </deploymentdescriptor> <jboss Version="3.0" destDir="src/META-INF" > </jboss> <packageSubstitution packages="ejb" substituteWith="interfaces" > </packageSubstitution> <homeinterface> </homeinterface> <remoteinterface> </remoteinterface> </ejbdoclet></target> </project>
and the output after run x-doclet:
Buildfile: D:\workspace\Tutorial\xdoclet-build.xml N10004: [ejbdoclet] (XDocletMain.start 47 ) Running <deploymentdescriptor/> [ejbdoclet] (XDocletMain.start 47 ) Running <jboss/> [ejbdoclet] (XDocletMain.start 47 ) Running <homeinterface/> [ejbdoclet] (XDocletMain.start 47 ) Running <remoteinterface/> _xdoclet_generation_: BUILD SUCCESSFUL Total time: 7 seconds
Please help me!
Thanks!