EJB BMP Starter

I have some key basic questions on BMP Entity Beans. I have been looking at the sample application at http://developers.sun.com/tools/javatools/documentation/s1s5/accountapp.html.
1. I have a database that is pre-populated by some external ways other than EJBs. Does my BMP Entity Bean that i mapped to a specific table know about the previous data. In the sample application above, there is a loadRow method (Adding private methods to perform database calls, step 10). In it, it says:
String selectStatement = "select balance from account where id = ? ";
PreparedStatement prepStmt = con.prepareStatement(selectStatement);
prepStmt.setString(1,this.id);
Where does this.id came from? It is not set anywhere but in the ejbCreate() method. For example, if my client program just wants to list the balance from accounts table bound to an id without inserting new rows into the database, how would that happen? It confuses me since ejbCreate method is called automatically everytime i use a bean and it contains SQL insert statements.
2. In the same example above, in section (implementing the bean's other methods, steps 3 and 4) it says:
public void ejbActivate() {
id = (String) context.getPrimaryKey();
} What is this id variable? There is no type definition. Is this the id that was defined in AcccountEJB (from db mapping)? If so how do i reference to it without any class names?
3. After all, i am looking for a clear BMP sample(with session beans using bmp beans, and servlets using session beans to access database data) that can guide me. If someone knows the place of such an example I would be very much greatful.
I seem to be unable to grab the logic of EJB BMP. Answers to these questions would be helpful.
Thanks in advance.

Greetings,
1. I have a database that is pre-populated by some external ways other than EJBs. Does my BMP
Entity Bean that i mapped to a specific table know about the previous data. In the sampleThe container will not have any beans representing the new data until the client attempts to find them.
String selectStatement = "select balance from account where id = ? ";
PreparedStatement prepStmt = con.prepareStatement(selectStatement);
prepStmt.setString(1,this.id);
Where does this.id came from? It is not set anywhereAs shown below, it is grabbed out of the EJBObject (which gets it as a consequence of either a create or finder method call), when a bean instance is "activated" - or, 'swapped in' from the free pool and associated with the EJBObject.
but in the ejbCreate() method. For example, if myThe ejbCreate method returns an instance of the Primary Key class which the container stores in the EJBObject. In this case, the PK class is type String and referenced by the variable 'id'.
client program just wants to list the balance from accounts table bound to an id without inserting
new rows into the database, how would that happen? ItPresumably, the client knows the "primary key" of the entity (the unique tuple from the accounts table which the EB represents), it wants to access and uses that as the argument to a findByPrimaryKey call against the home object.
confuses me since ejbCreate method is called automatically everytime i use a bean and it contains
SQL insert statements.Er, no. The bean's ejbCreate method is called by the container as a consequence of the client calling the corresponding create method on the home. It does not happen "automatically", but only as a consequence of the client wanting to create a new entity in the application - and, accordingly, in the underlying persistence resource. If the client does not want to create a new entity but, rather, use an existing one, then it calls an appropriate finder method to locate the instance and get a reference to it.
2. In the same example above, in section (implementing the bean's other methods, steps 3 and 4)
it says:
public void ejbActivate() {
id = (String) context.getPrimaryKey();
Refer again to the above...
What is this id variable? There is no type definition. Is this the id that was defined in AcccountEJB
(from db mapping)? If so how do i reference to it without any class names?It is indeed the private member of AccountBean (see step 7 under "Adding a create method to the bean" of section 4).
3. After all, i am looking for a clear BMP sample(with session beans using bmp beans, and
servlets using session beans to access database data) that can guide me. If someone knows the
place of such an example I would be very much greatful.It would appear that you require more grounding in the fundamentals of EJB generally - particularly with regard to their lifecycle and state transitions. Start with the specification. Then take a look at J2EE core design patterns...
I seem to be unable to grab the logic of EJB BMP.
Answers to these questions would be helpful.
Thanks in advance.Regards,
Tony "Vee Schade" Cook

Similar Messages

  • Where to Instantiate a DAO in an EJB BMP?

    We are using DAOs with our EJB BMPs..
    My question is what method should the DAO be Instantiated in?
    I have seen it done in the:
    1) ejbActivate (seems to cause a null pointer error on the weblogic server)
    2) setEntityContext method
    3) all methods that use the dao object.

    This depends a bit on how your DAOs are built, but you certainly don't want to instantiate a new DAO every time you need one. Unnecessary object creation is not a Good Thing.
    Generally speaking, an instance variable populated upon bean instantiation works just fine (i.e private MyDao dao = new MyDao();). If your DAO is serializable and doesn't contain any transient info of it's own, you're pretty much done since the DAO will get serialized when the bean is passivated.
    If it does contain transient data/resources (and it probably shouldn't) you can set/remove them during ejbActivate/ejbPassivate.
    If the DAO is not serializable (and it probably should be), then instantiating one during ejbActivate should not be a problem. What was the exact cause of the NPE you got?

  • Ejb BMP never commits even with transactions

    I have serious problems with any EJB running inside the Oracle8i server, Linux Rh6.2/Oracle 8.1.7.0.1
    ALL code does not perist its data, but it sielently fails. For instance take
    $ORACLE_HOME/javavm/demo/examples/ejb/transactions/clientside
    I changed the last line in Client.java from crollback to commit()...
    I run this program twice:
    Beginning salary = 3000.0
    End salary = 3300.0
    Beginning salary = 3000.0
    End salary = 3300.0
    The second invocation should show the beginning salary as 3300.0
    In essance ALL of my EJBs are showing simular behavior. This problem is also seen in ALL of the examples. My environment uesed to work, but I can't figure out what changed to make every EJB-BMP nonpersistant.
    any help would be greatly appreciated.
    thanks,
    -rick

    I don't think my probmem is related to an exception being lost because no exceptions are throws, I have alot of trace information and I always see complete method calls through ejbCreate, ejbStore, et. al.
    My problem is that a transaction never gets commited, even when the JTS is used. Infact I have this piticular problem with ALL Oracle BMP-EJBs
    I'm just going to have to open a ITAR, guess thats want support is for. I'm just perplexed as to why it worked last week, and now the demos can't save their state.
    a bit scarie for something that may one day be in production.

  • Call EJB from Start Up class

    I'm using OC4J 10.1.3 Standalone.
    I have a requirement to initialize web services and configuration parameters during app server start up.
    Accordingly,I planned to call a EJB 2.0 stateless session bean from a StartUp class.
    The ejb is responsible for initializing some configurations and web services.The ejb is dependent on some other classes which are present as utility jars .
    However,I cannot somehow figure out how to refer the EJB from my startup class because the EAR which contains the EJB jar is in a child loader to that containing the startup class.
    Please guide me!! Please suggest if some alternative approach could be taken to suffice my requirement.
    TIA

    Avi, I was just waiting for the "servlet hack".
    I really prefer the application client way, much cleaner, no servlet container needed, and could be tested outside the container.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                       

  • Ejb - BMP Finder

    Hello,
    I wrote an appliation which connects to EJB.
    I use BMP, and wrote a finder in the CustomerBean which sets
    records of customers table to a com.borland.dx.dataset.DataSetData (which is serializable)
    I tried to do this:
    public DataSetData ejbFindAll() throws FinderException {}
    but I get an error that a finder can't return a DataSetData,
    only a collection or the bean.
    can I write other function which will return DataSetData,
    and to write it's definition in the Home interface?
    it means not using finders.
    Thanks.

    Thanks for your reply.
    According to your reply, I shouldn't use Entity Beans,
    only remote Session Beans.
    Is it accepted to write in this way, while using the
    EJB technologic?
    I write an applet GUI, which contains swing and borland
    components like JdbTable.
    It will take a long time to add the records to the collection
    in the Entity Bean,
    and move the collection to dataset in the applet.
    I will be happy to hear your advice.
    Thanks,
    Anat

  • EJB bmp persistence

    hi,
    I was reading tutorials on BMP.
    I found that in all the tutorial they have mentioned that it involves writting queries ourself.
    So by using a BMP means 'writing the query alone' or is there any service that has to be provided.
    Also can u broach me abt the services that are taken care in a CMP.

    There some limitations of CMPs.. Some of them are..
    1. Limitations of type of data sources that may be supported by a container for CMPs
    2. EJB QL cant handle complex queries
    Some advantages..
    1. easier to create/manage than BMPs
    2. If you need CMR then you may need to use CMPs
    3. Optmization of SQL by containers
    venkk
    http://www.venkks.net/

  • How can i make sure ejb container starts before web server

    When starting the application server which one starts first?
    Our system requires ejb container to start first.
    Currently when i test it, the web container starts before ejb sometimes.
    Is there any way to force the ejb container to start up before the web container starts?

    What exactly is the dependency you have in your application? The Java EE spec does not
    impose any requirements on the order in which the different modules within an .ear are
    instantiated.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                               

  • EJB BMP slow?

    Hello,
    I don't understand why people use EJB's if it is so slow. I am trying
    to do simple GET and SET methods on the current bean in memory, where
    each GET and SET method calls ejbLoad() and ejbStore() which are
    extremely resource intensive so they are very slow. Are there ways
    around this?
    I don't see why someone would want to do use EJB's when it is so
    slow...doesn't make sense. I must be missing something. Anyone?
    Tim :-)

    ck388 <[email protected]> wrote:
    I don't understand why people use EJB's if it is so slow. I am trying
    to do simple GET and SET methods on the current bean in memory, where
    each GET and SET method calls ejbLoad() and ejbStore() which are
    extremely resource intensive so they are very slow. Are there ways
    around this?
    I don't see why someone would want to do use EJB's when it is so
    slow...doesn't make sense. I must be missing something. Anyone?using bmp, it's up to you to optimize the expensive db calls.
    keep a dirty bit for each field and only commit it in your ejbStore
    when it's actually been changed, etc.
    if your object-relational mappings are not complex, you can bind your
    entity to the db through cmp, and then the container does the sql and
    the optimizations for you.
    ____________________}John Flinchbaugh{______________________
    | [email protected] http://www.hjsoft.com/~glynis/ |
    ~~Powered by Linux: Reboots are for hardware upgrades only~~

  • Error starting WL - weblogic.xml.dom.ChildCountException: missing child home in ejb-ref

    hi,
    i get this following error when i start the WL 7.0. The web application fails
    to start but the ejbs are started properly. This is an example from the Monson
    Haefel book, on the CMP: Entity bean relationships.
    Can anybody tell me what is happening ??
    -thanks
    -vasanth
    Error log:
    =============
    <Error> <HTTP> <101179> <[HTTP] Error parsing des criptor in Web appplication
    "C:\bea\user_projects\mydomain\.\myserver\.wlnotdele
    te\titan\titan.war" [Path="C:\eclipse\workspace\titan4\dist\titan.ear", URI="tit
    an.war"
    weblogic.xml.dom.ChildCountException: missing child home in ejb-ref
            at weblogic.xml.dom.DOMUtils.getElementByTagName(DOMUtils.java:147)
            at weblogic.xml.dom.DOMUtils.getValueByTagName(DOMUtils.java:128)
            at weblogic.servlet.internal.dd.EJBReference.<init>(EJBReference.java:61
            at weblogic.servlet.internal.dd.WebAppDescriptor.<init>(WebAppDescriptor
    .java:247)
            at weblogic.servlet.internal.dd.DescriptorLoader.initializeWebXml(Descri
    ptorLoader.java:540)
            at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
    .java:253)
            at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
    .java:215)
            at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.ja
    va:282)
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:714)
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:555)
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:458)
            at weblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
    ations(SlaveDeployer.java:490)
            at weblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
    er.java:253)
            at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
    alize(DeploymentManagerServerLifeCycleImpl.java:150)
            at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
    ava:54)
            at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
            at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
            at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
            at weblogic.Server.main(Server.java:32)
    >
    <Jun 23, 2003 10:10:51 AM CDT> <Error> <Deployer> <149205> <The Slave Deployer
    f
    ailed to initialize the application titan due to error weblogic.management.Appli
    cationException: Prepare failed. Task Id = null
    Module Name: titan.war, Error: Could not load web application from 'C:\bea\user_
    projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
    weblogic.management.ApplicationException: Prepare failed. Task Id = null
    Module Name: titan.war, Error: Could not load web application from 'C:\bea\user_
    projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:720)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:555)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:458)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
    ations(SlaveDeployer.java:490)
    at weblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
    er.java:253)
    at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
    alize(DeploymentManagerServerLifeCycleImpl.java:150)
    at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
    ava:54)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
    at weblogic.Server.main(Server.java:32)
    >

    It is working now.
    For a local entity bean, i was using <ejb-ref> instead of <local-ejb-ref>
    Once i changed that, it worlked.
    thanks
    -vasanth
    "Sanjeev Chopra" <[email protected]> wrote:
    correct url for doc...
    http://e-docs.bea.com/wls/docs81/webapp/web_xml.html#1020090
    "Sanjeev Chopra" <[email protected]> wrote in message
    news:[email protected]...
    Seems like titan.war's WEB-INF/web.xml has an ejb-ref element witha
    missing
    <home> element .
    see http://e-docs/wls/docs81/webapp/web_xml.html#1020090
    "Vasanth" <[email protected]> wrote in message
    news:[email protected]...
    hi,
    i get this following error when i start the WL 7.0. The web applicationfails
    to start but the ejbs are started properly. This is an example from
    the
    Monson
    Haefel book, on the CMP: Entity bean relationships.
    Can anybody tell me what is happening ??
    -thanks
    -vasanth
    Error log:
    =============
    <Error> <HTTP> <101179> <[HTTP] Error parsing des criptor in Webappplication
    "C:\bea\user_projects\mydomain\.\myserver\.wlnotdele
    te\titan\titan.war" [Path="C:\eclipse\workspace\titan4\dist\titan.ear",URI="tit
    an.war"
    weblogic.xml.dom.ChildCountException: missing child home in ejb-ref
    atweblogic.xml.dom.DOMUtils.getElementByTagName(DOMUtils.java:147)
    at
    weblogic.xml.dom.DOMUtils.getValueByTagName(DOMUtils.java:128)
    atweblogic.servlet.internal.dd.EJBReference.<init>(EJBReference.java:61
    atweblogic.servlet.internal.dd.WebAppDescriptor.<init>(WebAppDescriptor
    java:247)
    atweblogic.servlet.internal.dd.DescriptorLoader.initializeWebXml(Descri
    ptorLoader.java:540)
    atweblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
    java:253)
    atweblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
    java:215)
    atweblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.ja
    va:282)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:714)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:555)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:458)
    atweblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
    ations(SlaveDeployer.java:490)
    atweblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
    er.java:253)
    atweblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
    alize(DeploymentManagerServerLifeCycleImpl.java:150)
    atweblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
    ava:54)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
    at weblogic.Server.main(Server.java:32)
    >
    <Jun 23, 2003 10:10:51 AM CDT> <Error> <Deployer> <149205> <The SlaveDeployer
    f
    ailed to initialize the application titan due to errorweblogic.management.Appli
    cationException: Prepare failed. Task Id = null
    Module Name: titan.war, Error: Could not load web application from'C:\bea\user_
    projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
    weblogic.management.ApplicationException: Prepare failed. Task Id
    = null
    Module Name: titan.war, Error: Could not load web application from'C:\bea\user_
    projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:720)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:555)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:458)
    atweblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
    ations(SlaveDeployer.java:490)
    atweblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
    er.java:253)
    atweblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
    alize(DeploymentManagerServerLifeCycleImpl.java:150)
    atweblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
    ava:54)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
    at weblogic.Server.main(Server.java:32)
    >

  • Stateless EJB expose as web service

    I use JDeveloper 10.1.3.0.4 created the folllowing EJB:
    BMP: ProductEntityEJB
    Stateless session bean: ProductSessionEJB
    After i generated session bean web service via web service wizard and
    deploy the web service by the generated deployment file,
    the error occurred:
    ---- Deployment started. ---- 2006&#24180;3&#26376;29&#26085; &#19979;&#21320;02:41:16
    Target platform is Standalone OC4J 10g 10.1.3 (oc4j).
    Wrote EJB JAR file to C:\JCo\JDeveloper Workspace\JDevFYP\JDevFYPWS\EjbWebServices.jar
    Wrote EAR file to C:\JCo\JDeveloper Workspace\JDevFYP\JDevFYPWS\JDevFYP-JDevFYPWS-EJB-WS.ear
    Uploading file JDevFYP-JDevFYPWS-EJB-WS.ear ...
    Application Deployer for JDevFYP-JDevFYPWS-EJB-WS STARTS.
    Copy the archive to C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\JDevFYP-JDevFYPWS-EJB-WS.ear
    Initialize C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\JDevFYP-JDevFYPWS-EJB-WS.ear begins...
    Unpacking JDevFYP-JDevFYPWS-EJB-WS.ear
    Done unpacking JDevFYP-JDevFYPWS-EJB-WS.ear
    Initialize C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\JDevFYP-JDevFYPWS-EJB-WS.ear ends...
    Starting application : JDevFYP-JDevFYPWS-EJB-WS
    Initializing ClassLoader(s)
    Initializing EJB container
    Loading connector(s)
    Starting up resource adapters
    Processing EJB module: EjbWebServices.jar
    application : JDevFYP-JDevFYPWS-EJB-WS is in failed state
    Operation failed with error:
         Missing class: fypws.bean.product.ProductSessionEJBBean
         Dependent class: com.evermind.server.ejb.deployment.BeanDescriptor
         Loader: oc4j:10.1.3
         Code-Source: /C:/SAP/JSF/jdevstudio1013/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in C:\SAP\JSF\jdevstudio1013\j2ee\home\oc4j.jar
    This load was initiated at JDevFYP-JDevFYPWS-EJB-WS.root:0.0.0 using the Class.forName() method.
    The missing class is available from the following locations:
         1. Code-Source: /C:/SAP/JSF/jdevstudio1013/j2ee/home/applications/ejb1/ejb1.jar (from <ejb> in C:\SAP\JSF\jdevstudio1013\j2ee\home\applications\ejb1)
         This code-source is available in loader ejb1.root:0.0.0.
    Deployment failed
    Elapsed time for deployment: 2 seconds
    #### Deployment incomplete. #### 2006&#24180;3&#26376;29&#26085; &#19979;&#21320;02:41:18
    How can i solve it??

    Can you try and see if installing JDeveloper into a directory with no spaces in it (i.e not in \JDeveloper Workspace\) solves the problem?

  • Unable to start OIM 9.1.0

    I am unable to start OIM 9.1.0. I am getting the following error.
    09/07/24 14:38:12 java.lang.InstantiationException: Application: Xellerate is in failed state as initialization failed
    09/07/24 14:38:12      at com.evermind.server.Application.setConfig(Application.java:496)
    09/07/24 14:38:12      at com.evermind.server.Application.setConfig(Application.java:332)
    09/07/24 14:38:12      at com.evermind.server.Application.doStart(Application.java:1993)
    09/07/24 14:38:12      at com.evermind.server.Application.start(Application.java:1926)
    09/07/24 14:38:12      at oracle.oc4j.admin.management.mbeans.J2EEStateManageableObjectBase.start(J2EEStateManageableObjectBase.java:213)
    09/07/24 14:38:12      at oracle.oc4j.admin.management.mbeans.J2EEApplication.start(J2EEApplication.java:1348)
    09/07/24 14:38:12      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    09/07/24 14:38:12      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    09/07/24 14:38:12      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    09/07/24 14:38:12      at java.lang.reflect.Method.invoke(Method.java:585)
    09/07/24 14:38:12      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
    09/07/24 14:38:12      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    09/07/24 14:38:12      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    09/07/24 14:38:12      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    09/07/24 14:38:12      at java.lang.reflect.Method.invoke(Method.java:585)
    09/07/24 14:38:12      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:239)
    09/07/24 14:38:12      at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1071)
    09/07/24 14:38:12      at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:953)
    09/07/24 14:38:12      at oracle.oc4j.admin.jmx.server.mbeans.model.DefaultModelMBeanImpl.invoke(DefaultModelMBeanImpl.java:700)
    09/07/24 14:38:12      at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
    09/07/24 14:38:12      at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
    09/07/24 14:38:12      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
    09/07/24 14:38:12      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
    09/07/24 14:38:12      at oracle.oc4j.admin.jmx.server.state.ApplicationStateFilterMBeanServer.invoke(ApplicationStateFilterMBeanServer.java:572)
    09/07/24 14:38:12      at oracle.oc4j.admin.jmx.ejb.MBeanServerEjbBean.invoke(MBeanServerEjbBean.java:365)
    09/07/24 14:38:12      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    09/07/24 14:38:12      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    09/07/24 14:38:12      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    09/07/24 14:38:12      at java.lang.reflect.Method.invoke(Method.java:585)
    09/07/24 14:38:12      at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    09/07/24 14:38:12      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    09/07/24 14:38:12      at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    09/07/24 14:38:12      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    09/07/24 14:38:12      at com.evermind.server.ejb.interceptor.system.TxSupportsInterceptor.invoke(TxSupportsInterceptor.java:37)
    09/07/24 14:38:12      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    09/07/24 14:38:12      at com.evermind.server.ejb.interceptor.system.SecurityRoleInterceptor.invoke(SecurityRoleInterceptor.java:47)
    09/07/24 14:38:12      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    09/07/24 14:38:12      at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    09/07/24 14:38:12      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    09/07/24 14:38:12      at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    09/07/24 14:38:12      at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:844)
    09/07/24 14:38:12      at MBeanServerEjb_RemoteProxy_1me2j7.invoke(Unknown Source)
    09/07/24 14:38:12      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    09/07/24 14:38:12      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    09/07/24 14:38:12      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    09/07/24 14:38:12      at java.lang.reflect.Method.invoke(Method.java:585)
    09/07/24 14:38:12      at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
    09/07/24 14:38:12      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    09/07/24 14:38:12      at java.lang.Thread.run(Thread.java:595)
    09/07/24 14:38:12 Caused by: java.lang.InstantiationException: Error initializing ejb-modules: Resource exception(oimOJMSRA) for MessageDrivenBean AttestationMessageHandlerMDB during endpoint activation: setDestinations: javax.jms.InvalidDestinationException: Looking up java:comp/resource/oimOJMSRP/Queues/XLAQATTESTATIONQUEUE: javax.naming.NameNotFoundException: No resource named 'oimOJMSRP/Queues/XLAQATTESTATIONQUEUE'found
    09/07/24 14:38:12      at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:1064)
    09/07/24 14:38:12      at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:217)
    09/07/24 14:38:12      at com.evermind.server.Application.setConfig(Application.java:438)
    09/07/24 14:38:12      ... 48 more
    09/07/24 14:38:12 Caused by: java.lang.InstantiationException: Resource exception(oimOJMSRA) for MessageDrivenBean AttestationMessageHandlerMDB during endpoint activation: setDestinations: javax.jms.InvalidDestinationException: Looking up java:comp/resource/oimOJMSRP/Queues/XLAQATTESTATIONQUEUE: javax.naming.NameNotFoundException: No resource named 'oimOJMSRP/Queues/XLAQATTESTATIONQUEUE'found
    09/07/24 14:38:12      at com.evermind.server.ejb.MessageDrivenHome.initializeJCAServer(MessageDrivenHome.java:576)
    09/07/24 14:38:12      at com.evermind.server.ejb.MessageDrivenHome.initialize(MessageDrivenHome.java:225)
    09/07/24 14:38:12      at com.evermind.server.ejb.MessageDrivenHome.start(MessageDrivenHome.java:128)
    09/07/24 14:38:12      at com.evermind.server.ejb.EJBPackageDeployment.startMessageDrivenHomes(EJBPackageDeployment.java:1182)
    09/07/24 14:38:12      at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:1051)
    09/07/24 14:38:12      ... 50 more
    09/07/24 14:38:12 Caused by: javax.resource.spi.EISSystemException: setDestinations: javax.jms.InvalidDestinationException: Looking up java:comp/resource/oimOJMSRP/Queues/XLAQATTESTATIONQUEUE: javax.naming.NameNotFoundException: No resource named 'oimOJMSRP/Queues/XLAQATTESTATIONQUEUE'found
    09/07/24 14:38:12      at oracle.j2ee.ra.jms.generic.RAUtils.make(RAUtils.java:525)
    09/07/24 14:38:12      at oracle.j2ee.ra.jms.generic.RAUtils.toResourceException(RAUtils.java:598)
    09/07/24 14:38:12      at oracle.j2ee.ra.jms.generic.RAUtils.toResourceException(RAUtils.java:576)
    09/07/24 14:38:12      at oracle.j2ee.ra.jms.generic.EndpointConsumer.setDestinations(EndpointConsumer.java:402)
    09/07/24 14:38:12      at oracle.j2ee.ra.jms.generic.EndpointConsumer.<init>(EndpointConsumer.java:106)
    09/07/24 14:38:12      at oracle.j2ee.ra.jms.generic.JMSResourceAdapter.endpointActivation(JMSResourceAdapter.java:258)
    09/07/24 14:38:12      at oracle.j2ee.connector.ResourceAdapterWrapper.activateEndpoint(ResourceAdapterWrapper.java:496)
    09/07/24 14:38:12      at oracle.j2ee.connector.ResourceAdapterWrapper.endpointActivation(ResourceAdapterWrapper.java:306)
    09/07/24 14:38:12      at com.evermind.server.ejb.MessageDrivenHome.initializeJCAServer(MessageDrivenHome.java:574)
    09/07/24 14:38:12      ... 54 more
    09/07/24 14:38:12 Caused by: javax.jms.InvalidDestinationException: Looking up java:comp/resource/oimOJMSRP/Queues/XLAQATTESTATIONQUEUE: javax.naming.NameNotFoundException: No resource named 'oimOJMSRP/Queues/XLAQATTESTATIONQUEUE'found
    09/07/24 14:38:12      at oracle.j2ee.ra.jms.generic.AdminObjectImpl.getAdminObject(AdminObjectImpl.java:339)
    09/07/24 14:38:12      at oracle.j2ee.ra.jms.generic.AdminObjectDestinationImpl.getRPDestination(AdminObjectDestinationImpl.java:85)
    09/07/24 14:38:12      at oracle.j2ee.ra.jms.generic.EndpointConsumer.setDestinations(EndpointConsumer.java:396)
    09/07/24 14:38:12      ... 59 more
    Please help

    09/07/27 13:48:14 Error initializing the Oracle JMS Resource provider for Queues: Connection Cache with this Cache Name is Disabled
    09/07/27 13:48:18 Error initializing the Oracle JMS Resource provider for Queues: Connection Cache with this Cache Name is Disabled
    09/07/27 13:48:18 WARNING: Application.setConfig Application: Xellerate is in failed state as initialization failed.
    java.lang.InstantiationException: Error initializing ejb-modules: Resource exception(oimOJMSRA) for MessageDrivenBean AttestationMessageHandlerMDB during endpoint activation: setDestinations: javax.jms.InvalidDestinationException: Looking up java:comp/resource/oimOJMSRP/Queues/XLAQATTESTATIONQUEUE: javax.naming.NameNotFoundException: No resource named 'oimOJMSRP/Queues/XLAQATTESTATIONQUEUE'found

  • Can't access EJB deployed on remote OC4J - what am I doing wrong?

    I'm unable to access an EJB deployed on a remote OC4J instance (ie, part of a 9iAS installation on another machine vs local in JDeveloper).
    I've reverted to a stupid-simple EJB in hopes of getting it going prior to trying my actual code. The EJB works fine in JDev (9.0.3) - I 'run' the EJB to start the local OC4J instance, run my client code (generated via the "New Sample Java Client..." option in the Navigator context popup) and all is well.
    I then create an EAR file via the the "Create EJB Jar Deployment Profile..." context popup of the ejb-jar.xml node, followed by "Deploy to EAR file" from the context popup of the resulting ejb1.deploy node. I next "Deploy EAR File" via the "Oracle Enterprise Manager" that comes with 9iAS (the :1810 port). After successfully deploying, I modify my client code in JDeveloper, specifying the new connection information for the remote machine via the Hashtable constructor of InitialContext and attempt to run it. I've tried a number of Context.PROVIDER_URL forms, including: ormi://registered_pingable_host_name:23791/deployed_application_name
    ormi://registered_pingable_host_name:23791/session_deployment_name (from the <enterprise-beans><session-deployment name="xxx"/></enterprise-beans> section of my orion-ejb-jar.xml file, as per a tip in this forum)
    I've tried prefixing ormi:// with http:, but get no response whatesoever in this case.
    I've also tried it without the port number (this port number matches that in my remote OC4J's <oc4j_instance_home>/config/rmi.xml file).
    On the Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS settings, I've tried various values, generally using the 'admin' user, with passwords taken from:
    <oc4j_instance_home>/principals.xml
    <oc4j_instance_home>/application-deployments/application_name/principals.xml
    I've also tried matching the password in the jazn-data.xml, to no avail - this password appears encrypted anyway, but thought I'd give it a try on the off-chance that it was just a randomly-generated password - no go.
    I've also tried SCOTT/TIGER, anonymous, etc. Incidentally, the 'deactivated' attribute of the <user> tag is set to "false" in my principals.xml files.
    No matter what I do, I always get back "javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect"
    Additionally, I get this same message when I try to establish an Application Server Connection via JDev.
    Clearly, I'm missing something critical (and probably simple), but I can't for the life of me figure it out.
    Any help would be much appreciated!
    Thanks,
    Jim Stoll

    Ok, well this is a bit strange...
    3103 - 3103 also fails, and some experimentation has led me to find that any time that I specify a range smaller than 6 (3101 - 3106 works, 3101 - 3105, 3101-3101, 3103-3103, etc does not), the OC4J instance will not restart. I get "An error occurred while starting. The opmn request has failed. From opmn: HTTP/1.1 204 No Content Content-Length: 0 Content-Type: text/html Response: 0 of 1 processes started. Check opmn log files such as ipm.log and ons.log for detailed." in the OEM window (I specify the RMI port range, hit Apply, go to the OC4J instance home page, see that the Status is 'Down', hit Start, and get that message.) <ORACLE_HOME>/product/iasinfra/opmn/logs/ipm.log tells me:
    02/12/03 09:41:12 There is no rmi port left for starting an OC4J process. Please check oc4j's port property in OPMN's configuration file.
    02/12/03 09:41:12 start_proc: UID 3719788: failed to build args
    02/12/03 09:41:12 start_proc_req: failed to start a process in GID OC4JJim2, type: 2
    If I bump it up to 3101 - 3106 or higher, it starts right up. Running opmnadmin debug, as suggested by Venky (thanks Venky!), yields:
    PROCESS TABLE
    UID PID FLAGS TYPE STATUS REF HTTP AJP RMI JMS
    3654011 84 00000040 OC4J Alive 1 0 3005 3106 3206
    424987 604 00000000 Apache Alive 1 7777 0 0 0
    2932088 14849 00000000 OC4J Alive 1 0 3003 3103 3203
    3063160 14878 00000000 OC4J Alive 1 0 3001 3101 3201
    3194232 14906 00000000 OC4J Alive 1 0 3000 3105 3205
    3325304 14936 00000000 OC4J Alive 1 0 3002 3102 3202
    3456376 14964 00000000 OC4J Alive 1 0 3004 3104 3204
    Which is what I would expect, given the specified range of 3101-3106. Trying each of these ports in turn, I've found that I can hit the EJB successfully on 3106, but 3101 - 3105 all fail with:
    javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: No such domain/application: Project7_2; nested exception is:
         javax.naming.AuthenticationException: No such domain/application: Project7_2
         java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
              RMIContext.java:134
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
              InitialContext.java:350
         void Samplemypackage9.MySessionEJBClient1.main(java.lang.String[])
              MySessionEJBClient1.java:15
    I'm a little concerned about assuming the high-end of the range to be the active port on a regular basis (though thus far, among about 20 - 30 tries spaced over 20 - 30 minutes, it has been...) - I guess I can have my code loop through the range until it finds a good port or exhausts the list, but that seems a bit excessive.
    Can you think of a reason that my OC4J instance won't start with a range size of less than 6? I'm on 9iAS 9.0.2, if that makes any difference.
    Thanks,
    Jim

  • Exception while starting Weblogic Application Server (ver 7.0)

    While starting WEBLOGIC server (ver 7.0), we are getting the following exception.
    Can anybody help us to correct this problem.
    Following is the Exception we are getting. We couldn't able to trace the reason
    for this error:
    <May 10, 2004 9:22:36 AM IST> <Debug> <TLS> <000000> <SSLManager(server=udaykr,
    realm=myrealm)>
    <May 10, 2004 9:22:36 AM IST> <Notice> <Security> <090082> <Security initializing
    using realm myrealm.>
    <May 10, 2004 9:22:37 AM IST> <Notice> <WebLogicServer> <000327> <Starting WebLogic
    Admin Server "udaykr" for domain "uday">
    <May 10, 2004 9:22:52 AM IST> <Error> <HTTP> <101065> <[HTTP udaykr] Failed to
    obtain localhost name
    java.net.UnknownHostException: -Z
    at java.net.InetAddress.getAllByName0(Unknown Source)
    at java.net.InetAddress.getAllByName0(Unknown Source)
    at java.net.InetAddress.getAllByName(Unknown Source)
    at java.net.InetAddress.getLocalHost(Unknown Source)
    at weblogic.servlet.internal.HttpServer.initServerNameAndPort(HttpServer.java:579)
    at weblogic.servlet.internal.HttpServer.start(HttpServer.java:196)
    at weblogic.servlet.internal.WebService.startWebServers(WebService.java:134)
    at weblogic.servlet.internal.WebService.resume(WebService.java:105)
    at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:61)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:812)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:294)
    at weblogic.Server.main(Server.java:31)
    >
    setSessionContext(SessionContext) called from class com.hp.wes.ejb.CaseBean_18uvk_Impl

    While starting WEBLOGIC server (ver 7.0), we are getting the following exception.
    Can anybody help us to correct this problem.
    Following is the Exception we are getting. We couldn't able to trace the reason
    for this error:
    <May 10, 2004 9:22:36 AM IST> <Debug> <TLS> <000000> <SSLManager(server=udaykr,
    realm=myrealm)>
    <May 10, 2004 9:22:36 AM IST> <Notice> <Security> <090082> <Security initializing
    using realm myrealm.>
    <May 10, 2004 9:22:37 AM IST> <Notice> <WebLogicServer> <000327> <Starting WebLogic
    Admin Server "udaykr" for domain "uday">
    <May 10, 2004 9:22:52 AM IST> <Error> <HTTP> <101065> <[HTTP udaykr] Failed to
    obtain localhost name
    java.net.UnknownHostException: -Z
    at java.net.InetAddress.getAllByName0(Unknown Source)
    at java.net.InetAddress.getAllByName0(Unknown Source)
    at java.net.InetAddress.getAllByName(Unknown Source)
    at java.net.InetAddress.getLocalHost(Unknown Source)
    at weblogic.servlet.internal.HttpServer.initServerNameAndPort(HttpServer.java:579)
    at weblogic.servlet.internal.HttpServer.start(HttpServer.java:196)
    at weblogic.servlet.internal.WebService.startWebServers(WebService.java:134)
    at weblogic.servlet.internal.WebService.resume(WebService.java:105)
    at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:61)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:812)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:294)
    at weblogic.Server.main(Server.java:31)
    >
    setSessionContext(SessionContext) called from class com.hp.wes.ejb.CaseBean_18uvk_Impl

  • Using EJB Model in Web Dynpro

    I have to redeploy my EJB.ear (used as a Web Dynpro model) everytime the J2EE server is started (only the first time), after which My Web Dynpro program continues to work. In other words, the following code in my Command Bean is not successful without redeploying the EJB.ear for some reason. Can someone please tell me what I am doing wrong ?
    home = (MyLocalHome) context.lookup("localejbs/MySessBean");

    Walter, thanks for the reply.  When I checked the EJB Container in VA after starting up the J2EE server, my EJB shows a blue check mark already with the START button grayed out (STOP button is active).  So I would think the EJB is started already...  HOWEVER, I noticed that when I hit the DEPLOY button there, I see a warning message popping up which says :  "This Application hasn't J2EE modules, so it cannot be loaded. Proceeding with Deploy".  I go ahead and finish the Deploy and then my EJB works.  It seems I am not including a module when I deploy it ?
    Paul

  • Simple rmi-ejb question

    Hi all!
    I'm a new to ejb, just started, for the beginning got an exception:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at SimpleEjbTest.main(SimpleEjbTest.java:19)when trying to
      private static Context getInitialContext(String url, String user, String password) throws
          NamingException {
        Hashtable h = new Hashtable();
    //    h.put(Context.INITIAL_CONTEXT_FACTORY,
    //          "WHAT IS HERE?????");
        h.put(Context.PROVIDER_URL, url);
        h.put(Context.SECURITY_PRINCIPAL, user);
        h.put(Context.SECURITY_CREDENTIALS, password);
        return new InitialContext(h);
      }What to put into INITIAL_CONTEXT_FACTORY?
    Or you know easier way to make an InitialContext?
    Using jndi.properties? But what should it be then??
    Please help!
    Thanks a lot to alL!!
    Best regards, Boris.

    well, since you don't specify your app server, how's this?
    weblogic.jndi.WLInitialContextFactory
    if that doesn't work, try this
    com.inprise.j2ee.jndi.CtxFactory
    if that doesn't work, try this
    com.evermind.server.rmi.RMIInitialContextFactory
    if that doesn't work, try this
    org.jnp.interfaces.NamingContextFactory
    if that doesn't work, try this
    com.ibm.websphere.naming.WsnInitialContextFactory
    And if that doesn't work, look through your docs again, or maybe try google. Note that whatever you do, you have to have the appropriate jars on your classpath.
    Good Luck
    Lee

