• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Err while trying to lookup ejb2 enity bean on was7 Naming Name comp/env/ejb not found context "java"

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Getting error while trying to lookup ejb2 enity bean on was7 Naming Name comp/env/ejb not found in context "java:",

[6/16/13 23:51:45:442 IST] 00000058 SystemOut O [wb][EntityBeanLocator][06/16 23:51:45.442][ERROR][Severity 2] [ADMINIB-NKJC3I8] lookup(entityKeyName, expectedClass) - Naming Name comp/env/ejb not found in context "java:".
[6/16/13 23:51:45:442 IST] 00000058 SystemOut O [wb][TransactionScheduleBean][06/16 23:51:45.442][FATAL][Severity 1] [ADMINIB-NKJC3I8] Fatal Error occured in storeXMLInDB(String messageType, String bodId, String mqMessageId, String xml, String updatedByjavax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".
financing.tools.hub.shared.exception.R2FException: javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".
at financing.tools.hub.wb.process.ejb.EntityBeanLocator.lookup(EntityBeanLocator.java:371)
at financing.tools.hub.wb.process.ejb.EntityBeanLocator.getXmlRepositoryLocalHome(EntityBeanLocator.java:869)
at financing.tools.hub.wb.contract.ejb.TransactionScheduleBean.updateDB(TransactionScheduleBean.java:388)
at

Ejb-jar.xml:

<entity id="XmlRepository">
<ejb-name>XmlRepository</ejb-name>
<local-home>financing.tools.hub.wb.domain.pricing.ejb.XmlRepositoryLocalHome</local-home>
<local>financing.tools.hub.wb.domain.pricing.ejb.XmlRepositoryLocal</local>
<ejb-class>financing.tools.hub.wb.domain.pricing.ejb.XmlRepositoryBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>financing.tools.hub.wb.domain.pricing.ejb.XmlRepositoryKey</prim-key-class>
<reentrant>false</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>XmlRepository</abstract-schema-name>
<cmp-field id="CMPAttribute_1277976775421">
<field-name>xmlId</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1277976775656">
<field-name>component</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1277976775687">
<field-name>type</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1277976775703">
<field-name>bodId</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1277976775734">
<field-name>mqMessageId</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1277976775781">
<field-name>lastUpdated</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1277976775812">
<field-name>updatedBy</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1282312289968">
<field-name>xml</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1285821728199">
<field-name>errorInd</field-name>
</cmp-field>
<ejb-local-ref id="EJBLocalRef_1371376427429">
<description>
</description>
<ejb-ref-name>ejb/financing/tools/hub/wb/domain/pricing/ejb/XmlRepositoryLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>financing.tools.hub.wb.domain.pricing.ejb.XmlRepositoryLocalHome</local-home>
<local>financing.tools.hub.wb.domain.pricing.ejb.XmlRepositoryLocal</local>
<ejb-link>XmlRepository</ejb-link>
</ejb-local-ref>
<ejb-local-ref id="EJBLocalRef_1371376427429">
<description>
</description>
<ejb-ref-name>ejb/financing/tools/hub/wb/domain/pricing/ejb/XmlRepositoryLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>financing.tools.hub.wb.domain.pricing.ejb.XmlRepositoryLocalHome</local-home>
<local>financing.tools.hub.wb.domain.pricing.ejb.XmlRepositoryLocal</local>
<ejb-link>XmlRepository</ejb-link>
</ejb-local-ref>

<ejb-local-ref id="EJBLocalRef_1282226295671">
<ejb-ref-name>ejb/financing/tools/hub/wb/domain/pricing/ejb/XmlRepositoryLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>financing.tools.hub.wb.domain.pricing.ejb.XmlRepositoryLocalHome</local-home>
<local>financing.tools.hub.wb.domain.pricing.ejb.XmlRepositoryLocal</local>
<ejb-link>XmlRepository</ejb-link>
</ejb-local-ref>

ibm-ejb-jar.xml :

<ejbRefBindings xmi:id="EjbRefBinding_1280490665812" jndiName="ejb/financing/tools/hub/wb/domain/pricing/ejb/XmlRepositoryLocalHome">
<bindingEjbRef xmi:type="common:EJBLocalRef" href="META-INF/ejb-jar.xml#EJBLocalRef_1280490665812"/>
</ejbRefBindings>

Way to access :
public XmlRepositoryLocalHome getXmlRepositoryLocalHome()
throws R2FException {
if (xmlRepositoryLocalHome == null) {
xmlRepositoryLocalHome = (XmlRepositoryLocalHome) lookup("java:comp/env/ejb/financing/tools/hub/wb/domain/pricing/ejb/XmlRepositoryLocalHome",
XmlRepositoryLocalHome.class);
}

return xmlRepositoryLocalHome;
}

 
reply
    Bookmark Topic Watch Topic
  • New Topic