Thanks for info Jason,
I also just want to use the min configuration necessary, but find it difficult to determine what that is :-) But i'm getting there.



I add the tags

at class level:

* @ejb.persistence table-name="sometable"

to explicitly define the table name, then

* @jboss.persistence create-table="true" remove-table="true"

to tell jboss wether or not to create and remove the table

then at method level, just

* @ejb.persistence column-name="somecolumnname"

the type mapping should be handled by the typemapping="HypersonicSQL" property of the <jboss> module in your ant task.

and you should be able to skip the @ jboss tags at the method level.

As a general rule, I try to not include any more jboss tags than are necessary to get things to work.

I have noticed that using other than lower case letters for table names and column names causes problems for some databases.

On Wednesday, September 24, 2003, at 05:07 PM, Kevin Norton wrote:

I have put in about 3 days worth of struggling to use Xdoclet. Need basic beginner help.

I can get my Entity Bean to launch and I can get a handle to the home interface by using the generated Util Class. But when I try to call my create method I get the following error.

javax.ejb.CreateException: Could not create entity:java.sql.SQLException: Column not found: DESC in statement [INSERT INTO ROLES (name, desc, comments) VALUES ('Kevin', 'All', 'Everyone')] at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDB CCreateEntityCommand.java:199

My Base Bean is as follows. Any pointer and help as to why I'm getting this error would be greatly appreciated and have much impact on how much more time I put into learning xdoclet.
Thanks...


package test.ejb;

import test.interfaces.*;
import javax.ejb.EntityBean;
import javax.ejb.CreateException;


/** * @ejb:bean * name="Roles" * type="CMP" * view-type="local" * local-jndi-name="test.interfaces.RolesLocalHome" * schema="Roles" * * @ejb.util generate="physical" * @ejb.finder signature="java.util.Collection findAll()" * @ejb:value-object name="Roles" match="*" * */ public abstract class RolesBean implements EntityBean {

   /**
    * @ejb.pk-field
    * @ejb.persistent-field
    * @ejb.persistence
    *      column-name="NAME"
    *      jdbc-type="VARCHAR"
    *      sql-type="varchar(255)"
    * @ejb.interface-method
    */
   public abstract String getName();

   public abstract void setName(String name);
   /**
    * @ejb:interface-method
    * @ejb:persistent-field
    * @ejb.persistence
    *      column-name="desc"
    *      jdbc-type="VARCHAR"
    *      sql-type="varchar(255)"
    *  @jboss.column-name name="desc"
    *  @jboss.sql-type type = "varchar(255)"
    *  @jboss.jdbc-type type = "VARCHAR"
    */
   public abstract String getDesc();

   public abstract void setDesc(String desc);
   /**
    * @ejb:interface-method
    * @ejb:persistent-field
    * @ejb.persistence
    *      column-name="comments"
    *      jdbc-type="VARCHAR"
    *      sql-type="varchar(255)"
    *  @jboss.column-name name="comments"
    *  @jboss.sql-type type = "varchar(255)"
    *  @jboss.jdbc-type type = "VARCHAR"
    */
   public abstract String getComments();

public abstract void setComments(String comments);

   /**
    * @ejb.create-method
    */
   public RolesPK ejbCreate(String name,String desc,String comments )
       throws CreateException
   {
       setName(name);
       setDesc(desc);
       setComments(comments);
       return null;
   }
   public void ejbPostCreate(String name,String desc, String comments   )
       throws CreateException {}
}

_________________________________________________________________
Get McAfee virus scanning and cleaning of incoming attachments. Get Hotmail Extra Storage! http://join.msn.com/?PAGE=features/es




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user


-jason



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

_________________________________________________________________
Add MSN 8 Internet Software to your existing Internet access and enjoy patented spam protection and more. Sign up now! http://join.msn.com/?page=dept/byoa




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to