Solved

EJB errors going from RAD 6 to RAD 7

Posted on 2008-06-17
3
2,228 Views
Last Modified: 2013-12-14
I am having EJB errors going from RAD 6 to Rad 7.  These all compiled and worked properly before the upgrade.

Errors I'm getting if config has JNDI context local:ejb/ in front of JNDI lookup name or with no context infront:
ERROR 2008-06-16 12:37:29,871 {pu1} [WebContainer : 3] CustomerDelegate.placeManualHold -  Exception occurs in the Servicing
com.uhc.basics.exceptions.BasicsException ::  Service Exception occurs while locating ManualHoldHome,  Root Cause: Failed to obtain EJB Home,  Root Cause: Name "comp/env/ManualHoldEJB" not found in context "java:".
 
 Root Cause detail
 -----------------
 com.uhc.basics.j2ee.service.ServiceException :: Failed to obtain EJB Home,  Root Cause: Name "comp/env/ManualHoldEJB" not found in context "java:".
 
 Root Cause detail
 -----------------
 javax.naming.NameNotFoundException: Name "comp/env/ManualHoldEJB" not found in context "java:".
 at com.uhc.basics.compmgmt.services.BasicsCompMgmtDelegate.getEJBInstance(BasicsCompMgmtDelegate.java:138)
 at com.uhc.basics.compmgmt.services.CustomerDelegate.placeManualHold(CustomerDelegate.java:5814)
 
 
Error I'm getting with  java:comp/env context in front.
[6/16/08 8:11:13:295 EDT] 00000023 Helpers       W   NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:

Context implementation: com.ibm.ws.naming.java.javaURLContextRoot

Context method: lookup(Name)

Context name: java:

Target name: comp/env/ManualHoldEJB

Other data: ""

Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.ejs.container.ContainerEJBException: Unable to initialize deferred EJB.]]


 

My service locator config:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE configuration SYSTEM "http://uhg.uht.com/dtd/configuration.dtd">

<configuration name="ServiceLocatorMetaData">

<!-- Start of all the DAO Entries -->

<property key="CustomerDAO" value = "CustomerDAO,DAO"/>

<property key="ProducerDAO" value = "ProducerDAO,DAO"/>

<property key="BasicsUtilsDAO" value = "BasicsUtilsDAO,DAO"/>

<property key="AuditDAO" value = "AuditDAO,DAO"/>

<property key="CalendarDAO" value = "CalendarDAO,DAO"/>

<property key="IssueDAO" value = "IssueDAO,DAO"/>

<property key="InboundDAO" value = "InboundDAO,DAO"/>

<property key="SystemDAO" value = "SystemDAO,DAO"/>

<property key="ManualDepositsDAO" value = "ManualDepositsDAO,DAO"/>

<property key="PaymentDAO" value = "PaymentDAO,DAO"/>

<!-- End of all DAO Entries -->


<!-- Start of all EJB Entries -->

<property key="ManualHoldHome" value = "ManualHoldEJB.ejbHomeName,EJB"/>

<property key="ManualHoldHome.ejbHomePath" value = "java:comp/env/ManualHoldEJB"/>

<property key="CustomerOverrideHome" value= "CustomerOverrideEJB.ejbHomeName,EJB" />

<property key="CustomerOverrideHome.ejbHomePath" value = "java:comp/env/CustomerOverrideEJB"/>

<property key="CustomerAORHome" value= "CustomerAOREJB.ejbHomeName,EJB" />

<property key="CustomerAORHome.ejbHomePath" value = "java:comp/env/CustomerAOREJB"/>

<property key="ProducerGarnishmentHome" value = "ProducerGarnishmentEJB.ejbHomeName,EJB"/>

<property key="ProducerGarnishmentHome.ejbHomePath" value = "java:comp/env/ProducerGarnishmentEJB"/>

<property key="KARatesHome" value = "KARatesEJB.ejbHomeName,EJB"/>

<property key="KARatesHome.ejbHomePath" value = "java:comp/env/KARatesEJB"/>

<property key="CustomerBaseHome" value= "CustomerBaseEJB.ejbHomeName,EJB" />

<property key="CustomerBaseHome.ejbHomePath" value= "java:comp/env/CustomerBaseEJB" />

<property key="IssueHandlingHome" value = "IssueHandlingEJB.ejbHomeName,EJB"/>

<property key="IssueHandlingHome.ejbHomePath" value= "java:comp/env/IssueHandlingEJB" />

<property key="CustomerHome" value = "CustomerEJB.ejbHomeName,EJB"/>

<property key="CustomerHome.ejbHomePath" value= "java:comp/env/CustomerEJB" />

<!-- End of all EJB entries -->


<!-- These are the entries that are related to meta data required by the ServiceLocator-->

<!-- for server deployments, the following lines are not required for an EJB lookup -->

<!-- <property key="nameService" value = "com.ibm.websphere.naming.WsnInitialContextFactory"/> -->

<!-- <property key="providerUrl" value = "iiop:///"/> -->

<!-- End of all meta data entries -->


<!-- Admin App UI config-->

<property key="ITDashboardDAO" value = "ITDashboardDAO,DAO"/>

<property key="AdminUIDAO" value = "AdminUIDAO,DAO"/>

</configuration>

radconfig.doc
0
Comment
Question by:sladej
3 Comments
 
LVL 10

Accepted Solution

by:
Nellios earned 500 total points
Comment Utility
Stick with " java:comp/env/ManualHoldEJB" approach.
Check that all needed classes exist in the jar and review/validate your descriptor.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now