Woah, my bad. I just looked at my bean and indeed I am using
type="Stateless" (capital S, in case that matters). I don't see anything
wrong with yours, but I have a few more tags. Are you sure there isn't
some non-printable character in there? Doubtful, but that's pretty much
all I can think of right now. Here's what I have minus the business
methods:
-------- 8< -------------------------------------------- 8< --------
package dd.ejb.session.identity;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.ejb.CreateException;
/**
* Simple session bean to test accessing a User bean.
*
* @ejb.bean name="UserService"
* description="User Bean Service"
* type="Stateless"
* view-type="both"
* jndi-name="identity/remote/UserServiceHome"
* local-jndi-name="identity/local/UserServiceHome"
*
* @ejb.transaction type="Required"
*
* @weblogic.pool initial-beans-in-free-pool="10"
* max-beans-in-free-pool="30"
*/
public class UserServiceEJB implements SessionBean
{
/** Holds the context for this session bean instance */
private SessionContext context = null;
/**
* Looks up a reference to the local homes for User, Address, Phone,
* and UserBU for future use.
*
* @throws CreateException if the lookup fails
*/
public void ejbCreate ( )
throws CreateException
{
...
}
/**
* Sets this session bean's context.
*
* @param ctx new session context
*/
public void setSessionContext ( SessionContext ctx )
{
context = ctx;
}
/**
* Returns this session bean's context.
*
* @return the session context
*/
public void unsetSessionContext ( SessionContext ctx )
{
context = null;
}
/**
* Called by the EJB container when this session bean is activated.
* This bean does nothing in response.
*/
public void ejbActivate ( )
{ }
/**
* Called by the EJB container when this session bean is passivated.
* This bean does nothing in response.
*/
public void ejbPassivate ( )
{ }
/**
* Called by the EJB container when this session bean is removed.
* This bean does nothing in response.
*/
public void ejbRemove ( )
{ }
}
-------- 8< -------------------------------------------- 8< --------
Hope that helps!
Dave
David Harkness
Sony Pictures Digital Networks
-----Original Message-----
From: Dos Santos [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 10:33 AM
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