Hey D'Averc!

Thanks for your help.
Which XDoclet-version are you using?

Actually I was using version 1.2.3, now I tried (desperately seeking for a
reason why the create-method wasn't generated) version 1.2.2. 
TADAAA it works...
Don't know if it is a bug in the latest XDoclet version perhaps?





D wrote:
> 
> Hi - have you tried leavng the main jndi tag out? Putting a local jndi ref
> in there should be enough because you are specifying view type of local. I
> am a newbie to xdoclet, but I'd try that first.
> 
> Thanks,
> D'Averc.
> 
> 
> 
> rapunzel wrote:
>> 
>> Hello!
>> 
>> I am trying to generate EJB Interfaces with XDoclet. 
>> Everything works fine, but the create-Methode in the LocalHomeInterface
>> isn't generated.
>> 
>> Here is my EntityBean:
>> 
>>  (...) 
>> 
>> /**
>>  * BenutzerEJB
>>  *
>>  * @ejb.bean type="CMP" name="Benutzer" reentrant="false"
>> primkey-field="id" view-type="local"
>>  * jndi-name="com.xxx.xxx.benutzer.ejb.BenutzerLocalHome"
>> local-jndi-name="com.xxx.xxx.benutzer.ejb.BenutzerLocalHome"
>>  * @ejb.finder query="SELECT OBJECT(p) FROM BenutzerEJB AS p"
>> signature="java.util.Collection findAll()"
>>  * @ejb.finder query="SELECT OBJECT(p) FROM BenutzerEJB AS p WHERE
>> p.user=?1" signature="com.xxx.xxx.benutzer.ejb.BenutzerLocal
>> findByUser(java.lang.String userid)"
>>  * @ejb.finder query="SELECT OBJECT(p) FROM BenutzerEJB AS p WHERE
>> p.ldapUserId=?1" signature="com.xxx.xxx.benutzer.ejb.BenutzerLocal
>> findByLdapUserId(java.lang.String userid)"
>>  * @ejb.finder query="SELECT OBJECT(p) FROM BenutzerEJB AS p WHERE p.name
>> like ?1" signature="java.util.Collection
>> findByStartcharacter(java.lang.String character)"
>>  * @ejb.persistence table-name="T_Benutzer"
>>  * @weblogic.data-source-name afm_tx_DS
>>  * @weblogic.automatic-key-generation generator-type="ORACLE"
>> generator-name="BENUTZER" key-cache-size="10"
>>  */
>> public abstract class BenutzerEJB implements EntityBean {
>> 
>>   private EntityContext ctx = null;
>>   private transient Category cat = Category.getInstance(this.getClass());
>> 
>>   public BenutzerEJB() {
>>   }
>> 
>>   public void ejbActivate() throws EJBException {
>>   }
>> 
>>   public void ejbLoad() throws EJBException {
>>   }
>> 
>>   public void ejbPassivate() throws EJBException {
>>   }
>> 
>>   public void ejbRemove() throws RemoveException, EJBException {
>>   }
>> 
>>   public void ejbStore() throws EJBException {
>>   }
>> 
>>   public void setEntityContext(EntityContext entityContext) throws
>> EJBException {
>>     ctx = entityContext;
>>   }
>> 
>>   public void unsetEntityContext() throws EJBException {
>>     ctx = null;
>>   }
>> 
>>   public Integer ejbCreate() throws CreateException {
>>     return null;
>>   }
>> 
>>   public void ejbPostCreate() throws CreateException {
>>   }
>> 
>>   /**
>>    * @ejb.interface-method view-type="local"
>>    * @ejb.persistence column-name="user"
>>    * @ejb.transaction type="Required"
>>    * @ejb.permission role-name="afmrole"
>>    */
>>   public abstract String getUser();
>> 
>> (...)
>> 
>> 
>> If I add 
>>   /**
>>    * @ejb.create-method
>>    */
>> to the ejbCreate-method the generation stops after generating this:
>> 
>> /**
>>  * Local home interface for Benutzer.
>>  * @xdoclet-generated
>>  */
>> public interface BenutzerLocalHome
>>    extends javax.ejb.EJBLocalHome
>> {
>>    public static final String
>> COMP_NAME="java:comp/env/ejb/BenutzerLocal";
>>    public static final String
>> JNDI_NAME="com.xxx.xxx.benutzer.ejb.BenutzerLocalHome";
>> 
>> 
>> 
>> The Exception is the following:
>> (XDocletMain.start                   54  ) <<Running XDoclet failed.:
>> xdoclet.template.TemplateException: Invoking method in class
>> xdoclet.modules.ejb.home.HomeTagsHandler failed: forAllHomeMethods,
>> line=9 of template file:
>> jar:file:/C:/programme/xdoclet-1.2.3/lib/xdoclet-ejb-module-1.2.3.jar!/xdoclet/modules/ejb/home/resources/home-local.xdt,
>> exception: null>>
>> 
>> 
>> What is going wrong?
>> Please help me ;-(
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/problem-with-create-method-in-local-home-entity-bean-tf3220254.html#a8980963
Sent from the xdoclet-user mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to