9 Replies Latest reply on May 29, 2007 1:20 PM by jaikiran pai

    javax.naming.NamingException: userEntity not bound

    Anu V Newbie

      Hello,

      I have a j2ee application that uses jboss application server. Recently we decided to upgrade jboss from version 3.2.3 to 3.2.8. The application deploys fine, but I get the jndi naming exception when I try to run the application.

      The ejb-jar.xml and jboss.xml have not been altered and they work fine in jboss 3.2.3. However, the JNDIView from jmx-console shows all the entity beans with the @ symbol followed by numbers ex: companyUploadEntity@13018016 instead of just companyUploadEntity . This is the JNDI VIEW:-

      Global JNDI Namespace
      +- HAILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
      +- HASessionState (class: org.jnp.interfaces.NamingContext)
      | +- Default (class: org.jboss.ha.hasessionstate.server.HASessionStateImpl)
      +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
      +- jmx (class: org.jnp.interfaces.NamingContext)
      | +- invoker (class: org.jnp.interfaces.NamingContext)
      | | +- RMIAdaptor (proxy: $Proxy29 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
      | +- rmi (class: org.jnp.interfaces.NamingContext)
      | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
      +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
      +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
      +- UserTransactionSessionFactory (proxy: $Proxy13 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
      +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
      +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
      +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
      +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
      +- HAILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
      +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
      +- local (class: org.jnp.interfaces.NamingContext)
      | +- ejb (class: org.jnp.interfaces.NamingContext)
      | | +- proofreadingErrorTypeEntity@21693418 (proxy: $Proxy178 implements interface com.wdp.workflow.entities.proofreadingerrortypeentity.ProofreadingErrorTypeEntityHome)
      | | +- companyEmailAddressEntity@28983641 (proxy: $Proxy146 implements interface com.wdp.workflow.entities.companyemailaddressentity.CompanyEmailAddressEntityHome)
      | | +- assignmentEntity@3919472 (proxy: $Proxy137 implements interface com.wdp.workflow.entities.assignmententity.AssignmentEntityHome)
      | | +- imageEntity@21114123 (proxy: $Proxy161 implements interface com.wdp.workflow.entities.imageentity.ImageEntityHome)
      | | +- sessionEntity@12401453 (proxy: $Proxy180 implements interface com.wdp.workflow.entities.sessionentity.SessionEntityHome)
      | | +- graphicReturnEntity@13558815 (proxy: $Proxy154 implements interface com.wdp.workflow.entities.graphicreturnentity.GraphicReturnEntityHome)
      | | +- bookPrinterEntity@31003492 (proxy: $Proxy140 implements interface com.wdp.workflow.entities.bookprinterentity.BookPrinterEntityHome)
      | | +- proofreadingEntity@25604380 (proxy: $Proxy176 implements interface com.wdp.workflow.entities.proofreadingentity.ProofreadingEntityHome)
      | | +- adUploadEntity@28036507 (proxy: $Proxy134 implements interface com.wdp.workflow.entities.aduploadentity.AdUploadEntityHome)
      | | +- udacEntity@9745176 (proxy: $Proxy185 implements interface com.wdp.workflow.entities.udacentity.UDACEntityHome)
      | | +- priorityDateTypeEntity@15646487 (proxy: $Proxy172 implements interface com.wdp.workflow.entities.prioritydatetypeentity.PriorityDateTypeEntityHome)
      | | +- systemPrefEntity@14399546 (proxy: $Proxy184 implements interface com.wdp.workflow.entities.systemprefentity.SystemPrefEntityHome)
      | | +- imageTypeEntity@8744251 (proxy: $Proxy163 implements interface com.wdp.workflow.entities.imagetypeentity.ImageTypeEntityHome)
      | | +- canvassEntity@24804836 (proxy: $Proxy151 implements interface com.wdp.workflow.entities.canvassentity.CanvassEntityHome)
      | | +- udacInfoEntity@24138518 (proxy: $Proxy186 implements interface com.wdp.workflow.entities.udacinfoentity.UDACInfoEntityHome)
      | | +- batchEntity@10496057 (proxy: $Proxy138 implements interface com.wdp.workflow.entities.batchentity.BatchEntityHome)
      | | +- userAssignmentEntity@24197954 (proxy: $Proxy187 implements interface com.wdp.workflow.entities.userassignmententity.UserAssignmentEntityHome)
      | | +- salesRepEntity@6200698 (proxy: $Proxy179 implements interface com.wdp.workflow.entities.salesrepentity.SalesRepEntityHome)
      | | +- imageAssignmentEntity@12452934 (proxy: $Proxy162 implements interface com.wdp.workflow.entities.imageassignmententity.ImageAssignmentEntityHome)
      | | +- companyUploadEntity@13018016 (proxy: $Proxy147 implements interface com.wdp.workflow.entities.companyuploadentity.CompanyUploadEntityHome)
      | | +- bookYearEntity@15087134 (proxy: $Proxy142 implements interface com.wdp.workflow.entities.bookyearentity.BookYearEntityHome)
      | | +- udacPointValueEntity@21005093 (proxy: $Proxy153 implements interface com.wdp.workflow.entities.udacpointvalueentity.UDACPointValueEntityHome)
      | | +- aclEntity@8707644 (proxy: $Proxy135 implements interface com.wdp.workflow.entities.aclentity.ACLEntityHome)
      | | +- subCategoryEntity@14361740 (proxy: $Proxy183 implements interface com.wdp.workflow.entities.subcategoryentity.SubCategoryEntityHome)
      | | +- holidayEntity@6711891 (proxy: $Proxy160 implements interface com.wdp.workflow.entities.holidayentity.HolidayEntityHome)
      | | +- canvassRepsEntity@10701713 (proxy: $Proxy152 implements interface com.wdp.workflow.entities.canvassrepsentity.CanvassRepsEntityHome)
      | | +- flowControlSession@2985676 (proxy: $Proxy189 implements interface com.wdp.workflow.sessions.flowcontrolsession.FlowControlSessionHome)
      | | +- membershipEntity@6823352 (proxy: $Proxy164 implements interface com.wdp.workflow.entities.membershipentity.MembershipEntityHome)
      | | +- moduleEntity@19386718 (proxy: $Proxy165 implements interface com.wdp.workflow.entities.moduleentity.ModuleEntityHome)
      | | +- poNoteEntity@1340668 (proxy: $Proxy168 implements interface com.wdp.workflow.entities.ponoteentity.PONoteEntityHome)
      | | +- problemErrorTypeEntity@10893564 (proxy: $Proxy175 implements interface com.wdp.workflow.entities.problemerrortypeentity.ProblemErrorTypeEntityHome)
      | | +- officeEntity@14292245 (proxy: $Proxy166 implements interface com.wdp.workflow.entities.officeentity.OfficeEntityHome)
      | | +- headingEntity@14215426 (proxy: $Proxy159 implements interface com.wdp.workflow.entities.headingentity.HeadingEntityHome)
      | | +- skillLevelEntity@4798195 (proxy: $Proxy181 implements interface com.wdp.workflow.entities.skilllevelentity.SkillLevelEntityHome)
      | | +- flowControlJPGEntity@32821103 (proxy: $Proxy150 implements interface com.wdp.workflow.entities.flowcontroljpgentity.FlowControlJPGEntityHome)
      | | +- printQueueEntity@8204368 (proxy: $Proxy170 implements interface com.wdp.workflow.entities.printqueueentity.PrintQueueEntityHome)
      | | +- categoryLinkEntity@16179205 (proxy: $Proxy144 implements interface com.wdp.workflow.entities.categorylinkentity.CategoryLinkEntityHome)
      | | +- problemErrorEntity@27086706 (proxy: $Proxy174 implements interface com.wdp.workflow.entities.problemerrorentity.ProblemErrorEntityHome)
      | | +- handoffEntity@25542878 (proxy: $Proxy158 implements interface com.wdp.workflow.entities.handoffentity.HandoffEntityHome)
      | | +- userEntity@24710377 (proxy: $Proxy188 implements interface com.wdp.workflow.entities.userentity.UserEntityHome)
      | | +- problemEntity@10695700 (proxy: $Proxy173 implements interface com.wdp.workflow.entities.problementity.ProblemEntityHome)
      | | +- companyEntity@5872987 (proxy: $Proxy145 implements interface com.wdp.workflow.entities.companyentity.CompanyEntityHome)
      | | +- categoryEntity@6966554 (proxy: $Proxy143 implements interface com.wdp.workflow.entities.categoryentity.CategoryEntityHome)
      | | +- specEntity@10298108 (proxy: $Proxy182 implements interface com.wdp.workflow.entities.specentity.SpecEntityHome)
      | | +- bookEntity@14512731 (proxy: $Proxy139 implements interface com.wdp.workflow.entities.bookentity.BookEntityHome)
      | | +- graphicReturnErrorTypeEntity@1710895 (proxy: $Proxy156 implements interface com.wdp.workflow.entities.graphicreturnerrortypeentity.GraphicReturnErrorTypeEntityHome)
      | | +- adEntity@4496124 (proxy: $Proxy136 implements interface com.wdp.workflow.entities.adentity.AdEntityHome)
      | | +- optionEntity@14168933 (proxy: $Proxy167 implements interface com.wdp.workflow.entities.optionentity.OptionEntityHome)
      | | +- graphicReturnErrorEntity@19332854 (proxy: $Proxy155 implements interface com.wdp.workflow.entities.graphicreturnerrorentity.GraphicReturnErrorEntityHome)
      | | +- priorityDateEntity@21570718 (proxy: $Proxy171 implements interface com.wdp.workflow.entities.prioritydateentity.PriorityDateEntityHome)
      | | +- proofreadingErrorEntity@22746539 (proxy: $Proxy177 implements interface com.wdp.workflow.entities.proofreadingerrorentity.ProofreadingErrorEntityHome)
      | | +- printOrderUpdateFromOpsEntity@13389826 (proxy: $Proxy169 implements interface com.wdp.workflow.entities.printorderupdatefromopsentity.PrintOrderUpdateFromOpsEntityHome)
      | | +- compressionEntity@10546114 (proxy: $Proxy148 implements interface com.wdp.workflow.entities.compressionentity.CompressionEntityHome)
      | | +- flowControlEntity@722074 (proxy: $Proxy149 implements interface com.wdp.workflow.entities.flowcontrolentity.FlowControlEntityHome)
      | | +- groupEntity@12121717 (proxy: $Proxy157 implements interface com.wdp.workflow.entities.groupentity.GroupEntityHome)
      | | +- bookTypeEntity@16318274 (proxy: $Proxy141 implements interface com.wdp.workflow.entities.booktypeentity.BookTypeEntityHome)
      +- HAPartition (class: org.jnp.interfaces.NamingContext)
      | +- DefaultPartition (class: org.jboss.ha.framework.server.HAPartitionImpl)
      +- queue (class: org.jnp.interfaces.NamingContext)
      | +- A (class: org.jboss.mq.SpyQueue)
      | +- testQueue (class: org.jboss.mq.SpyQueue)
      | +- ex (class: org.jboss.mq.SpyQueue)
      | +- MessageQueue (class: org.jboss.mq.SpyQueue)
      | +- DLQ (class: org.jboss.mq.SpyQueue)
      | +- D (class: org.jboss.mq.SpyQueue)
      | +- C (class: org.jboss.mq.SpyQueue)
      | +- B (class: org.jboss.mq.SpyQueue)
      +- topic (class: org.jnp.interfaces.NamingContext)
      | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
      | +- testTopic (class: org.jboss.mq.SpyTopic)
      | +- securedTopic (class: org.jboss.mq.SpyTopic)
      +- console (class: org.jnp.interfaces.NamingContext)
      | +- PluginManager (proxy: $Proxy30 implements interface org.jboss.console.manager.PluginManagerMBean)
      +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
      +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
      +- ejb (class: org.jnp.interfaces.NamingContext)
      | +- scanningSession (proxy: $Proxy298 implements interface com.wdp.workflow.sessions.scanningsession.ScanningSessionHome,interface javax.ejb.Handle)
      | +- printOrderSession (proxy: $Proxy290 implements interface com.wdp.workflow.sessions.printordersession.PrintOrderSessionHome,interface javax.ejb.Handle)
      | +- systemPrefSession (proxy: $Proxy302 implements interface com.wdp.workflow.sessions.systemprefsession.SystemPrefSessionHome,interface javax.ejb.Handle)
      | +- proadReportSession (proxy: $Proxy271 implements interface com.wdp.workflow.sessions.proadreportsession.PROADReportSessionHome,interface javax.ejb.Handle)
      | +- userSession (proxy: $Proxy312 implements interface com.wdp.workflow.sessions.usersession.UserSessionHome,interface javax.ejb.Handle)
      | +- handoffSession (proxy: $Proxy278 implements interface com.wdp.workflow.sessions.handoffsession.HandoffSessionHome,interface javax.ejb.Handle)
      | +- departmentStatusSession (proxy: $Proxy265 implements interface com.wdp.workflow.sessions.departmentstatussession.DepartmentStatusSessionHome,interface javax.ejb.Handle)
      | +- userGroupAdminSession (proxy: $Proxy310 implements interface com.wdp.workflow.sessions.usergroupadminsession.UserGroupAdminSessionHome,interface javax.ejb.Handle)
      | +- udacAdminSession (proxy: $Proxy306 implements interface com.wdp.workflow.sessions.udacadminsession.UDACAdminSessionHome,interface javax.ejb.Handle)
      | +- imageSession (proxy: $Proxy280 implements interface com.wdp.workflow.sessions.imagesession.ImageSessionHome,interface javax.ejb.Handle)
      | +- batchSession (proxy: $Proxy253 implements interface com.wdp.workflow.sessions.batchsession.BatchSessionHome,interface javax.ejb.Handle)
      | +- timeTrackingSession (proxy: $Proxy304 implements interface com.wdp.workflow.sessions.timetrackingsession.TimeTrackingSessionHome,interface javax.ejb.Handle)
      | +- flowControlMiscSession (proxy: $Proxy273 implements interface com.wdp.workflow.sessions.flowcontrolmiscsession.FlowControlMiscSessionHome,interface javax.ejb.Handle)
      | +- webSession (proxy: $Proxy314 implements interface com.wdp.workflow.sessions.websession.WebSessionHome,interface javax.ejb.Handle)
      | +- aclSession (proxy: $Proxy247 implements interface com.wdp.workflow.sessions.aclsession.ACLSessionHome,interface javax.ejb.Handle)
      | +- graphicReturnSession (proxy: $Proxy276 implements interface com.wdp.workflow.sessions.graphicreturnsession.GraphicReturnSessionHome,interface javax.ejb.Handle)
      | +- assignmentAdminSession (proxy: $Proxy251 implements interface com.wdp.workflow.sessions.assignmentadminsession.AssignmentAdminSessionHome,interface javax.ejb.Handle)
      | +- proofreadingSession (proxy: $Proxy294 implements interface com.wdp.workflow.sessions.proofreadingsession.ProofreadingSessionHome,interface javax.ejb.Handle)
      | +- userAssignmentManagementSession (proxy: $Proxy308 implements interface com.wdp.workflow.sessions.userassignmentmanagementsession.UserAssignmentManagementSessionHome,interface javax.ejb.Handle)
      | +- adUploadSession (proxy: $Proxy245 implements interface com.wdp.workflow.sessions.aduploadsession.AdUploadSessionHome,interface javax.ejb.Handle)
      | +- miscAdminSession (proxy: $Proxy282 implements interface com.wdp.workflow.sessions.miscadminsession.MiscAdminSessionHome,interface javax.ejb.Handle)
      | +- clipArtAdminSession (proxy: $Proxy259 implements interface com.wdp.workflow.sessions.clipartadminsession.ClipArtAdminSessionHome,interface javax.ejb.Handle)
      | +- outputSession (proxy: $Proxy286 implements interface com.wdp.workflow.sessions.outputsession.OutputSessionHome,interface javax.ejb.Handle)
      | +- onlineSPECSession (proxy: $Proxy284 implements interface com.wdp.workflow.sessions.onlinespecsession.OnlineSPECSessionHome,interface javax.ejb.Handle)
      | +- companySession (proxy: $Proxy261 implements interface com.wdp.workflow.sessions.companysession.CompanySessionHome,interface javax.ejb.Handle)
      | +- problemSession (proxy: $Proxy292 implements interface com.wdp.workflow.sessions.problemsession.ProblemSessionHome,interface javax.ejb.Handle)
      | +- popSession (proxy: $Proxy288 implements interface com.wdp.workflow.sessions.popsession.POPSessionHome,interface javax.ejb.Handle)
      | +- flowControlManagementSession (proxy: $Proxy269 implements interface com.wdp.workflow.sessions.flowcontrolmanagementsession.FlowControlManagementSessionHome,interface javax.ejb.Handle)
      | +- cleanupSession (proxy: $Proxy257 implements interface com.wdp.workflow.sessions.cleanupsession.CleanupSessionHome,interface javax.ejb.Handle)
      | +- reportSession (proxy: $Proxy296 implements interface com.wdp.workflow.sessions.reportsession.ReportSessionHome,interface javax.ejb.Handle)
      | +- artCopySession (proxy: $Proxy249 implements interface com.wdp.workflow.sessions.artcopysession.ArtCopySessionHome,interface javax.ejb.Handle)
      | +- bookAdminSession (proxy: $Proxy255 implements interface com.wdp.workflow.sessions.bookadminsession.BookAdminSessionHome,interface javax.ejb.Handle)
      | +- eapReportSession (proxy: $Proxy267 implements interface com.wdp.workflow.sessions.eapreportsession.EAPReportSessionHome,interface javax.ejb.Handle)
      | +- serverSession (proxy: $Proxy300 implements interface com.wdp.workflow.sessions.serversession.ServerSessionHome,interface javax.ejb.Handle)
      | +- compressionSession (proxy: $Proxy263 implements interface com.wdp.workflow.sessions.compressionsession.CompressionSessionHome,interface javax.ejb.Handle)
      +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
      +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)


      Kindly suggest what might be the problem. I think the @ followed by the numbers in the jndi namespace is messing up my look up. However, I am not sure how I can fix it.

      Thanks,
      Anu

        • 1. Re:  javax.naming.NamingException: userEntity not bound
          jaikiran pai Master

           

          jmx-console shows all the entity beans with the @ symbol followed by numbers ex: companyUploadEntity@13018016 instead of just companyUploadEntity


          Have a look at http://wiki.jboss.org/wiki/Wiki.jsp?page=WhyDoesTheLocalNameContainARandomNumber to see how it can be fixed

          • 2. Re:  javax.naming.NamingException: userEntity not bound
            Anu V Newbie

            Thank you for the useful link. My jboss.xml and ejb-jar.xml files have the required changes. But I still get the junk characters in the jndi name.

            Here are some snippets from jboss.xml and ejb-jar.xml files:-
            //jboss.xml

            <message-driven>
            <ejb-name>ejb/messageServerMessage</ejb-name>
            <local-jndi-name>ejb/messageServerMessage</local-jndi-name>
            <destination-jndi-name>queue/MessageQueue</destination-jndi-name>
            <resource-ref>
            <res-ref-name>topic/MessageTopic</res-ref-name>
            <jndi-name>topic/MessageTopic</jndi-name>

            </resource-ref>
            </message-driven>

            //ejb-jar.xml


            <display-name>ACLSessionBean</display-name>
            <ejb-name>ejb/aclSession</ejb-name>
            com.wdp.workflow.sessions.aclsession.ACLSessionHome
            com.wdp.workflow.sessions.aclsession.ACLSession
            <ejb-class>com.wdp.workflow.sessions.aclsession.ACLSessionBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Bean</transaction-type>
            <ejb-local-ref>
            <ejb-ref-name>ejb/sessionEntity</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            <local-home>com.wdp.workflow.entities.sessionentity.SessionEntityHome</local-home>
            com.wdp.workflow.entities.sessionentity.SessionEntity
            <ejb-link>ejb/sessionEntity</ejb-link>
            </ejb-local-ref>
            <ejb-local-ref>
            <ejb-ref-name>ejb/userEntity</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            <local-home>com.wdp.workflow.entities.userentity.UserEntityHome</local-home>
            com.wdp.workflow.entities.userentity.UserEntity
            <ejb-link>ejb/userEntity</ejb-link>
            </ejb-local-ref>
            <resource-ref>
            <res-ref-name>jdbc/Workflow</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
            </resource-ref>

            • 3. Re:  javax.naming.NamingException: userEntity not bound
              jaikiran pai Master

               

              <message-driven>
              <ejb-name>ejb/messageServerMessage</ejb-name>
              <local-jndi-name>ejb/messageServerMessage</local-jndi-name>
              <destination-jndi-name>queue/MessageQueue</destination-jndi-name>
              <resource-ref>
              <res-ref-name>topic/MessageTopic</res-ref-name>
              <jndi-name>topic/MessageTopic</jndi-name>

              </resource-ref>
              </message-driven>


              You have added the local-jndi-name to the message driven bean. You will have to add it to the session beans too (the userEntity and the sessionEntity)

              • 4. Re:  javax.naming.NamingException: userEntity not bound
                Anu V Newbie

                Sorry, I had not pasted the complete jboss.xml file. This is the part for userSession:-


                <ejb-name>ejb/userSession</ejb-name>
                <local-jndi-name>ejb/userSession</local-jndi-name>
                <!-- <destination-jndi-name>queue/SystemQueue</destination-jndi-name>-->
                <resource-ref>
                <res-ref-name>queue/SystemQueue</res-ref-name>
                <jndi-name>queue/SystemQueue</jndi-name>

                </resource-ref>

                • 5. Re:  javax.naming.NamingException: userEntity not bound
                  jaikiran pai Master

                  Are you sure this is what you have in the jboss.xml? I would have expected

                  <ejb-name>ejb/userEntity</ejb-name>


                  and not
                  <ejb-name>ejb/userSession</ejb-name>


                  Could you post the ejb-jar.xml and the jboss.xml that is being used (please use the Code button while posting to wrap the contents of these files in a code block - this will help in maintaing the xml tags)

                  • 6. Re:  javax.naming.NamingException: userEntity not bound
                    Anu V Newbie

                    jboss.xml:-

                    <?xml version = '1.0' encoding = 'windows-1252'?>
                    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
                    <jboss>
                     <enterprise-beans>
                     <session>
                     <ejb-name>ejb/userSession</ejb-name>
                     <local-jndi-name>ejb/userSession</local-jndi-name>
                    
                     <resource-ref>
                     <res-ref-name>queue/MessageQueue</res-ref-name>
                     <jndi-name>queue/MessageQueue</jndi-name>
                    
                     </resource-ref>
                     </session>
                     <session>
                     <ejb-name>ejb/userSession</ejb-name>
                     <local-jndi-name>ejb/userSession</local-jndi-name>
                    
                     <resource-ref>
                     <res-ref-name>queue/SystemQueue</res-ref-name>
                     <jndi-name>queue/SystemQueue</jndi-name>
                    
                     </resource-ref>
                     </session>
                     <message-driven>
                     <ejb-name>ejb/messageServerMessage</ejb-name>
                     <local-jndi-name>ejb/messageServerMessage</local-jndi-name>
                     <destination-jndi-name>queue/MessageQueue</destination-jndi-name>
                     <resource-ref>
                     <res-ref-name>topic/MessageTopic</res-ref-name>
                     <jndi-name>topic/MessageTopic</jndi-name>
                    
                     </resource-ref>
                     </message-driven>
                     </enterprise-beans>
                    </jboss>
                    
                    


                    ejb-jar.xml. I am only pasting the relevant section of the ejb-jar file because the whole file is very big and I am not sure if you would really need the entire file.

                    
                     <session>
                     <display-name>ACLSessionBean</display-name>
                     <ejb-name>ejb/aclSession</ejb-name>
                     <home>com.wdp.workflow.sessions.aclsession.ACLSessionHome</home>
                     <remote>com.wdp.workflow.sessions.aclsession.ACLSession</remote>
                     <ejb-class>com.wdp.workflow.sessions.aclsession.ACLSessionBean</ejb-class>
                     <session-type>Stateless</session-type>
                     <transaction-type>Bean</transaction-type>
                     <ejb-local-ref>
                     <ejb-ref-name>ejb/sessionEntity</ejb-ref-name>
                     <ejb-ref-type>Entity</ejb-ref-type>
                     <local-home>com.wdp.workflow.entities.sessionentity.SessionEntityHome</local-home>
                     <local>com.wdp.workflow.entities.sessionentity.SessionEntity</local>
                     <ejb-link>ejb/sessionEntity</ejb-link>
                     </ejb-local-ref>
                     <ejb-local-ref>
                     <ejb-ref-name>ejb/userEntity</ejb-ref-name>
                     <ejb-ref-type>Entity</ejb-ref-type>
                     <local-home>com.wdp.workflow.entities.userentity.UserEntityHome</local-home>
                     <local>com.wdp.workflow.entities.userentity.UserEntity</local>
                     <ejb-link>ejb/userEntity</ejb-link>
                     </ejb-local-ref>
                     <resource-ref>
                     <res-ref-name>jdbc/Workflow</res-ref-name>
                     <res-type>javax.sql.DataSource</res-type>
                     <res-auth>Container</res-auth>
                     </resource-ref>
                     </session>
                     <!-- UserEntityBean -->
                     <entity>
                     <display-name>UserEntityBean</display-name>
                     <ejb-name>ejb/userEntity</ejb-name>
                     <local-home>com.wdp.workflow.entities.userentity.UserEntityHome</local-home>
                     <local>com.wdp.workflow.entities.userentity.UserEntity</local>
                     <ejb-class>com.wdp.workflow.entities.userentity.UserEntityBean</ejb-class>
                     <persistence-type>Bean</persistence-type>
                     <prim-key-class>java.lang.String</prim-key-class>
                     <reentrant>False</reentrant>
                     <resource-ref>
                     <res-ref-name>jdbc/Workflow</res-ref-name>
                     <res-type>javax.sql.DataSource</res-type>
                     <res-auth>Container</res-auth>
                     </resource-ref>
                     </entity>
                    


                    • 7. Re:  javax.naming.NamingException: userEntity not bound
                      jaikiran pai Master

                      Ok, here's how your jboss.xml should look like (in addition to the message driven entries). I have added the entry for the userEntity entity bean. You will have to add entries for each of the remaining entities bean which have this problem.

                      <?xml version = '1.0' encoding = 'windows-1252'?>
                      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
                      <jboss>
                       <enterprise-beans>
                       <entity>
                       <ejb-name>ejb/userEntity</ejb-name>
                       <local-jndi-name>ejb/userEntity</local-jndi-name>
                       </entity>
                       </enterprise-beans>
                      </jboss>




                      • 8. Re:  javax.naming.NamingException: userEntity not bound
                        Anu V Newbie

                        I altered the jboss.xml file and it fixed my problem. Thanks a lot!! But it still puzzles me as to how or why this exact same set up worked and still works on jboss 3.2.3!! Thanks JaiKiran!

                        • 9. Re:  javax.naming.NamingException: userEntity not bound
                          jaikiran pai Master

                           

                          But it still puzzles me as to how or why this exact same set up worked and still works on jboss 3.2.3!!


                          Here's the answer :)

                          Since the upgrade to 3.2.7 / 4.0.2, this doesn't work anymore. This is a side effect of the resolution to http://jira.jboss.com/jira/browse/JBAS-275#action_12315001 : To avoid clashes between two identically-named EJBs, a generated hash-code is now appended to the JNDI name to make them unique *unless a local-jndi-name value is provided in the deployment descriptor*