Ok, in my last message I sent the last version of my
Session bean with the changes that were suggested. I
used to have ":" instead of "." and I used to have
"Stateless" instead of "Session" and it didn't work
either.

I'm using xdoclet1.2b2.

I'm including my build.xml file so you can take a look
at  it. Thanks a lot for your help and concern.

Build.xml

<?xml version="1.0"?>

<project name="XDoclet Examples" default="jar"
basedir=".">
    <property name="xdoclet.root.dir"
value="${basedir}/.."/>
    <property
file="${xdoclet.root.dir}/build.properties"/>

    <property file="build-dist.properties"/>
    <path id="myapp.class.path">
        <fileset dir="${lib.dir}">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="${myapp.lib.dir}">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="${dist.lib.dir}">
            <include name="*.jar"/>
        </fileset>
    </path>

    
    <target name="init">
        <tstamp>
            <format property="TODAY"
pattern="d-MM-yy"/>
        </tstamp>
        <taskdef
            name="xdoclet"
            classname="xdoclet.DocletTask"
            classpathref="myapp.class.path"
            />
        <taskdef
            name="ejbdoclet"
           
classname="xdoclet.modules.ejb.EjbDocletTask"
            classpathref="myapp.class.path"
            />
    </target>

    
    <target name="prepare" depends="init">
        <mkdir dir="${myapp.classes.dir}"/>
        <mkdir dir="${myapp.gen-src.dir}"/>
        <mkdir dir="${myapp.meta-inf.dir}"/>
    </target>

    
    <target name="ejbdoclet" depends="prepare">

        
        <ejbdoclet
            destdir="${myapp.gen-src.dir}"
            mergedir="parent-fake-to-debug"
            excludedtags="@version,@author,@todo"
            addedtags="@xdoclet-generated at
${TODAY},@copyright The XDoclet Team,@author
XDoclet,@version ${version}"
            ejbspec="2.0"
            force="${myapp.xdoclet.force}"
            verbose="true"
            >

            <fileset dir="${myapp.java.dir}">         
  
                                <include name="ServiceBean.java" />
                        </fileset>


            <packageSubstitution packages="ejb"
substituteWith="interfaces"/>

            <remoteinterface/>
            <localinterface/>
            <homeinterface/>
            <localhomeinterface/>

            <deploymentdescriptor
                destdir="${myapp.meta-inf.dir}"
                validatexml="true"
                mergedir="fake-to-debug"
                />

            <jboss
                version="3.0"
                xmlencoding="UTF-8"
                destdir="${myapp.meta-inf.dir}"
                validatexml="true"
                />
        </ejbdoclet>

    </target>

    

    <target name="compile" depends="ejbdoclet">

        <javac
            destdir="${myapp.classes.dir}"
            classpathref="myapp.class.path"
            debug="on"
            deprecation="on"
            optimize="off"
            >

            <src path="${myapp.java.dir}"/>
            <src path="${myapp.gen-src.dir}"/>

        </javac>

    </target>
</project>

