Urgent: Can't lookup entity bean

Dear all,
I define a business process in workflow engine, which invoke a java class to get
DB data through CMP entity bean. The entity bean was packed in to a ear and was
workable/callable within the same ear.
However, when the workflow engine can't invoke the entity bean, the workflow engine
always throw exception as following.
     javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
Unable to resolve 'app/ejb/ConsignmentEntityBean.jar#Consignments/local-home'
Resolved: 'app/ejb' Unresolved:'ConsignmentEntityBean.jar#Consignments' ; remaining
name 'ConsignmentEntityBean.jar#Consignments/local-home'
I think the problem may occur in deployment/configuration. Since the problem is
very urgent, anyone can help me? To all developers, How do you package/deploy
Entity Bean in Integration Server?
Thx,
Philip

I solved this.
Since I was testing the action code only, I didn't define a navigation entry corresponding to the action string returned for this button:
<h:commandButton value="Add" style="height:21px; width:51px;font-size:8pt; font-color: black;" action="#{resourceBean.addAction}">
</h:commandButton>After I added a nav definition, it worked. I don't know why at this point. I suspect a key step in the lifecycle was pre-empted...someone else can probably explain why. If I get a chance to research it after I'm done with my project, I'll update this post.
Thanks.
-L

Similar Messages

  • Can't lookup session bean in MBean and ApplicationLifeCyleListener

    Hi,
    i am migrating an application with mbean from OC4J to weblogic 10.3.2.
    as my application don't have a web module. i try to use the ApplicationLifeCycleListener
    to register the mbean (instruction from this oracle document page:
    http://download.oracle.com/docs/cd/E12839_01/web.1111/e13729
    /instmbeans.htm#i1099957).
    i register the mbean in the ApplicationLifeCycleListener.postStart method, but in the
    mbean's method (which is called by a javax.management.timer.Timer, created in the
    MBeanRegistration.postRegister method), i can't lookup the session bean.
    (i try to lookup the session bean in the ApplicationLifeCycleListener.postStart method, it fails too)
    if i register the mbean in a ServletContextListener, there is NO problem that i can
    lookup session bean in the mbean's method.
    why there is inconsistence in registrating mbean by servlet context listerer and by
    applicationlifecyclelistener???
    can anybody tell me the solution???
    is it impossible to call session bean in the MBean's method if the mbean is registered
    in the ApplicationLifeCycleListener ???
    *** i want to call a session bean's method periodically through the timer ***
    thank you very much.

    gimbal2 wrote:
    r035198x wrote:
    I put the interfaces in a separate XX-si-jar file always.
    The implementation jar then depends on that service interface jar which gets deployed on both the client and the server.
    This way I can distribute my si without including implementation which I can change without needing to affect the clients.Yeah, that seems like the only real solution to me. Using Maven it shouldn't be that hard to manage either now that I think about it. Did you ever get into trouble with a client being based on an outdated interface jar? I can imagine that it can be a bit of a release management drama to keep these things synced.Interface changes when they did happen resulted in full redeployments because the client usually has to change anyway to use the changed functionality. Most interactions are through static interfaces so this doesn't arise too much.
    In volatile interactions, a common approach is to define a generic interface EJB whose implementation can delegate the calls to other (potentially future) services. The problem with this is that return types have to be simple.
    >
    It's one of the reasons why I'm not a fan of optional interfaces in 3.1.Well the optional part is optional ;) To me it is a very useful addition since I usually only deal with local interfaces when I use EJB technology. I always found it a bit of a bother to HAVE to create an interface also, I welcome the change.It is handy to be able to roll out an app with a few classes all bundled in one deployment file if there is no requirement for multiple implementations of an interface or for remote invocation support.
    I just feel that it's a lot of flexibility to sacrifice when doing the interfaces is not really a lot of effort with today's development tools.

  • Can JDO replace Entity beans.

    I feel that while designing a J2EE application, using the Java Data Objects alongwith Entity beans is somewhat redundant. Is it so or there is any reason behind this architecture?

    EJB's strength is component transactions. JDO's strength is data object encapsulation. JDO holds forth the potential to standardize OR mapping. The design decision tree is as follows:
    1. Will EJB manage connections and transactions or will the app do it manually?
    2.1 If the app manages connections and transactions, will it use JDBC or an OR mapping toolkit?
    2.2 If the app uses EJB, will the EBs be BMP or CMP?
    2.2.1 If the app uses BMP, will it use JDBC or an OR mapping toolkit?
    3. If the app uses an OR mapping toolkit, will it use JDO?
    Session Bean encapsulates business logic and and can be used for that purpose even if JDO is used rather than EBs.

  • Can Statefull or Entity Bean be Asynchronous Subscribers for a Topic (JMS)

    Hi,
    Please Help me if any body Knows if we can implement a Statefull or Entity
    Bean to an Asynchronous subscribers for a JMS Topic.
    Thanks in advance
    LJS Narayana

    Yes.
    LJS Narayana wrote:
    Hi Mr. Seth,
    Thank u, But One more thing Then to do so i hope we should have the beans
    reference to call upon like handle of the Session Bean or Entity Beans Key
    is that right??
    "Seth White" <[email protected]> wrote in message
    news:[email protected]..
    No. You probably want to have a message driven bean that calls thesession
    or entity bean instead.
    Seth
    LJS Narayana wrote:
    Hi,
    Please Help me if any body Knows if we can implement a Statefull or
    Entity
    Bean to an Asynchronous subscribers for a JMS Topic.
    Thanks in advance
    LJS Narayana

  • Urgent - can't set managed bean value using a form, getting null

    I have a form with a bean -- unbelievably, I can't get the values entered into the form by the user to get stored into the bean. Everything is null... I've looked at a zillion examples, posts and compared etc...yet still can't see what is missing.
    Here's part of a trace :
    [cc]Dec-31 01:25:02 ApplicationImpl - Created bean resourceBean successfully
    [cc]Dec-31 01:25:02 ApplicationImpl - Storing resourceBean in scope request
    [cc]Dec-31 01:25:02 VariableResolverImpl - resolveVariable: Resolved variable:id=null name=null
    [cc]Dec-31 01:25:02 ValueBindingImpl - getValue Result:id=null name=null
    [cc]Dec-31 01:25:02 ValueBindingImpl - -->Returning id=null name=null
    If you have any ideas, please let me know--it seems just as I solve one JSF issue, I run into another on unexpectedly simple things.
    Here's the ResourceBean.java, the bean-config.xml and my jsp.
    package com.intalio.qa.tcm.view.beans;
    import java.util.Map;
    import javax.faces.context.FacesContext;
    import javax.faces.model.SelectItem;
    import org.apache.log4j.Logger;
    import com.intalio.qa.exceptions.DuplicateIdException;
    import com.intalio.qa.tcm.model.Resource;
    import com.intalio.qa.tcm.view.builders.ResourceBuilder;
    import com.intalio.qa.tcm.view.util.FacesUtils;
    * Resource backing bean.
    public class ResourceBean extends RootBean {
         * Class logger
         public static final Logger LOG =
              Logger.getLogger(ResourceBean.class);
    * The Resource id
         private String id = null;
         * The Resource name
         private String name = null;
    * Description
    private String description= null;
         * the resource type id associated with the Resource
         private String resourceTypeId= null;
         private static SelectItem[] resourceTypeIds = new SelectItem[] {
              new SelectItem("External Software"),
              new SelectItem("Hardware"),
              new SelectItem("Intalio Product Software"),
              new SelectItem("Machine - Dual CPU"),
              new SelectItem("Machine - CPU Single"),
              new SelectItem("Memory - UNIX"),
              new SelectItem("Memory - Windows") };
    * @return Returns the resourceTypeIds.
    public SelectItem[] getResourceTypeIds() {
    return resourceTypeIds;
    * @param resourceTypeIds The resourceTypeIds to set.
    public void setResourceTypeIds(SelectItem[] typeIds) {
    resourceTypeIds = typeIds;
         * Default constructor.
         public ResourceBean() {
    super();
    init();
         * Initializes ResourceBean.
         * @see RootBean#init()
         protected void init() {
         /*True, but I'd strongly recommend instead using:
    FacesContext fContext = FacesContext.getCurrentInstance();
    Map requestParams = fContext.getExternalContext().getRequestParameterMap();
    String companyId = (String) requestParams.get("companyID");
    The getRequest(), getSession(), and getContext() methods of ExternalContext should only be used as a last resort.*/
         * Backing bean action to update Resource.
         * @return the navigation result
         public String updateAction() {
              LOG.info("updateAction is invoked");
              try {
                   Resource Resource = ResourceBuilder.createResource(this);
                   LOG.info("ResourceId = " + Resource.getId());
              //     viewServicesManager.getResourceService().updateResource(Resource);
              } catch (Exception e) {
                   String msg = "Could not update Resource";
                   LOG.error(msg, e);
                   FacesUtils.addErrorMessage(msg + ": Internal Error.");
                   return ActionResult.FAILURE;
              LOG.info("Resource with id of " + id + " was updated successfully.");
              return ActionResult.SUCCESS;
         * Backing bean action to create a new Resource.
         * @return the navigation result
         public String addAction() {
              try {
                   Resource resource = ResourceBuilder.createResource(this);
    LOG.info("resource created: " + resource.getName() + " with typeId = " + resource.getResourceTypeId());
                   viewServicesManager.getResourceService().saveResource(resource);
              } catch (DuplicateIdException de) {
                   String msg = "This id already exists";
                   LOG.info(msg);
                   FacesUtils.addErrorMessage(msg);
                   return ActionResult.RETRY;
              } catch (Exception e) {
                   String msg = "Could not save Resource";
                   LOG.error(msg, e);
                   FacesUtils.addErrorMessage(msg + ": Internal Error");
                   return ActionResult.FAILURE;
              String msg = "Resource with id of " + id + " was created successfully.";
              LOG.info(msg);
              return ActionResult.SUCCESS;
         * Backing bean action to delete Resource.
         * @return the navigation result
         public String deleteAction() {
              LOG.info("deleteAction is invoked");
              try {
         //          Resource Resource = ResourceBuilder.createResource(this);
         //          viewServicesManager.getResourceService().deleteResource(Resource);
                   //remove the ResourceList inside the cache
    //               FacesUtils.resetManagedBean(BeanNames.RESOURCE_LIST_BEAN);
              } catch (Exception e) {
                   String msg = "Could not delete Resource. ";
                   LOG.error(msg, e);
                   FacesUtils.addErrorMessage(null, msg + "Internal Error.");
                   return ActionResult.FAILURE;
              String msg = "Resource with id of " + id + " was deleted successfully.";
              LOG.info(msg);
              FacesUtils.addInfoMessage(msg);
              return ActionResult.SUCCESS;
         public String getId() {
              return id;
         * Invoked by the JSF managed bean facility.
         * <p>
         * The id is from the request parameter.
         * If the id is not null, by using the id as the key,
         * the Resource bean is initialized.
         * @param newQueryId the query id from request parameter
         public void setId(String newId) {
              LOG.info("setId " + newId);
              id = newId;
         public String getName() {
              return name;
         public void setName(String newName) {
              name = newName;
         public String getDescription() {
              return description;
         public void setDescription(String newDescription) {
              description = newDescription;
         public String getResourceTypeId() {
              return resourceTypeId;
         public void setResourceTypeId(String newResourceTypeId) {
              resourceTypeId = newResourceTypeId;
         public String toString() {
              return "id=" + id + " name=" + name;
         <!-- view -->
         <managed-bean>
              <description>
                   Managed bean
              </description>
              <managed-bean-name>applicationBean</managed-bean-name>
              <managed-bean-class>
                   com.intalio.qa.tcm.view.beans.ApplicationBean
              </managed-bean-class>
              <managed-bean-scope>application</managed-bean-scope>
              <managed-property>
                   <property-name>viewServicesManager</property-name>
                   <value>#{viewServicesManagerBean}</value>
              </managed-property>
              </managed-bean>
         <managed-bean>
              <description>
                   View service manager impl for business services
              </description>
              <managed-bean-name>viewServicesManagerBean</managed-bean-name>
              <managed-bean-class>
                   com.intalio.qa.tcm.view.beans.ViewServicesManagerBean</managed-bean-class>
              <managed-bean-scope>application</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <description>
                   Backing bean that contains product information.
              </description>
              <managed-bean-name>resourceBean</managed-bean-name>
              <managed-bean-class>
                   com.intalio.qa.tcm.view.beans.ResourceBean
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
              <managed-property>
                   <property-name>viewServicesManager</property-name>
                   <value>#{viewServicesManagerBean}</value>
              </managed-property>
         </managed-bean>
    </faces-config>
    <f:view>
         <h:form id="createResourceForm" target="dataFrame">
              <h:outputText value="#{applicationBean.dummyVariable}" rendered="true" />
              <div align="center">
              <head>
              <link href="../../css/stylesheet.css" rel="stylesheet" type="text/css">
              <FONT color="#191970" size="4" face="Arial">Resources View</FONT>
              </head>
              <table style="margin-top: 2%" width="35%" cellpadding="10">
                   <div align="left">
                   <FONT color="#191970" size="3" face="Arial">Update Resources </FONT>
                   </div>
                   <tr>
                        <td align="center" valign="top" align="center" style="" bgcolor="white" />
                        <table>
                             <tbody>
                                  <tr>
                                       <td align="left" styleClass="header" width="100" />
                                       <td align="left" width="450" />
                                  </tr>
                                  <tr>
                                       <td align="right" width="100"><h:outputText value="Id" /></td>
                                       <td align="left" width="450"><h:inputText value="#{resourceBean.id}" id="id"/> <h:message for="id" styleClass="errorMessage" /></td>
                                  </tr>
                                  <tr>
                                       <td align="right" width="100"><h:outputText value="Name" /></td>
                                       <td align="left" width="450"><h:inputText value="#{resourceBean.name}" id="name" /> <h:message for="name" styleClass="errorMessage" /></td>
                                  </tr>
                                  <tr>
                                       <!--td align="right" width="100" valign="bottom"><h:outputText value="Type" /></td>
                                       <td align="left" width="550"><h:selectOneMenu>
                                            <f:selectItems value="#{resourceBean.resourceTypeIds}" />
                                       </h:selectOneMenu> <h:outputText value="#{resourceBean.resourceTypeId}" id="dresourceTypeId" /> <h:message for="resourceTypeId" styleClass="errorMessage" />
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" width="100" valign="bottom"><h:outputText value="Description" /></td>
                                       <td align="left" width="450"><h:inputText value="#{resourceBean.description}" id="description" size="96" /> <h:message for="description" styleClass="errorMessage" /></td>
                                  </tr>
                             </tbody>
                        </table>
         </h:form>
         </td>
         <!-- END DATA FORM -->
         <!-- BEGIN COMMANDS -->
         <td width="30%" align="left" valign="top"><h:form id="buttonCommandsForm">
              <h:panelGroup id="buttons">
                   <h:panelGrid columns="1" cellspacing="1" cellpadding="2" border="0" bgcolor="white">
                        <h:commandButton value="Add" style="height:21px; width:51px;font-size:8pt; font-color: black;" action="#{resourceBean.addAction}">
                        </h:commandButton>
                        <h:commandButton id="deleteCB" value="Delete" style="height:21px; width:51px;font-size:8pt" action="#{resourceBean.deleteAction}">
                        </h:commandButton>
                        <h:commandButton id="spaceFillerButton" style="height:21px; width:51px;font-size:8pt;background-color: #ffffff;color: #ffffff;border: 0px;">
                        </h:commandButton>
                        <h:commandButton id="saveCB" value="Save" style="height:21px; width:51px;font-size:8pt" action="#{resourceBean.saveAction}">
                        </h:commandButton>
                        <h:commandButton id="updateCB" value="Update" style="height:21px; width:51px;font-size:8pt" action="#{resourceBean.updateAction}">
                        </h:commandButton>
                   </h:panelGrid>
              </h:panelGroup>
         </h:form> <!-- end buttons --></td>
         </tr>
         </table>
         <HR align="center" size="2" width="60%" />
         <!-- data table -->
         </div>
    </f:view>
    THANKS.
    -L

    I solved this.
    Since I was testing the action code only, I didn't define a navigation entry corresponding to the action string returned for this button:
    <h:commandButton value="Add" style="height:21px; width:51px;font-size:8pt; font-color: black;" action="#{resourceBean.addAction}">
    </h:commandButton>After I added a nav definition, it worked. I don't know why at this point. I suspect a key step in the lifecycle was pre-empted...someone else can probably explain why. If I get a chance to research it after I'm done with my project, I'll update this post.
    Thanks.
    -L

  • Can Entity Bean with Home Business Method replace Stateless Session Bean?

    Since Entity Bean can have business methods in the Home Interface, can we use Entity Bean with Home Business Methods to replace Stateless Session Bean?
    I am assuming we can get better performance by doing this since the overhead of creating Component Object can be avoided as compared to stateless session beans.

    Requires-new makes the container start a new transaction. Only use that flag
              at the point that you are certain that a NEW transaction should BEGIN. I
              suggest you use Required as your default for all methods in the application,
              and only change that to anything else when you are certain that you should.
              Peace,
              Cameron Purdy
              Tangosol Inc.
              << Tangosol Server: How Weblogic applications are customized >>
              << Download now from http://www.tangosol.com/download.jsp >>
              "A.J,LEE" <[email protected]> wrote in message
              news:3ba5adb2$[email protected]..
              >
              > I find it result in "dead lock"
              > when I call RequiresNew attributed CMP method in session Bean.
              > Then, Is it possible to use CMP which is set with "RequiresNew"
              transaction attribute?
              >
              > I Wonder why.
              >
              > Thanx in advance.
              

  • Disadvantages of using entity beans.

    can I know the disadvantages of using entity beans.

    sigh I guess if someone puts it on a website it must be true...
    "Forces the use of a heavy component mechanism for fine grained business objects."
    Heaviness is not some arbitrary side-effect. It is directly due to the services provided by the EntityBeans (transactions, etc). If you need those services, you pay the price. If you don't then you shouldn't be using EJB to begin with. Also with the advent of LocalInterfaces, fine-grainedness is no longer a liability.
    "More complex than JDO limiting developer productivity."
    Perhaps it has less to do with limited productivity, and more to do with limited developers.
    "More difficult to achieve good performance."
    Compared to a simple data storage mechanism, sure.
    "Inheritance not supported."
    Really? Wow, I guess all the EJB code I've written for the last 3 years doesn't really work.
    "Cannot be used for persistence in non-application server environments."
    Uhh, yeah, but seeing as how the decision to use EJBs is not limited to the persistance scheme, the non-use of an application server is moot.
    "There is no dynamic query mechanism to lookup entity beans (finders are specified at compile time)."
    And what compiled business process (i.e SessionBeans) requires dynamic lookup of arbitrary data? Humans performing search functions can be done via entity beans, but probably should not be done since a large searches do not (or very rarely) need to be transactional.
    "It is not easy to write unit tests for beans as it is not possible to use them outside of the application server."
    For a long time this was true, but there are now many unit test suites designed for J2EE.
    "No support for automatic primary key generation."
    In the spec, no. But it's fairly trivial to implement on your own.
    "Only relational databases are supported."
    If you use CMP, yes. If you use BMP, you can do whatever you want inside your ejbLoad()/ejbStore() methods. Another reason to not use CMP.

  • How to mapping Entity beans to existing database tables.

    dear all
    how can i mapping Entity beans to existing database tables and not to create new table in Orion.
    thanks for any input.
    seabin

    * You define the name of the table that an Entity EJB maps to in orion-ejb-jar.xml. For eg:<entity-deployment name="MyEntityEJB" data-source="MyDS" table="MY_DB_TABLE" ...>* If you don't want to let Orion create the tables for your EJBs, have the following entry in either of the files given below:<orion-application autocreate-tables="false" ...>1) <orion-home>/j2ee/home/config/application.xml (global effect)
    2) orion-application.xml file of that particular application (application specific)
    HTH.

  • Session bean with 2 entity bean

    i have a phonebook manager (session bean) taht controls the category of contacts such as group a , group b, group c and group d. where group a b c and d are all entity beans.
    may i know how to control a session bean so that it can diferent which entity beans to invoke ?

    Group might be a table in a database,
    GroupEJB referes to Entity Bean.
    with the following fields. Group Id , Group disciption. where group ID is primary Key.
    Use a session bean and create your group A B C D.( EJB create method).
    Simple i guess.
    Enjoy
    Zoha.

  • WLS 5.1.0 SP 12 ejbc throws NoSuchMethodError on entity beans

    Greetings all,
    Due to a trashed hard disk, I'm in the middle of getting WebLogic
    server reinstalled. Because of some problems with Oracle 8.1.6 and
    WLS 5.1.0 SP9, I've been trying to get SP12 to run, with little luck.
    I suspect an installation / configuration problem, but I don't know
    what it is.
    The symptom is that I can't compile entity beans - ejbc throws a
    NoSuchMethodError exception. For the sake of simplicity, and to prove
    to myself it wasn't our code, I tried building one of the examples,
    and it has the same problem. Does anyone see anything I've done
    wrong in the configuration?
    Below is the captured output from build & wlconfig:
    C:\weblogic\examples\ejb\basic\containerManaged>build
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\jdk1.3.1\jre"
    set JAVA_HOME=\java
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\weblogic" set
    WL_HOME=\weblogic
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYSERVER=c:\weblogic\myserver
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYCLASSPATH=c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogi
    c\lib\weblogicaux.jar;c:\weblogic\
    myserver\clientclasses
    C:\weblogic\examples\ejb\basic\containerManaged>mkdir build build\META-INF
    A subdirectory or file build already exists.
    Error occurred while processing: build.
    A subdirectory or file build\META-INF already exists.
    Error occurred while processing: build\META-INF.
    C:\weblogic\examples\ejb\basic\containerManaged>copy *.xml build\META-INF
    ejb-jar.xml
    weblogic-cmp-rdbms-jar.xml
    weblogic-ejb-jar.xml
    3 file(s) copied.
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d build -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses Account.java AccountHome.java
    ProcessingErrorException.java AccountBean.java
    C:\weblogic\examples\ejb\basic\containerManaged>cd build
    C:\weblogic\examples\ejb\basic\containerManaged\build>jar cv0f
    std_ejb_basic_containerManaged.jar META-INF examples
    added manifest
    ignoring entry META-INF/
    adding: META-INF/ejb-jar.xml(in = 1210) (out= 1210)(stored 0%)
    adding: META-INF/weblogic-cmp-rdbms-jar.xml(in = 1472) (out= 1472)(stored
    0%)
    adding: META-INF/weblogic-ejb-jar.xml(in = 975) (out= 975)(stored 0%)
    adding: examples/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/Account.class(in = 422) (out=
    422)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountBean.class(in = 3884)
    (out= 3884)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountHome.class(in = 711)
    (out= 711)(stored 0%)
    adding:
    examples/ejb/basic/containerManaged/ProcessingErrorException.class(in
    =339) (out= 339)(stored 0%)
    C:\weblogic\examples\ejb\basic\containerManaged\build>cd ..
    C:\weblogic\examples\ejb\basic\containerManaged>java -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses -Dweblogic.home=c:\weblogic
    weblogic.ejbc -compiler javac build\std_ejb_basic_containerManaged.jar
    c:\weblogic\myserver\ejb_basic_containerManaged.jar
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: Error from ejbc: java.lang.reflect.InvocationTargetException:
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target
    exception:[java.lang.NoSuchMethodError]]
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:628)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: ejbc found errors
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d
    c:\weblogic\myserver\cl
    ientclasses -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\we
    blogic\lib\weblogicaux.jar;c:\weblogic\myserver\clientclasses Account.java
    Accou
    ntHome.java ProcessingErrorException.java Client.java
    C:\weblogic\examples\ejb\basic\containerManaged>wlconfig
    WebLogic startup settings are presently:
    CLASSPATH Prefix C:\weblogic\myserver\serverclasses
    CLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\tools
    .jar;c:\jdk1.3.1\jre\lib\rt.jar;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\l
    icense
    ;C:\weblogic\lib\weblogic510sp11.jar;C:\weblogic\classes;C:\weblogic\lib\w
    eblogi
    caux.jar;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    JAVA_HOME c:\jdk1.3.1\jre
    WEBLOGIC_LICENSEDIR C:\weblogic\license
    WEBLOGIC_HOME C:\weblogic
    system properties:
    java.security.manager
    java.security.policy==C:\weblogic\weblogic.policy
    weblogic.system.home=C:\weblogic
    java.compiler=symcjit
    weblogic.class.path=C:\weblogic\license;C:\weblogic\lib\webl
    ogic510sp11.jar;C:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\
    weblog
    ic\lib\weblogicaux.jar
    INITIAL_HEAP 64 MB
    MAX_HEAP 64 MB
    SERVERCLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\rt.ja
    r;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\lib\weblogic510sp11boot.jar;C:\
    weblog
    ic\classes\boot;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    Type "wlconfig -help" for program usage.

    Do all the examples fail to build, or just the EJB CMP examples? I ask
    because in 5.1, there's a separate WebLogic_CMP_RDBMS.jar that's part of
    the install process, but it's only used for CMP. If the other examples
    work, then that's likely to be your problem.
    -- Rob
    Erik Horstkotte wrote:
    Greetings all,
    Due to a trashed hard disk, I'm in the middle of getting WebLogic
    server reinstalled. Because of some problems with Oracle 8.1.6 and
    WLS 5.1.0 SP9, I've been trying to get SP12 to run, with little luck.
    I suspect an installation / configuration problem, but I don't know
    what it is.
    The symptom is that I can't compile entity beans - ejbc throws a
    NoSuchMethodError exception. For the sake of simplicity, and to prove
    to myself it wasn't our code, I tried building one of the examples,
    and it has the same problem. Does anyone see anything I've done
    wrong in the configuration?
    Below is the captured output from build & wlconfig:
    C:\weblogic\examples\ejb\basic\containerManaged>build
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\jdk1.3.1\jre"
    set JAVA_HOME=\java
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\weblogic" set
    WL_HOME=\weblogic
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYSERVER=c:\weblogic\myserver
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYCLASSPATH=c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogi
    c\lib\weblogicaux.jar;c:\weblogic\
    myserver\clientclasses
    C:\weblogic\examples\ejb\basic\containerManaged>mkdir build build\META-INF
    A subdirectory or file build already exists.
    Error occurred while processing: build.
    A subdirectory or file build\META-INF already exists.
    Error occurred while processing: build\META-INF.
    C:\weblogic\examples\ejb\basic\containerManaged>copy *.xml build\META-INF
    ejb-jar.xml
    weblogic-cmp-rdbms-jar.xml
    weblogic-ejb-jar.xml
    3 file(s) copied.
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d build -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses Account.java AccountHome.java
    ProcessingErrorException.java AccountBean.java
    C:\weblogic\examples\ejb\basic\containerManaged>cd build
    C:\weblogic\examples\ejb\basic\containerManaged\build>jar cv0f
    std_ejb_basic_containerManaged.jar META-INF examples
    added manifest
    ignoring entry META-INF/
    adding: META-INF/ejb-jar.xml(in = 1210) (out= 1210)(stored 0%)
    adding: META-INF/weblogic-cmp-rdbms-jar.xml(in = 1472) (out= 1472)(stored
    0%)
    adding: META-INF/weblogic-ejb-jar.xml(in = 975) (out= 975)(stored 0%)
    adding: examples/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/Account.class(in = 422) (out=
    422)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountBean.class(in = 3884)
    (out= 3884)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountHome.class(in = 711)
    (out= 711)(stored 0%)
    adding:
    examples/ejb/basic/containerManaged/ProcessingErrorException.class(in
    =339) (out= 339)(stored 0%)
    C:\weblogic\examples\ejb\basic\containerManaged\build>cd ..
    C:\weblogic\examples\ejb\basic\containerManaged>java -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses -Dweblogic.home=c:\weblogic
    weblogic.ejbc -compiler javac build\std_ejb_basic_containerManaged.jar
    c:\weblogic\myserver\ejb_basic_containerManaged.jar
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: Error from ejbc: java.lang.reflect.InvocationTargetException:
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target
    exception:[java.lang.NoSuchMethodError]]
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:628)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: ejbc found errors
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d
    c:\weblogic\myserver\cl
    ientclasses -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\we
    blogic\lib\weblogicaux.jar;c:\weblogic\myserver\clientclasses Account.java
    Accou
    ntHome.java ProcessingErrorException.java Client.java
    C:\weblogic\examples\ejb\basic\containerManaged>wlconfig
    WebLogic startup settings are presently:
    CLASSPATH Prefix C:\weblogic\myserver\serverclasses
    CLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\tools
    .jar;c:\jdk1.3.1\jre\lib\rt.jar;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\l
    icense
    ;C:\weblogic\lib\weblogic510sp11.jar;C:\weblogic\classes;C:\weblogic\lib\w
    eblogi
    caux.jar;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    JAVA_HOME c:\jdk1.3.1\jre
    WEBLOGIC_LICENSEDIR C:\weblogic\license
    WEBLOGIC_HOME C:\weblogic
    system properties:
    java.security.manager
    java.security.policy==C:\weblogic\weblogic.policy
    weblogic.system.home=C:\weblogic
    java.compiler=symcjit
    weblogic.class.path=C:\weblogic\license;C:\weblogic\lib\webl
    ogic510sp11.jar;C:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\
    weblog
    ic\lib\weblogicaux.jar
    INITIAL_HEAP 64 MB
    MAX_HEAP 64 MB
    SERVERCLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\rt.ja
    r;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\lib\weblogic510sp11boot.jar;C:\
    weblog
    ic\classes\boot;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    Type "wlconfig -help" for program usage.

  • CAN'T LOOKUP SIMPLE ENTITY BEAN : ''JAVAX.NAMING.NAMINGEXCEPTION: LOOKUP ERROR''

    Hello, we were forwarded to this forum from TAR section of Metalink. We are facing a problem with JDev-RC2/OC4J-9.0.3 and seems that we are hitting Bug 2276197. The BUG is marked as internal and therefore we can't see it. So, it's not clear where the problem is, if in JDev or OC4J or both ?
    Testcase Step-by-step:
    1. Invoke JDeveloper 9.0.3.815
    2. Create a workspace & a project.
    3. Create an default Container-managed Entity Beans frim Tables.
    4. Create Sample Java Client with "Connect to OC4J Embedded in Jdeveloper" and run it, it gives above error.
    You can download a testcase that is part of TAR-2125538.995, that we opened on Metalink.
    Please help. Thanks in advance.

    Hi Radim,
    Personally, I have played a little with JDeveloper, but I am not
    actively using it for my development -- I prefer to do most things
    myself. True, the JDeveloper wizards do a lot of the work for you,
    but at least (with my way), when something goes wrong, I have a
    better idea of where to look.
    So I can't help you much on the JDeveloper side, but an app is an
    app regardless of how you develop it, so I'll offer a list of things
    to check (just in case you haven't already done so :-).
    I haven't looked at your test case, but from your description, I
    assume you have a standalone java client. Again, I assume JDeveloper
    handles the details for you (and it may be doing it wrong -- as
    you suggest), but the way you do your JNDI lookup depends on the
    type of client you use. For a standalone java client (that is also
    deployed to OC4J), your "initial context factory" class should be:
    com.evermind.server.ApplicationClientInitialContextFactory
    and your "provider URL" should be:
    ormi://<host>/<app-name>
    where <host> is the name of the computer where OC4J is running
    (you can also use "localhost") and <app-name> is the name given
    to your application at deployment time. Again, JDeveloper handles
    the deployment, but the "app-name" should also appear in the
    "server.xml" configuration file which is usually located in the
    "config" subdirectory of the OC4J home directory.
    The lookup string for your entity bean should be the "logical"
    name, meaning the name of your bean prefixed with "java:comp/env".
    Again, I guess JDeveloper handles the bean name part for you,
    but the bean name appears in the "ejb-jar.xml" file under the
    "ejb-name" element.
    So if you've already checked all of the above, then please excuse
    me for not telling you anything you don't already know.
    Good Luck,
    Avi.

  • Lookup Data ( Readonly Entity Bean)

    My application has a requirement for multiple lookup data ( asset types ,
    broker types ) with code and description. The lookup data is fairly static
    and only updated through an external source.Can I use a read only BMP Entity
    EJB. The primary key will be the lookup type.
    Is this a good pattern or are any other efficient ways to achieve the same
    thing.
    John.

    That fits quite well into what ReadOnly entity beans are designed for.
    Charles
    "John" <[email protected]> wrote:
    My application has a requirement for multiple lookup data ( asset types
    broker types ) with code and description. The lookup data is fairly static
    and only updated through an external source.Can I use a read only BMP
    Entity
    EJB. The primary key will be the lookup type.
    Is this a good pattern or are any other efficient ways to achieve the
    same
    thing.
    John.

  • Entity Bean can only use container-managed transaction demarcation?

    In <<Designing Enterprise Application with J2EE 2nd>>
    Section 2.3.3.3 Enterprise Bean Transactions,it says:Entity beans can only use container-managed transaction demarcation.
    That means,i can not get UserTransaction from EJBContext.
    Is that true?

    Yes this is the requirement of the specs. Your ejb code generator should give you the error if you use usertransaction.
    --Ashwani                                                                                                                                                                                                                                                                   

  • How can i lookup a session bean from the client side

    how can i lookup a session bean from the client side...........i am using sun appserver..............
    this is my code.................[B]
    private final static String JNDI_NAME="ejb/LmsBean";
    private static String url="ldap://localhost:4848";
    Hashtable h=new Hashtable();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    h.put(Context.PROVIDER_URL,url);
    System.out.println("Before Loading Context in Delegate");
    Context ctx=new InitialContext(h);
    System.out.println("Loaded Context in Delegate");
    Object obj=ctx.lookup(JNDI_NAME);
    System.out.println("Loaded Object in Delegate");
    System.out.println("Before Loading Home in Delegate");
    LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
    System.out.println("Loaded Home in Delegate");
    lms = home.create();
    System.out.println("Loaded remote in Delegate");
    [B]and i got the exception........
    Inside Client before calling delegate
    Before Loading Context in Delegate
    javax.naming.CommunicationException: Request: 1 cancelled
    javax.naming.CommunicationException: Request: 1 cancelled
    at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
    at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
    at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:171)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193
    at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.ja
    va:136)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
    a:66)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    62)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at com.parx.lms.lmsdelegate.LmsDelegate.getController(LmsDelegate.java:3
    0)
    at com.parx.lms.lmsdelegate.LmsDelegate.addUserDelegate(LmsDelegate.java
    :50)
    at com.parx.lms.client.consoleClient.Client.main(Unknown Source)
    pls go tru the exception and pls help.........

    That url string should be having the server name or ip instead of localhost.

  • Urgent: Entity Bean question

    Hi,
    I am using an entity beans to store and load records in a table. When I save records to the table I store them in an order of Primary key ID, but when loading the entity bean this order is not being preserved. Is there any way I can specify what the order (ascending or descending) the entiry bean needs to load records?
    Thanks.

    Dunno what exactly are you asking.
    I mean how are u making bulk entity bean save records?
    What exactly is the purpose ?
    Cheers,
    manjunath

Maybe you are looking for