Off the top of my head, here's a couple things that might be causing you problems:
- You need the type="Stateless" in your @ejb.bean, not type="Session".  
- The . in your jndi name might cause you problem

> -----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
> > 
> > 
> >
> -------------------------------------------------------
> > 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
> 
> 
> __________________________________
> 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
> 


-------------------------------------------------------
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