--- Adam Houghton <[EMAIL PROTECTED]> wrote:
> Sorry, I accidentally sent that mail too soon.
> 
> The . in the jndi-name might cause you some
> portability issues down the line, but that shouldn't
> effect your use of XDoclet.
> 
> What version of XDoclet are you using?  Did you
> build it yourself?  It should definitely be
> "Stateless" or "Stateful" in the @ejb.bean type if
> you're using 1.2b2.
> 
> Also, what does your build.xml file look like?
> 
> - Adam
> 
> 
> > -----Original Message-----
> > From: Dos Santos [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, June 10, 2003 1:33 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [Xdoclet-user] Error creating ejb-jar
> file for 
> > Session Bean
> > 
> > 
> > I tried changing it to type="Session" and it keeps
> > giving me the same problem. I also tried the
> previous 
> > suggestion of making it an abstract class and it
> didn't work either.
> > 
> > Any other suggestions? I'm including my Session
> Bean
> > code so you guys can take a look at it.
> > 
> > Thanks again.
> > 
> > Code:
> > 
> > package MyPackage;
> > 
> > import java.rmi.RemoteException;
> > import java.util.Properties;
> > import java.util.Collection;
> > import javax.naming.*;
> > import javax.ejb.*;
> > import
> MyEntityBeans.interfaces.DemoServiceLocalHome;
> > 
> > 
> > /**
> >  *
> >  * @ejb.bean name="ServiceBean"
> >  *             type="Session"
> >  *             jndi-name="tellarian.Service"
> >  */
> >  
> >  public class ServiceBean implements SessionBean {
> >     private DemoServiceLocalHome demoServiceHome;
> >     
> >     public void ejbCreate() throws CreateException {
> >             try {
> >            Context context = new InitialContext();
> >                demoServiceHome =
> > (DemoServiceLocalHome)context.lookup
> > (DemoServiceLocalHome.COMP_NAME);
> >             }
> >             catch (NamingException e) {
> >                     throw new CreateException("Lookup
> failed");
> >             }
> >     }
> >     
> >     
> > /**
> >  *  Finder method for DemoService
> >  *
> >  *  @ejb.interface-method view-type="remote"
> >  */
> >    
> >    public Collection findDemoServiceTest() throws
> FinderException {
> >     Collection c = null;
> >     try{
> >             c = demoServiceHome.findByName("Test"); 
> >     }
> >     catch (FinderException e){
> >             throw e;
> >     }
> >     return c;
> >    }
> >    
> >    public void ejbRemove(){
> >    }
> >    
> >    public void ejbActivate(){
> >    }
> >    
> >    public void ejbPassivate(){
> >    }
> >    
> >    public void setSessionContext(SessionContext
> ctx){
> >    }
> >    
> >   }
> > 
> > 
> > --- "Harkness, David" <[EMAIL PROTECTED]>
> > wrote:
> > > Just a guess here, but I suspect EJBDoclet
> doesn't
> > > discern between
> > > stateless and stateful SESSION beans. Change
> your
> > > tag to "session"
> > > (that's what I'm using for our stateless session
> > > beans).
> > > 
> > >  * @ejb:bean name="ServiceBean"
> > >  *             type="Session"
> > >                ^^^^^^^
> > >  *             jndi-name="Service"
> > > 
> > > -----Original Message-----
> > > From: Dos Santos [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, June 09, 2003 2:49 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [Xdoclet-user] Error creating ejb-jar
> file
> > > for Session Bean
> > > 
> > > 
> > > Hi all, I'm working on a session bean and I'm
> trying
> > > to generate with Xdoclet. I'm getting the
> following
> > > error while generating my ejb-jar.xml:
> > > 
> > > [ejbdoclet] org.xml.sax.SAXParseException: The
> > > content
> > > of element type "enterpri
> > > se-beans" is incomplete, it must match 
> > > "(session|entity|message-driven)+"
> > > 
> > > I have the following "header" in my session bean
> > > .java
> > > file:
> > > 
> > >  * @ejb:bean name="ServiceBean"
> > >  *             type="Stateless"
> > >  *             jndi-name="Service"
> > > 
> > > As for my build file, I have the following
> inside my <ejbdoclet>
> > > <filset> tag:
> > > 
> > > <fileset dir="${myApplication.java.dir}">       
>    
> > > 
> > > <include name="ServiceBean.java" />
> > > </fileset>
> > > 
> > > Just to be sure if my "dir" was correct I did an
> > > echo
> > > on it and it was fine.
> > > 
> > > I have no clue as to what could be wrong. I
> would
> > > truly appreciate any help.
> > > 
> > > Regards.
> > > 
> > > 
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Calendar - Free online calendar with sync
> to Outlook(TM).
> > > http://calendar.yahoo.com
> > > 
> > > 
> > >
> >
>
-------------------------------------------------------
> > > This SF.net email is sponsored by:  Etnus,
> makers of TotalView, The 
> > > best thread debugger on the planet. Designed
> with thread
> > > debugging features
> > > you've never dreamed of, try TotalView 6 free at
> > > www.etnus.com.
> > > _______________________________________________
> > > xdoclet-user mailing list
> > > [EMAIL PROTECTED]
> > >
> >
>
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> > > 
> > > 
> > >
> >
>
-------------------------------------------------------
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to