Maybe you are looking for

  • Voice memos on iTunes

    Hello, I have an iphone 4 and I took a rather important voice memo of an interview, but its too long to send via email. In itunes I cant see it because I manage my music manually. How do I get the voice memo off my phone? If I turn sync on will I los

  • IPod doesn't appear in iTunes 7 or on my desktop

    After recieving my new MacBook Pro, and upgrading to iTunes 7.02, transferring all of my music and files from my PC to my new Mac, and then restoring the iPod (5th Gen, 60gb) and syncing it to the new iTunes (big mistake, had i known this earlier...)

  • BAPI to change Purchase requisition

    Hi I want to change pruchase requsition EBAN- AFNAM ( requested by feild in PR line item ) . Is there any BAP to do so . I beleive we annot do so by using BAPI_REQUISITION_CHANGE ?

  • 2nd browser window to open?

    Does anyone out there know of a lingo script to display a Shockwave movie, called from another Shockwave movie, in another browser window and have the player go to a specific frame or marker in that movie? I've tried "gotoNetPage", it opens a new bro

  • T430 screen. Which one is the right one ?

    Hi there,  My laptop is a lenovo T430 Type 2349-JV2 I need to replace the screen. I had a look on the website and found this list: http://download.lenovo.com/parts/ThinkPad/t430_t430i_fru_bom_20130410.pdf I saw that there is some 14HD+ screen 04W3329