I am not sure if I understand you completely but it sounds like you forgot
you counter ref in your ejb-jar.xml.
Here is an example, I use the counter.jar in my user bean:

     <enterprise-beans>
          <entity>
               <display-name>nl.unwired.sgs.um.User</display-name>
               <ejb-name>nl.unwired.sgs.um.User</ejb-name>
               <home>nl.unwired.sgs.um.UserHome</home>
               <remote>nl.unwired.sgs.um.User</remote>
               <ejb-class>nl.unwired.sgs.um.UserEJB</ejb-class>
               <persistence-type>Container</persistence-type>
               <prim-key-class>java.lang.Integer</prim-key-class>
               <reentrant>False</reentrant>
               <cmp-field><field-name>id</field-name></cmp-field>
               <cmp-field><field-name>accId</field-name></cmp-field
                ...........
                .......
               <cmp-field><field-name>datTimUpd</field-name></cmp-field>
               <primkey-field>id</primkey-field>
               <ejb-ref>
                    <ejb-ref-name>ejb/Counter</ejb-ref-name>
                    <ejb-ref-type>Entity</ejb-ref-type>
                    <home>com.evermind.ejb.CounterHome</home>
                    <remote>com.evermind.ejb.Counter</remote>
               </ejb-ref>
          </entity>


And don't forget to include the counter as an ejb module in your
application.xml!

Good luck,
Eddie



----- Original Message -----
From: Koster, K.J. <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: Monday, May 28, 2001 7:34 PM
Subject: Counter gives naming exception


> Dear All,
>
> I'm sure I must be doing something dumb, but I've banging my head into
this
> stupid wall for two days now. I should have stayed in school and learned
> something, but nooo, I had to do Computer Science. *argh!* :-)
>
> I deployed the counter.jar (yes it's in the ear, it even autocreates the
> table it needs, but never uses). I have included the relevant bits into
> web.xml (from $ORION/applications/myapp/webthingy/WEB-INF/web.xml):
>
>   <ejb-ref>
>     <ejb-ref-name>ejb/Counter</ejb-ref-name>
>     <ejb-ref-type>Entity</ejb-ref-type>
>     <home>com.evermind.ejb.CounterHome</home>
>     <remote>com.evermind.ejb.Counter</remote>
>   </ejb-ref>
>
> Yet when I use that thing inside the ejbCreate of another bean I get a
> NameNotFound Exception. Replacing the Counterutils.getnextid() with (new
> Date()).getTime() works without generating the errors.
>
> How can I view the contents of the JNDI directory that Orion has? It would
> be sooo helpful in debugging.
>
> What is so obvious that I missed it?
>
>     Kees Jan
>
> ================================================
>  You are only young once,
>        but you can stay immature all your life.
>
>
>

Reply via email to