Lookup Multiple beans...

Hello,
I could deploy multiple beans(entity n session) included in one .ear file.
Here is the information about ear file and it contents:
File name of the .ear file is "Plan.ear"
In Plan.ear, there are 6 entity and 1 session beans included as .jar files. Each bean has got its own .class files, ejb-jar.xml and orion-ejb-jar.xml files and the same has been archived in the jar file.
The deploy name i have given for .ear file is "Plan". And i see the same in server.xml i.e., included in Application name.
My question is that, how can i do lookup for the individual beans?
I tried with the following :
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "admin");
env.put(Context.PROVIDER_URL, "ormi://localhost:23791/Plan");
Object home = ctx.lookup("UserInfo");
return (UserInfoHome)narrow(home, UserInfoHome.class);
Above "UserInfo" is the session deployment name. I get NameNotFoundException when i try to connect to server. Kindly advise me how i can look up for the bean when multiple ejb's are bound in one ear file?
Thanx and Regards,
Achyuth

Hi Jeff,
Here is the information of ejb-jar.xml and orion-ejb-jar.xml files.
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
<orion-ejb-jar>
<enterprise-beans>
<session-deployment name="UserInfoHome"/>
</enterprise-beans>
<assembly-descriptor>
<default-method-access>
<security-role-mapping impliesAll="true" name="&lt;default-ejb-caller-role>"/>
</default-method-access>
</assembly-descriptor>
</orion-ejb-jar>
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>UserInfoHome</ejb-name>
<home>UserInfoHome</home>
<remote>UserInfo</remote>
<ejb-class>UserInfoBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
<resource-ref>
<res-ref-name>jdbc/GPTPool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
</resource-ref>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>UserInfoHome</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Kindly advise wht information is missing in above files.
Thanx and Regards,
Achyuth

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.

  • Prob in IR :Internal error during bean lookup for bean RepObjectAccessBean

    Hi,
        I am facing the problem in IR .
    <b>Internal error during bean lookup for bean RepObjectAccessBean</b>
    is the Error window I am getting frequently, After getting this error, It is no allowing to open any of the IR Objects.
    Thanks in advance,
    Dhanabal T

    Hi Dhanabal,
    i got the same error. But it is clear.
    Please chek once ur configuration part. The error is in configuration part only.
    once check all the steps in ur configuration part.
    REgards,
    chandra.

  • Multiple beans getting created for a single jsf page

    Hi all,
    I am developing UI pages using JSF in 'IBM Websphere studio Application developer.'
    Suddenly I have started facing some weired problem.
    I have one jsp file 'Schedule_Process.jsp' and
    corresponding bean file 'Schedule_Process.java'.
    Everytime I run the jsp page a new bean file gets created with suffixes as 1,2,3...
    So i have 'Schedule_Process1.java', 'Schedule_Process2.java'.....for a single jsp file.
    The jsp file gets mapped to the newly created bean file. The mapping entry automatically comes in faces-config.xml file.
    Thus my bean code is divided into multiple beans.
    Sometimes this code run but sometimes it doesnot.
    To get everthing working i have to remove extra mapping entires from faces-config.xml. Also have to delete all new versions of bean files except the latest one. and then i have to rename the latest file(with number as suffix) to remove the suffix.
    This works sometimes but there no guarantee that it will work.
    I desparately want to know the reason behind this problem.
    Any help on this issue will be greatly appreciated.
    Thanks a lot in advance!!!

    Make sure in the faces-config.xml file you have
    your managed bean set a session.
    <managed-bean-scope>session</managed-bean-scope>
    and assure that you have the follwoing lines of code in the web.xml file
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    Hope this helps

  • How to lookup a bean from a standalone app.

    I've got the following question..
    I've created a stateless sessionbean and deployed it in the J2EE Server 1.3.1. (That one you get from Sun when you download the J2EE SDK) I've created a client for my bean, and when i execute it with the 'runclient -client my.ear -name myclientclass' command, it works just fine.
    But, i now want to run it as a standalone application, without the 'runclient' command. I am able to create an initialcontext (without any properties), but my bean can not be found in 'java:comp/env/ejb/bean' (the same name i use with the 'runclient' command, so the bean should be there). My guess is that i should add some initial context properties, but which ones? All the examples i can find are with ldap context factories. Can anyone give me any advice on how to connect to the J2EE server and lookup my bean?
    Thanks in advance.
    Nick

    Hi,
    You could write something as below
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
    env.put(Context.PROVIDER_URL, "jnp:localhost:1099");
    env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
    try {
    Context ctx = new InitialContext(env);
    Session_LocalHome session_lh = (Session_LocalHome) ctx.lookup("Session_Home");
    Session_ session_ = session_lh.create();
    OR
    Use a jndi.properties file which would have the same entries as above, please search over internet and find out what to include in it.
    One more thing to note is, in above example i said
    env.put(Context.PROVIDER_URL, "jnp:localhost:1099");
    meaning the lookup is on port 1099, this is not same for all the servers. Check your server documentation and find out " What is the port number on which your server listens ? "
    Regards
    Meka Toka

  • How to lookup a Bean?

    i have successfully deployed an EJB by using J2EE deploytool.
    my source code to lookup the Bean as following:
    Context ctx = new InitialContext(System.getProperties());
    java.lang.Object objref = ctx.lookup("skey");
    home = (SessionKeyHome)PortableRemoteObject.narrow(objref, com.ibm.sessionkey.SessionKeyHome.class);
    i have read serval books and articles,there are different codes for lookuping a bean.Why?and when should we use this or that?
    But i get the error msg:
    Warning: unable to read transaction.interoperability config property
    java.io.FileNotFoundException: /export/home/ass/config/security.properties
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:103)
    at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
    at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<clinit>(SecurityMechanismSelector.java:102)
    at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:211)
    at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:73)
    at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:68)
    at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:70)
    at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(InitialNamingClient.java:769)
    at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostInfo(InitialNamingClient.java:597)
    at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveCorbaloc(InitialNamingClient.java:573)
    at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBInitRef(InitialNamingClient.java:544)
    at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1080)
    at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:981)
    at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:2425)
    at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:52)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
    at javax.naming.InitialContext.lookup(InitialContext.java:347).java:23)
    javax.naming.CommunicationException: Can't find SerialContextProvider
    at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:63)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)

    Hi,
    There r two ways to lookup. One is that u specify the provider while running the client. E.g:
    java -D java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
    -Djava.naming.provider.url=t3://localhost:7001
    or alternatively u can specify these two properties in the Properties object of your client. e.g:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    props.put(Context.PROVIDER_URL,"t3://localhost:7001");
    Context ctx = null;
    Object obj = null;
    try
    ctx = new InitialContext(props);               
    obj = ctx.lookup("HelloJNDI");
    Which method to use is matter of convenience.
    Values of provider url & initialContext will change depending on the app server u r using.
    I hope this will help u.

  • Cannot lookup the bean in JBoss

    I had a entity bean called AddressBean and bind the JNDI name as ejb/entity/AddressBean, but I cannot lookup this bean. The NameNotFoundException is thrown, the exception message is "ejb not bound". Did anyone know what happen with it?
    Hashtable props = new Hashtable();
    props.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
    props.put(InitialContext.PROVIDER_URL, "jnp://127.0.0.1:1099");
    InitialContext initialContext = new InitialContext(props);
    Object obj = initialContext.lookup("ejb/entity/AddressBean");But I can lookup this bean by using the default JNDI name "AddressBean".

    I've been trying to make a lookup from a remote client.
    I've tried this code
    props.put(InitialContext.PROVIDER_URL, "jnp://10.10.10.10:1099");
    I get the error unknown protocol
    Ofcourse 10.10.10.10 was not the acutal ip address of the machine on which JBoss was running. While running the code i did have the correct ip address.
    Then I tired the approach discussed here
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=63&t=000150
    Now i get a "no protocol" error.
    I have included the jboss-client.jar and the jnp-client.jar in the classpath of the client.
    Can someone help me out with this?

  • How to lookup EJB3 beans using JNDI names without defining ejb-ref in DD?

    Hi Kenneth,
    I am just continuing the topic:
    How Lookup SLSB from other SLSB? <HELP>
    http://forum.java.sun.com/thread.jspa?threadID=5117484&tstart=0
    (my original forums account failed, so I am using new one)
    if I am not seeking portability I should be able to lookup a bean directly through JNDI without using the ejb-ref. (I just want to see how it can be done)
    http://forum.java.sun.com/thread.jspa?forumID=13&threadID=751907
    http://www.theserverside.com/discussions/thread.tss?thread_id=16402
    I am using SJSAS PE 9.0 I am failing to lookup my beans from other beans directly without ejb-ref.
    Is there some sample code to look at?
    Thanks!

    Global JNDI names are vendor-specific and not known until deployment time. That is one
    of the main reasons the Java EE component environment model defines a level of
    indirection for accessing component dependencies. It is best to use either an ejb-ref
    or @EJB annotation when accessing EJBs from a Java EE component.
    If you choose not to, you just have to make sure the global JNDI name you use matches
    the one assigned to the target EJB. We have a lot of information on how this works
    in our EJB FAQ.
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
    If you're still encountering an error, please provide more specifics about your application,
    the code you're using for the lookup, and the error message you're receiving. Just
    saying "my looking fails" doesn't help us diagnose the problem :-)
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Lookup (2 Beans on diffrent applications)

    Hi
    Programs: J-Developer902, Oracle9i AS
    The Proplem : I have 2 beans on 2 different .ear applications, one bean on each .ear .
    I'm trying to do Lookup from Bean 1 on the first application, to Bean 2
    on the second application, without any success!!! What am I doing wrong?
    The intialcontext I'm using is com.evermind.server.rmi.RMIInitialContextFactory
    wich is the one to use when having 2 different applications (.EAR), which is my case.
    Deployment : Bean 1 : myFirst.deploy, myFirst.jar, myFirst.ear
    Bean 2 : mySecond.deploy, mySecond.jar, mySecond.ear
    Here is how my Lookup looks like in my code.
    _________ Clinet doing Lookup on Bean 1 ___________(It works without any problem)
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "admin");
    env.put(Context.PROVIDER_URL, "ormi://IS002/myFirst");
    Context ctx = new InitialContext(env);
    MyFirstEJBHome myFirstEJBHome = (MyFirstEJBHome)ctx.lookup("MyFirstEJB");
    MyFirstEJB myFirstEJB;
    __________ Bean 1 doning Lookup on Bean 2 _______________
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "admin");
    env.put(Context.PROVIDER_URL, "ormi://IS002/mySecond");
    Context ctx = new InitialContext(env);
    Object boundObject = ctx.lookup("MySecondEJB");
    MySecondEJBHome mySecondEJBHome =
    (MySecondEJBHome) PortableRemoteObject.narrow( boundObject, MySecondEJBHome.class);
    ________ ERROR _________
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at mypackage1.MyFirstEJBBean.callSecond(MyFirstEJBBean.java:47)
    at MyFirstEJB_StatelessSessionBeanWrapper10.callSecond
    (MyFirstEJB_StatelessSessionBeanWrapper10.java:79)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:118)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    What am I doing wrong??? Why can't my first Bean find the second Bean ?
    I'll be thankful if somebody could help me!!
    /Azam Roomi
    Integration Strategies & Solutions

    Azam,
    You are hitting a classloader problem. I suggest you upgrade to
    the latest JDeveloper version (9.0.3 -- available for download
    from Oracle's "Technet" website). Then read the following:
    http://otn.oracle.com/products/ias/tech_tips/oc4jTech_tip_0218.html
    http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/generic.903/a97677/advanced.htm#1004903
    http://kb.atlassian.com/content/atlassian/howto/classloaders.jsp
    http://kb.atlassian.com/content/orion/docs/remote-access/remote-access.html
    http://www2.theserverside.com/resources/article.jsp?l=AdvancedClassLoading
    http://www2.theserverside.com/resources/article.jsp?l=ClassLoading
    (Of-course, I'm assuming you haven't already read the above.)
    Hope this helps you.
    Good Luck,
    Avi.

  • LOOKUP OF beans between two jar files

    How to lookup beans between two jar file
    I have two jar files named as ejb1.jar , ejb2.jar .
    both the <ejb-name> are same..
    InitialContext ctx = new InitialContext();
    Object te = ctx.lookup("test");
    if i want to lookup for 2nd jar (ejb2.jar)which has the same <ejb-name> how to do..
    helpp !!!!!!!
    prakash

    Hi,
    No it would not be possible to differentiate the data just by using the dump files. You need to import these dump files in the database and then you can compare it for any difference.
    Regards
    Anurag

  • JNDI lookup, uncheked bean and LoginModule

    Hi people!
    I have stateless session bean with uncheked method permissions.My application use custom login module. When I try to lookup it home interface the container invoke my login module. Why it do so? This is incorrect behaviour, I think. Why container authenticate any jndi-lookup? How can I to get out this behaviour?
    Thanks.

    There are two steps since your ejb client is not a managed bean.
    1) Define an ejb-local-ref in web.xml or a class-level @EJB in some managed class within
    the same .war.
    2) Lookup the dependency by ejb-ref-name or @EJB(name) relative to java:comp/env
    Our EJB FAQ has more detail :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#POJOLocalEJB

  • Very strange issue when using initial context to lookup for beans...

    hi, friends,
    I am currently try to call a bean from a remote ejbclient.
    I set the initialcontext like this with the url suppose to be:
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, url);
    ctx = new InitialContext(p);
    and look up home like this with the Name suppose to be:
    Object h = null;
    h = ctx.lookup(Name);
    but the strange thing is, the programme just stops when it is doing ctx.lookup(Name); However I try to log it, but it is just stopping there, without throwing any exceptions and errors.
    But, when I gave it a wrong name to like at, it could go through ctx.lookup(Name), and throw some exceptions like "unnable to look up beans.." which I put in the catch part...
    I try to echo the "ctx", and it is not null. and I try to echo "h", but it just stop before the "h" getting anything...
    the ejbclient is compile with jdk 1.4, because it is on a server with jdk 1.4, and deployed on weblogic 8.1. and the bean.java is compiled with jdk 1.5, and deployed on weblogic 10.
    Does anyone knows what is really going on here, when doing the lookup, what happened?
    How could I know whether there are the ejbs I need to call are existing in the pool?
    Thanks..
    Looking forward helps. such an problem has bothered me for a couple of days, and my boss is pushing me on this. but I haven't get any idea on it...:(

    And now the stranger things here... I didn't do much change to both the remote bean side and the client side, what I did is most like change it to something, and tried with failure, and change back.
    But today 's morning, when I just change everything back to suppose to be, and it can find the homebean:
    [2008-11-14 11:21:18,436] [ INFO] [Thread-85] - {} getRemoteBean(Unknown Source) Looking up RepairEJB with JNDIName: RepairGatewayEJB_slsb
    [2008-11-14 11:21:18,531] [ INFO] [Thread-85] - {} getRemoteBean(Unknown Source) h is not null!!
    [2008-11-14 11:21:18,532] [ INFO] [Thread-85] - {} getRemoteBean(Unknown Source) got h: weblogic.rmi.internal.BasicRemoteRef@121 - hostID: '-891706141070674357S:113.128.134.59:[40010,40010,-1,-1,-1,-1,-1]:VPFSCTech:AdminServer', oid: '289'
    [2008-11-14 11:21:18,533] [ INFO] [Thread-85] - {} getRemoteBean(Unknown Source) After ctx.lookup();
    [2008-11-14 11:21:18,535] [ INFO] [Thread-85] - {} getRemoteBean(Unknown Source) homeBean is weblogic.rmi.internal.BasicRemoteRef@121 - hostID: '-891706141070674357S:113.128.134.59:[40010,40010,-1,-1,-1,-1,-1]:VPFSCTech:AdminServer', oid: '289'
    [2008-11-14 11:21:18,537] [ INFO] [Thread-85] - {} getRemoteBean(Unknown Source) After home bean;
    [2008-11-14 11:21:18,589] [ INFO] [Thread-85] - Waiting for a request ...
    but unfortunately again it just stopped at
    remoteBean = homeBean.create();
    with no errors and exceptions...
    Does any experienced friends ever have this problem before?

  • Unable to lookup referenced beans

    I've got a problem looking up referenced beans! I'm having three beans; TaxonomyManager, TaxonomyDependencyManager and TaxonomyEntity and the situation is as follows: the TaxonomyManager uses the TaxonomyDependencyManager (both stateless sessionbeans), the latter uses the TaxonomyEntity (entitybean). They all look eachother up using the java:comp/env namespace where they have been bound (in the deployment descriptors)
    Situation 1: My client (RMIInitialContextFactory) looks up the TaxonomyManager does a call. The TaxonomyManager tries to look up the TaxonomyDependencyManagerHome and succeed. It tries to CREATE a TaxonomyDependencyManager and FAILS in the create method. See exception below
    Situation 2: My client looks up the TaxonomyDependencyManager DIRECTLY and DOES NOT fail. So in this case (same situation) it works!
    Situation 3: My client looks up the TaxonomyManager, does a call. No the TaxonomyManager does not lookup the TaxonomyDependencyManager using the java:comp/env namespace but it looks it up DIRECTLy (using JNDI name: smarthaven/taxonomy/TaxonomyDependencyManager). That works as well.
    So the thing that goes wrong is: a bean that is bound in the ENV (java:comp/env namespace) that tries to look up another bean, that, in it's create method looks up another bean (all bound in the java:comp/env namespace)! All the other situations succceed...
    Again there's NO problem or whatsoever with the deployment. Directly looking up the beans works!!!
    The exception:
    com.evermind.server.rmi.OrionRemoteException: Error in ejbCreate(): null
    at com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:192)
    at TaxonomyDependencyManager_StatelessSessionBeanWrapper79.getTaxonomyLocks(TaxonomyDependencyManager_StatelessSessionBeanWrapper79.java:267)
    at com.smarthaven.component.taxonomy.TaxonomyManagerBean.checkLock(TaxonomyManagerBean.java:518)
    at com.smarthaven.component.taxonomy.TaxonomyManagerBean.saveTaxonomy(TaxonomyManagerBean.java:365)
    at TaxonomyManager_StatelessSessionBeanWrapper75.saveTaxonomy(TaxonomyManager_StatelessSessionBeanWrapper75.java:1305)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    Nested exception is:
    java.lang.NullPointerException
    at com.evermind.server.ejb.DelayedHomeBinding.getInstance(DelayedHomeBinding.java:44)
    at com.evermind.naming.MapContext.lookup(MapContext.java:53)
    at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:122)
    at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:64)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at com.smarthaven.component.taxonomy.TaxonomyDependencyManagerBean.ejbCreate(TaxonomyDependencyManagerBean.java:83)
    at TaxonomyDependencyManagerHome_StatelessSessionHomeWrapper80.callCreate(TaxonomyDependencyManagerHome_StatelessSessionHomeWrapper80.java:123)
    at com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:179)
    at TaxonomyDependencyManager_StatelessSessionBeanWrapper79.getTaxonomyLocks(TaxonomyDependencyManager_StatelessSessionBeanWrapper79.java:267)
    at com.smarthaven.component.taxonomy.TaxonomyManagerBean.checkLock(TaxonomyManagerBean.java:518)
    at com.smarthaven.component.taxonomy.TaxonomyManagerBean.saveTaxonomy(TaxonomyManagerBean.java:365)
    at TaxonomyManager_StatelessSessionBeanWrapper75.saveTaxonomy(TaxonomyManager_StatelessSessionBeanWrapper75.java:1305)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)

    I found a thread that suggested creating a "Java Service Facade" from persistence.xml. The thread said that the original persistence.xml was created incorrectly, but the entries created with the facade worked.

  • How do you lookup multiple values in different columns based on variable criteria?

    Essentially, I'd like to be able to do a Vlookup but instead of searching for one value only, search for multiple values in separate columns. A smaller version of my current spreadsheet as an example...
    Attack Type ->
    Fire
    Water
    Grass
    Fire
    1/2x
    2x
    1/2x
    Water
    1/2x
    1/2x
    2x
    Grass
    2x
    1/2x
    1/2x
    Fire/Water
    1/4x
    1x
    1x
    Fire/Grass
    1x
    1x
    1/4x
    Grass/Water
    1x
    1/4x
    1x
    The headers are the attack types and the list of types to the left are the receiving Pokemon. Fire does half damage (1/2x) to fire types, Water does double damage (2x) to fire types, etc. I'd like to be able to search for specific damages for each type. For example, I'd like to find a Typing that recieves half (1/2x) damage from Fire-type attacks but also recieves double (2x) from Grass-type attacks. I do want more than just two search criteria though seeing as the actual table is much, much larger.
    I've tried assigning number values to each damage multiplier and then merging all of them together for a specific typing and doing a VLOOKUP based on checkboxes determining what damage multiplier I want in a few specific types, the rest being filled in to the standard of 1x but the result isn't correct most of the time.

    Hi Mitchell,
    VLOOKUP can be set for accept either an 'exact match' or a 'close match'.  Your 17 digit 'number' is actually a 17 character text string (Numbers can handle numbers to a precision of only 15 places). Provided all 17 digits are present, sorting should be the same as for numerical values—the leftmost character is the most significant.
    As a text string, your 'number' is sorted/evaluated alphabetically. A 'close match' accepts the 'largest value that is less than or equal to the search value'.
    If your search term is 000200000 (a 9 character string), several 'wrong' answers will fit the 'close match' criteria, including all of those listed below:
    000200000 (the 'correct' match)
    0000xxxxx (x may be any of the three acceptable values)
    0001xxxxx (x may be any of the three acceptable values)
    The main problem here is that digits in a number (or characters in a text string) have decreasing significance related to their distance from the beginning of the string/number. You want a search in which each character has the same significance as each of the others when compared to the search key. To do that, you need to compare each character in the search string with the character in the same position in the similar string for each type of Pokemon, then take a count of the matches or a sum of the differences.
    Here's one approach:
    Column A contains labels.
    Column B, the 17 digit search term, created in whatever manner you wish, and the similar 17 digit string for each of the characters.
    Columns C through S contains a formula that detines, using subtraction, the difference between each digit of the search term and the corresponding digit of each character's profile.
    Column C uses SUM() to calculate the total of columns C to S for each row.
    T1 uses =MIN(T) to calculate "least different" profile.
    Column A is a Header column; Row 1 is a Header row.
    Formulas:
    C2, and filled right to S2, then down to the last row of data:
    =ABS(MID($B$1,COLUMN()-2,1)-MID($B2,COLUMN()-2,1))
    T1: =MIN(T)
    T2, and filled down column T: =SUM(C2:S2)
    The conditional formatting rule set for all body cells in column T is shown below the table.
    This may be enough to get you started. Formulas can be tweaked to produce results more closely matching what you're looking for, if necessary.
    Regards,
    Barry

  • 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

Maybe you are looking for