JNDI confusion

Hello,
I am a little confused about JNDI and EJB. I am currently writing a
Session Bean that talks with another SessionBean (in this case
FooSessionBean will be talking to BarSessionBean. I got it to compile
and work fine when I was using the global JNDI namespace using the
deployment descriptors below:
----- ejb-jar.xml snippet -----
<session>
<ejb-name>FooSessionBean</ejb-name>
<local-home>com.foo.ejb.FooLocalHome</local-home>
<local>com.foo.ejb.FooLocal</local>
<ejb-class>com.foo.ejb.FooSessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<session>
<ejb-name>BarSessionBean</ejb-name>
<local-home>com.foo.ejb.BarLocalHome</local-home>
<local>com.foo.ejb.BarLocal</local>
<ejb-class>com.foo.ejb.BarSessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
----- weblogic-ejb-jar.xml snippet -----
<weblogic-enterprise-bean>
<ejb-name>FooSessionBean</ejb-name>
<local-jndi-name>FooLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>HttpForwardingServiceSessionBean</ejb-name>
<local-jndi-name>FooLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
The problem is that now I don't want to depend on the global JNDI
tree, I want to use local jndi trees using the "java:comp/env" prefix.
In addition I want to EJBs to be in the ejb namespace
(java:comp/env/ejb/BeanName) So I altered the ejb-jar.xml file as
follows:
----- ejb-jar.xml snippet -----
<session>
<ejb-name>BarSessionBean</ejb-name>
<local-home>com.foo.ejb.BarLocalHome</local-home>
<local>com.foo.ejb.BarLocal</local>
<ejb-class>com.foo.ejb.BarSessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<ejb-ref-name>BarSessionBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.foo.ejb.BarLocalHome</local-home>
<local>com.foo.ejb.BarLocal</local>
<ejb-link>BarSessionBean</ejb-link>
</ejb-local-ref>
</session>
<session>
<ejb-name>BarSessionBean</ejb-name>
<local-home>com.foo.ejb.BarLocalHome</local-home>
<local>com.foo.ejb.BarLocal</local>
<ejb-class>com.foo.ejb.BarSessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
I have tried many different combinations of tags in the
weblogic-ejb-jar.xml with no success. So I have 2 questions,
1.) What do I need to add/subtract from my weblogic-ejb-jar.xml file
in order to be able to use local jndi trees, and
2.) What do I need to do to map the references to the ejb
(java:comp/env/ejb/BeanName) namespace?
Any help would be much appreciated.
Glenn Kidd

Did you try something like this:
For ejb-jar.xml with:
<ejb-local-ref>
<ejb-ref-name>BarSessionBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.foo.ejb.BarLocalHome</local-home>
<local>com.foo.ejb.BarLocal</local>
<ejb-link>BarSessionBean</ejb-link>
</ejb-local-ref>
The weblogic-ejb-jar.xml should have:
<reference-descriptor>
<ejb-local-reference-description>
<ejb-ref-name>BarSessionBean</ejb-ref-name>
<jndi-name>foo.BarSessionBean</jndi-name>
</ejb-local-reference-description>
</reference-descriptor>
Anyway, it is documented at:
http://e-docs.bea.com/wls/docs61/ejb/reference.html#1160215
Bill
Glenn Kidd wrote:
Hello,
I am a little confused about JNDI and EJB. I am currently writing a
Session Bean that talks with another SessionBean (in this case
FooSessionBean will be talking to BarSessionBean. I got it to compile
and work fine when I was using the global JNDI namespace using the
deployment descriptors below:
----- ejb-jar.xml snippet -----
<session>
<ejb-name>FooSessionBean</ejb-name>
<local-home>com.foo.ejb.FooLocalHome</local-home>
<local>com.foo.ejb.FooLocal</local>
<ejb-class>com.foo.ejb.FooSessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<session>
<ejb-name>BarSessionBean</ejb-name>
<local-home>com.foo.ejb.BarLocalHome</local-home>
<local>com.foo.ejb.BarLocal</local>
<ejb-class>com.foo.ejb.BarSessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
----- weblogic-ejb-jar.xml snippet -----
<weblogic-enterprise-bean>
<ejb-name>FooSessionBean</ejb-name>
<local-jndi-name>FooLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>HttpForwardingServiceSessionBean</ejb-name>
<local-jndi-name>FooLocalHome</local-jndi-name>
</weblogic-enterprise-bean>
The problem is that now I don't want to depend on the global JNDI
tree, I want to use local jndi trees using the "java:comp/env" prefix.
In addition I want to EJBs to be in the ejb namespace
(java:comp/env/ejb/BeanName) So I altered the ejb-jar.xml file as
follows:
----- ejb-jar.xml snippet -----
<session>
<ejb-name>BarSessionBean</ejb-name>
<local-home>com.foo.ejb.BarLocalHome</local-home>
<local>com.foo.ejb.BarLocal</local>
<ejb-class>com.foo.ejb.BarSessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref>
<ejb-ref-name>BarSessionBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.foo.ejb.BarLocalHome</local-home>
<local>com.foo.ejb.BarLocal</local>
<ejb-link>BarSessionBean</ejb-link>
</ejb-local-ref>
</session>
<session>
<ejb-name>BarSessionBean</ejb-name>
<local-home>com.foo.ejb.BarLocalHome</local-home>
<local>com.foo.ejb.BarLocal</local>
<ejb-class>com.foo.ejb.BarSessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
I have tried many different combinations of tags in the
weblogic-ejb-jar.xml with no success. So I have 2 questions,
1.) What do I need to add/subtract from my weblogic-ejb-jar.xml file
in order to be able to use local jndi trees, and
2.) What do I need to do to map the references to the ejb
(java:comp/env/ejb/BeanName) namespace?
Any help would be much appreciated.
Glenn Kidd

Similar Messages

  • EJB3 ejb-ref/JNDI confusion

    Hi,
    I'm trying to learn EJB3 development on WebLogic 10, but am struggling because the version 10 documentation refers to EJB 2.1 and version 9.0 weblogic-ejb-jar.xml (which isn't supported by version 10).
    I'd like to have my EJB's hosted on one WLS, then servlets on a separate server. I'd like to define SLSB and Servlet EJB dependencies using annotations but am not keen about hard-coding global JNDI names.
    What is a good, portable approach? Can mapping from logical to physical JNDI names still be done in deployment descriptors?
    Thanks, Chris.

    you can directly use the hash table pass the propertyes to IntialContext Object .
    For Example
    java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
    java.naming.provider.url=iiop://localhost:3700/Deceval
    and give the username and password of you are server
    like :
    java.naming.security.principal=admin
    java.naming.security.credentials=12345678

  • JNDI Problem...Confusing...

    Hi All,
    I am confronted with a puzzling problem...
    Environment:
    Weblogic 7
    JBoss 3.0.4
    Solaris 2.8
    What I am trying to do:
    An MDB running in the Weblogic context (running on machine A)
    looks up a Session Bean deployed under JBoss (running on machine B).
    This reference (home reference) is stored in a HashMap for re-use,
    since JNDI lookups can be expensive. This Home Reference is used
    to create a remote reference.
    Now, the problem I am running into:
    The above mechanism works fine when I first start the WL Server,the
    JBoss server, and lookup the Session Bean (this is stored in the
    HashMap,
    for re-use) using JNDI (see below for code). So long as the JBoss
    App Server is up and running, everything works fine.
    When I bounce the JBoss App Server, and try to use the SessionBean
    Home reference (stored in the HashMap) to create a remote reference,
    I get a java.rmi.NoSuchObjectException -- which is understandable,
    since the JBoss App Server is bounced.
    After I catch the java.rmi.NoSuchObjectException in the MDB, I am
    trying to
    lookup the Session Bean deployed under Jboss (using the same
    piece of code that I used initially to perform the lookup) from
    the MDB running in Weblogic context, and all I get is a
    'null' object. NO EXCEPTIONS ARE THROWN EITHER. Until I bounce
    the Weblogic Server, I am not able to lookup the Session Bean
    deployed in JBoss App Server.
    What am I doing wrong? Can you please help?
    Code that I am using to perform the lookup:
    public InitialContext getJBContext() {
    Properties props = null;
    InitialContext initCtx = null;
    try {
    props = new Properties();
    props.put("java.naming.factory.initial",
    "org.jnp.interfaces.NamingContextFactory");
    props.put("java.naming.provider.url", "jnp://<host>:<port>");
    initCtx = new InitialContext(props);
    } catch (Exception ex) {
    e.printStackTrace();
    When I use the above obtained InitialContext, and do a
    lookup like "Object obj = getJBContext().lookup("invoiceBean");"
    the returned Object is 'null'. As I mentioned above, this
    happens after I bounce the JBoss App Server, and wouldn't
    go away until I bounce the Weblogic App Server as well.
    Thanks much,
    Srini

    Looks like for some reason your Entity Bean didn't deploy properly. Can you please post the deploment descriptors of your EJBs.
    Also, you can check on the Server's JNDI tree for your Entity Bean's entry.
    Cheers!
    Dips

  • EJB 3.0 @Stateless @EJB @Resource and JNDI clarity..

    Hi,
    I am trying to configure an EJB 3.0 but not able to do so properly.
    I have a single business interface and 2 bean implementation class of the same business interface doing different things. How do I access the EJB's if I have the same business interface class.I am getting JNDI error while trying to lookup.
    Also what does the "name" and "mappedName" in @Stateless(name ="...",mappedName="") signify.
    Then in case of Dependency injection,how should I look for the EJB? What would be it's JNDI name in this case?
    @EJB(name="",beanName="",mappedName="")
    private HelloEJB hello;
    What does the name,benaName and mappedName in case of an @EJB annotation signify??
    Please clear me with these attributes of @Stateless and @EJB and @Resource. I am getting toatlly confused with what should be the logic name and what is the JNDI name????
    Thanks

    In @Stateless, @name() is the annotation equivalent of <ejb-name> in ejb-jar.xml. It gives a unique bean name identifier to the component within the ejb-jar. It is completely independent of mappedName. If no @Stateless name() is specified, it defaults to the unqualified bean class name.
    In @Stateless, mappedName() is used to assign a global JNDI name to the bean's remote interface. This can be used to explicitly lookup the EJB reference to that interface or as one way to resolve a caller's EJB dependency.
    In @EJB, if the target of the dependency lives within the same application, you can always fully resolve it using only beanName(). beanName() takes the value specified in @Stateless name(), or the default as described above.
    @EJB name() assigns a name to the client dependency within the caller's component environment. It is optional. In most cases that value doesn't matter since if the dependency is being injected you never have to refer to the name() attribute anywhere else.
    @EJB mappedName() is used to resolve an EJB dependency that spans applications. It holds a global JNDI name, e.g. the one specified in @Stateless mappedName(). mappedName() is not required to be supported by all vendors.
    So, to sum it all up, it's fine to have two different beans that expose the same interface. E.g. :
    @Stateless(name="A1", mappedName="A1Global")
    public class A1 implements A { ... }
    @Stateless(mappedName="A2Global") // name() defaults to "A2"
    public class A2 implements A { ... }
    In a caller within the same application :
    @EJB(beanName="A1")
    private A a;
    @EJB(beanName="A2")
    private A a;
    In a caller within a different application :
    @EJB(mappedName="A1Global")
    private A a;
    @EJB(mappedName="A2Global")
    private A a;
    You can find additional information in our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#EJB_ejb-ref_ejb_local_ref

  • JNDI Lookup in JSP fails for EJB 3.0

    I am new to Java technology. I read the EJB FAQ, NetBeans docs and may forum discussions and I am still confused with the error I am having.
    Background:
    I have developed a persistance bean and related sessions beans (similar to the customer-cmp-ear application in the Java App Server samples). Now I am trying to access this bean using a JSP. After deploying the war file in the App Server and try to access the page, I get the following error.
    javax.naming.NameNotFoundException: No object bound to name java:comp/env/ConsumerSessionLocal
    After reading many articles, I understood that I dont have to prepare any descriptors, or JAR files for EJB 3.0.
    Environment Details:
    Java App Server Ver 9.0
    NetBeans 5.5
    I normally build the war files using NetBeans.
    I use App Server Admin console to deploy the web applications using the above war file.
    EJB details:
    Persistance EJB : person.java
    Session Objects
    Consumer.java (this implements ConsumerSessionLocal, ConsumerSessionRemote). This Stateless bean accesses the methods in person.java.
    ConsumerSessionLocal.java - local interface
    ConsumerSessionRemote.java - remote interface
    SearchConsumer.jsp
    This JSP page is calling the ConsumerSessionLocal using the JNDI lookup through InitialContext.
    Here is the Code snippet:
    try {
    InitialContext ic = new InitialContext();
    Object o = ic.lookup("java:comp/env/ConsumerSessionLocal");
    ConsumerSessionLocal consSession = (ConsumerSessionLocal) o;
    I am able to see the jsp page in the browser, however, after a submit action, I get the Java Naming Exception error.
    javax.naming.NameNotFoundException: No object bound for java:comp/env/ConsumerSessionLocal
    I would appreciate your help/any of your thoughts.
    Thanks in advance.
    -Ram

    I did not really solve it. Instead I used some of the tutorials that used JNDI lookup and modified those as my way forward. I did not really find out exactly what I was doing wrong.
    /Anders

  • AAE - Error -  Unable to retrieve MappingInterfaceLocalHome from JNDI while

    Hi Friends,
    We have an interface which runs in AAE.  (Advanced Adapter Engine, PI 7.1, EHP1)
    Sender is SOAP, Async Call.
    We have used the condition to determine receiver. One Receiver is SOAP (by remove proxy) and another one receiver is RFC.
    When we check the messages, in message monitoring, database overview, those are failed with error "
    Unable to retrieve MappingInterfaceLocalHome from JNDI while invoking the mapping"
    Detailed error is as below:
    Execution of mapping "http:/bigbiz.com/xi/MDM/IM_MATERIALUPDATE" failed. Reason: MappingException: Unable to retrieve MappingInterfaceLocalHome from JNDI while invoking the mapping, NamingException: Exception during lookup operation of object with name localejbs/MappingBean, cannot resolve object reference., javax.naming.NamingException: Error occurs while the EJB Object Factory trying to resolve JNDI reference Reference Class Name: Type: clientAppName Content: sap.com/com.sap.xi.services Type: interfaceType Content: local Type: ejb-link Content: MappingBean Type: jndi-name Content: MappingBean Type: local-home Content: com.sap.aii.ibrun.sbeans.mapping.MappingAccessLocalHome Type: local Content: com.sap.aii.ibrun.sbeans.mapping.MappingAccessLocal com.sap.engine.services.ejb3.runtime.impl.refmatcher.EJBResolvingException: Cannot start applicationsap.com/com.sap.xi.services; nested exception is: java.rmi.RemoteException: [ERROR CODE DPL.DS.6125] Error occurred while starting application locally and wait.; nested exception is: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5106] The application .....
    I confuse why suddenly this error comes, since it was working fine earlier. The message status is now 'To Be Delivered'.
    Can you kindly clarify friends how to fix this ?
    Kind regards,
    Jegathees P.

    Hi,
    PI 7.1 Ehp1 receiver determination can be done conditionally by selecting operation specific...
    I don't think this error is related to AAE ...looks like this error is related to server ...
    check other mappings also whether they are executed with out any error ?
    this is related to module lookup error...need to check with the basis
    HTH
    Rajesh

  • JNDI lookup fails in a thread created by J2EE application on WAS 8.0.0.4 running on Red Hat Enterprise Server 5.8(2.6.18-308.e15).

    I am using Jackrabbit Repository (jcr's implementation) as backend in my Web Appl.Whose data persists on Oracle Database. To make connection with Oracle database jackrabbit provide provision of JNDI Lookup to read the data source defined in WAS (using WAS 8.0.0.4 as App Server).
    I am able to perform JNDI Lookup everywhere in my application,But in a flow where i am creating a Thread using Java Concurrent Api and insidethread's call() method when I am trying for JNDI Look following exception occurs –
    [8/20/13 10:57:35:163 IST] 000000dd System Out     O ERROR 20-08 10:57:35,163 (DatabaseFileSystem.java:init:209)            failed to initialize file system
    javax.jcr.RepositoryException: JNDI name not found: java:comp/env/jdbc/ofsds
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getJndiDataSource(ConnectionFactory.java:295)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:233)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:166)
    at org.apache.jackrabbit.core.fs.db.DbFileSystem.getDataSource(DbFileSystem.java:226)
    at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:190)
    at org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1057)
    at org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:911)
    at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:285)
    at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
    at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:232)
    at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:280)
    at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:376)
    at com.mmpnc.icm.server.repository.RepositoryStartupService.newSession(RepositoryStartupService.java:408)
    at com.mmpnc.icm.server.repository.RepositoryStartupService.newSession(RepositoryStartupService.java:355)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.RepositoryStartupService_$$_javassist_1.newSession(RepositoryStartupService_$$_javassist_1.java)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingSessionManager.create(ICMHouseKeepingSessionManager.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingSessionManager_$$_javassist_8.create(ICMHouseKeepingSessionManager_$$_javassist_8.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
    at org.jboss.seam.Component.callComponentMethod(Component.java:2171)
    at org.jboss.seam.Component.callCreateMethod(Component.java:2094)
    at org.jboss.seam.Component.newInstance(Component.java:2054)
    at org.jboss.seam.Component.getInstance(Component.java:1948)
    at org.jboss.seam.Component.getInstance(Component.java:1910)
    at org.jboss.seam.Component.getInstance(Component.java:1904)
    at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2271)
    at org.jboss.seam.Component.getValueToInject(Component.java:2223)
    at org.jboss.seam.Component.injectAttributes(Component.java:1663)
    at org.jboss.seam.Component.inject(Component.java:1481)
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingRepository_$$_javassist_7.create(ICMHouseKeepingRepository_$$_javassist_7.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
    at org.jboss.seam.Component.callComponentMethod(Component.java:2171)
    at org.jboss.seam.Component.callCreateMethod(Component.java:2094)
    at org.jboss.seam.Component.newInstance(Component.java:2054)
    at org.jboss.seam.Component.getInstance(Component.java:1948)
    at org.jboss.seam.Component.getInstance(Component.java:1910)
    at org.jboss.seam.Component.getInstance(Component.java:1904)
    at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2271)
    at org.jboss.seam.Component.getValueToInject(Component.java:2223)
    at org.jboss.seam.Component.injectAttributes(Component.java:1663)
    at org.jboss.seam.Component.inject(Component.java:1481)
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
    at com.mmpnc.icm.server.repository.ICMHouseKeepingManager_$$_javassist_6.create(ICMHouseKeepingManager_$$_javassist_6.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
    at org.jboss.seam.Component.callComponentMethod(Component.java:2171)
    at org.jboss.seam.Component.callCreateMethod(Component.java:2094)
    at org.jboss.seam.Component.newInstance(Component.java:2054)
    at org.jboss.seam.Component.getInstance(Component.java:1948)
    at org.jboss.seam.Component.getInstance(Component.java:1910)
    at org.jboss.seam.Component.getInstance(Component.java:1904)
    at org.jboss.seam.Component.getInstance(Component.java:1899)
    at com.mmpnc.icm.server.concurrent.PerformCloseTask.call(PerformCloseTask.java:136)
    at com.mmpnc.icm.server.concurrent.PerformCloseTask.call(PerformCloseTask.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
    at java.util.concurrent.FutureTask.run(FutureTask.java:149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
    at java.lang.Thread.run(Thread.java:770)
    Caused by:
    javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component.  This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request.  Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE application.  Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on "java:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]
    at com.ibm.ws.naming.java.javaURLContextImpl.throwExceptionIfDefaultJavaNS(javaURLContextImpl.java:522)
    at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:552)
    at com.ibm.ws.naming.java.javaURLContextImpl.lookupExt(javaURLContextImpl.java:481)
    at com.ibm.ws.naming.java.javaURLContextRoot.lookupExt(javaURLContextRoot.java:485)
    at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:370)
    at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
    at javax.naming.InitialContext.lookup(InitialContext.java:436)
    at org.apache.jackrabbit.core.util.db.ConnectionFactory.getJndiDataSource(ConnectionFactory.java:280)
    ... 114 more
    Caused by:
    javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".
    at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1969)
    at com.ibm.ws.naming.ipbase.NameSpace.retrieveBinding(NameSpace.java:1376)
    at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1219)
    at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:1141)
    at com.ibm.ws.naming.urlbase.UrlContextImpl.lookupExt(UrlContextImpl.java:1436)
    at com.ibm.ws.naming.java.javaURLContextImpl.lookupExt(javaURLContextImpl.java:477)
    ... 119 more

    Okay "damorgan", you seem to have me confused with a newbie. All I'm posting is the info that I got from my Sys Admin on the fix to my problem I encountered when trying to install Oracle 11g (11.2.0.0) on Red Hat Linux Enterprise 5. Since we're mouting onto an NFS, these are the steps he took. I'm not trying to "hide" information or post as little as possible. What other info do you want? I don't know what you are referring to when you mention "Filer, make, model, software version"? Please elaborate. I was just trying to post to others that may have encountered this problem, and I get somewhat attacked by you. I don't assume anyone can read my mind (especially you).

  • OpenLDAP with jndi

    while connecting to LDAP i have confronted with some errors,
    can anyone suggest me what alterations my code needed
    import java.util.Hashtable;
    import java.util.Enumeration;
    import javax.naming.*;
    import javax.naming.directory.*;
    public class JNDIAdd{
         public static String INITCTX = "com.sun.jndi.ldap.LdapCtxFactory";
         public static String MY_HOST = "ldap://localhost:389";
         public static String MGR_DN = "cn=Manager,dc=my-domain,dc=com";     
         public static String MGR_PW = "secret";
         public static String MY_SEARCHBASE = "o=Guessant.com";
    public static void main(String args[]){
         try{
              Hashtable env = new Hashtable();
         //specify class for jndi provider
         env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
         env.put(Context.SECURITY_AUTHENTICATION, "simple");
         env.put(Context.SECURITY_PRINCIPAL,MGR_DN);
         env.put(Context.SECURITY_CREDENTIALS,MGR_PW);
         DirContext ctx = new InitialDirContext(env);
         Person p = new Person("adi", "adi", "jha", "ou=people", "[email protected]");
         ctx.bind("uid=shivani,ou=People,o=Guessant.com", p);
         } catch(Exception e){
                        e.printStackTrace();
                        System.exit(1);
    I am quite new to LDAP, even i am confused weather i am moving in right direction or not, can anybody suggest

    Does the Person class implement DirContext? No, on implementing DirContext i again got complie time error in both classes as
    i.e
    C:\ldap>javac JNDIAdd.java
    .\Person.java:6: Person is not abstract and does not override abstract method se
    arch(javax.naming.Name,java.lang.String,java.lang.Object[],javax.naming.director
    y.SearchControls) in javax.naming.directory.DirContext
    public class Person implements DirContext{
    ^
    1 error
    C:\ldap>javac Person.java
    Person.java:6: Person is not abstract and does not override abstract method sear
    ch(javax.naming.Name,java.lang.String,java.lang.Object[],javax.naming.directory.
    SearchControls) in javax.naming.directory.DirContext
    public class Person implements DirContext{
    ^
    1 error

  • JNDI lookup in Multitired clustered architecture

    Hi alll,
    We are in the design phase of a multi tired clustered application.
    This application has jsp/servelet cluster and business application cluster. We are confused abt the JNDI lookup logic need to use in servlet cluster.
    Can anyone help me to find out an optimal solution for jndi which gives the complete advantage of load balancing and esp. fail over
    of clustering
    Thanks in advance
    gokul

    Hi,
              First of all, I would like to clear the point that load balancing can be done within a cluster not among the cluster.
              So if you have more than one cluster the load balancing
              would be at each cluster level.
              For JNDI lookup you have to provide cluster address i.e combination of Managed Server Address e.g:
              t3://localhost:7001,localhost:8001,localhost:9001...etc
              Thanks,
              Qumar

  • Confusion about Kodo and JCA

    Hi,
    I'm a bit confused about Kodo's Connection Architecture strategy. It is my understanding that
    PMF's can be built to use the connection architecture. Along this line, one would configure the
    ConnectionFactory or ConnectionFactoryName, and possibly the ConnectionFactory2 and
    ConnectionFactory2Name properties in a PMF. The result of the PMF implementation supporting the
    connection architecture is nice integration with the application servers in terms of security,
    transaction, and connection management. One can lookup in JNDI a reference to a Kodo PMF that
    supports datastore transactions or to another one that supports optimistic transactions or to
    another one that supports NTR, and with proper settings of the transactional properties and suitable
    application code, one's sesson bean will work.
    But from what I can see of Kodo's JDOPersistenceManagerFactory class, it, itself, implements the
    ManagedConnectionFactory interface, meaning, I think, that this class is resource adaptor. And that
    the part that confuses me. Why would Kodo be a resource adaptor? I thought it used a resource
    adaptor, which I think is the same thing as a connection factory.
    Anyway, I'm puzzled, and I'm hoping that someone could straighten me out.
    David Ezzio

    David-
    The fact that Kodo can integrate into an application server as a
    Resource Adaptor, and section 3.2.2 of the specification that says that
    the PersistentManagerFactory should be able to utilize a Resource
    Adaptor to obtain connections to the data store are two separate issues.
    We implement Kodo itself as a Resource Adaptor in order to provide ease
    of integration into recent application servers. Your confusion is
    understandable, since we do not actually yet support the use of Resource
    Adaptors as the Connection Factories as per section 3.2.2.
    Does that make sense?
    David Ezzio <[email protected]> wrote:
    Hi,
    I'm a bit confused about Kodo's Connection Architecture strategy. It is my understanding that
    PMF's can be built to use the connection architecture. Along this line, one would configure the
    ConnectionFactory or ConnectionFactoryName, and possibly the ConnectionFactory2 and
    ConnectionFactory2Name properties in a PMF. The result of the PMF implementation supporting the
    connection architecture is nice integration with the application servers in terms of security,
    transaction, and connection management. One can lookup in JNDI a reference to a Kodo PMF that
    supports datastore transactions or to another one that supports optimistic transactions or to
    another one that supports NTR, and with proper settings of the transactional properties and suitable
    application code, one's sesson bean will work.
    But from what I can see of Kodo's JDOPersistenceManagerFactory class, it, itself, implements the
    ManagedConnectionFactory interface, meaning, I think, that this class is resource adaptor. And that
    the part that confuses me. Why would Kodo be a resource adaptor? I thought it used a resource
    adaptor, which I think is the same thing as a connection factory.
    Anyway, I'm puzzled, and I'm hoping that someone could straighten me out.
    David Ezzio--
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Kodo Java Data Objects Full featured JDO: eliminate the SQL from your code

  • OIM, OID and ADF - Confused!!!

    Hi All,
    I am starting to read about all this Identity Management stuff and I need some orientation about what to do and where to start since I have been loosing some time trying to understand the whole picture. I know Oracle Internet Directory is part of OIM but I am confused.
    We are building a Webcenter Portal application and its security is intended to be managed through an OID (Oracle Internet Directory) which is already settled up and running. Now, the real problem is how to manage users/groups (entries in general) using our Webcenter Portal Application.
    We are thinking at first some basics operation like if you are the admin you can create some user, assign roles and groups etc. All this without going to the OID Console. All this within our portal.
    I know there are more than one approach I could take. Right now I am thinking to create our customs java classes in order to connect to the LDAP using the provided API. So
    - Should I use a simple JNDI interfaces to do this?
    - In JDeveloper if I write "OIDUser" in a java class I get a suggestion about the package "oracle.security.idm"... So shall I use this instead simple JNDI? If this is the case, is there any tutorial I can follow in order to achieve this?
    - I was taking as example this http://code.google.com/p/ldapchai/ which is an API for LDAP using java jndi. However, this is not an oracle product and more than sure this kind of stuff have been already made by oracle. But exactly something like that I need. I am thinking to implement some interfaces with the following methods
    create user
    update user
    create group
    update group
    assignUserToGroup
    etc.
    Hope you guys can help me out here.
    Regards
    P.S I give points to the useful questions and correct ones as well.
    I just came out with this library ldapjclnt11.jar which is in OID_HOME. Shall I go for this since I am not using OIM. Just OID?
    Regards
    Edited by: Alejandro T. Lanz on Feb 13, 2013 8:15 AM

    Hey Alejandro,
    Management X Manager both are OIM concepts:
    Let's start from the very beginning: OIM is one product that you can control 'user and group resources' as Active Directory users , Database users and OID users and groups. So, OID is not part of OIM(Oracle Identity Manager_). Maybe you are talking about the first concept that comes with Oracle application server , OID, DAS and SSO. All these products were called OIM(Oracle Identity Management_).
    OIM is one WebApp deployed into AppServer with some client pieces(eg: Design Console, Remote Manager) , if needed.
    OID is one LDAP.
    Basically the standard control that you can do here is:
    Have these tasks:
    1)create user,update user,create group,update group,assignUserToGroup controled by OIM.
    2) THen OIM has an 'integration' with OID, using LDAPSYNC or having OID Connector: http://thiagoleoncio.blogspot.com/2013/01/oid-sync-vs-oim-connector-into-oim-11g.html
    3) WebCenter Portal is 'connected with LDAP(OID)'.
    Regarding this:
    We are thinking at first some basics operation like if you are the admin you can create some user, assign roles and groups etc. All this without going to the OID Console. All this within our portal.
    I know there are more than one approach I could take. Right now I am thinking to create our customs java classes in order to connect to the LDAP using the provided API.
    You can:
    1) Do a class that have all ldapqueries to do whatever you want.
    2) Do this integration above, then it will be much more easy to do this tasks and no develop part needed from user creation point of view.
    I hope this helps you a bit,
    Thiago Leoncio.

  • JNDI Connection refused error

    HI
    I am new to Java so please excuse my stupid questions and general lack of ignorance. I am trying to connect to an Oracle database using JNDI to retrieve a Datasource using a 'data-source.xml' file but I get a 'Connection refused' error I am at a total loss at what this can be, I just have a simple Java Class which gets an InitialContext then does a lookup from here but this is were it fails.
    Could anybody give me any idea as to where to look. Could it be a problem with the JNDI server itself?. I'm using JDeveloper 10.1.3 and am just trying to run it in the embedded server.
    Sorry for the general rambling nature of this post and please ask me to provide any extra information required.
    Any help would be much appreciated as I'm going nowhere with this at the moment and very frustrated as have searched everywhere with no results.
    Thanks
    Andy

    Hi
    Thanks for the reply. I have checked my data-sources.xml and this all seems fine. I can even connect to the DB using DriverManager rather than the JNDI method. One thing that confuses me is which data-sources.xml it is using as there appear to be many. In JDeveloper you can specify the data sources in 'embeeded oc4j preferences' plus create your own under meta-inf. Which is being used when run in embedded, maybe thats obvious the first one?
    thanks once again

  • JNDI tree replicated to an external global naming service

    Hi!
    Is it possible to have a JNDI tree replicated to an external
    global naming service? For instance, to merge two clusters
    of WLS 5.1 servers from two different network zones?
    Thanking you in advance,
    Guillaume Bedard

    Yes, you can use federation do achieve this but remember federation is
    just putting a refence that points to the original JNDI provider and
    doesn't really give you replication of the entire JNDI namespace.
    Guillaume Bedard wrote:
    Hi!
    Can you elaborate as to what makes it impossible?
    What if we "federate" the two clusters, which have their
    own autonomous naming systems, by binding a reference to
    these naming systems in another naming service?
    Thanks,
    Guillaume
    "Raja Mukherjee" <[email protected]> wrote:
    No
    ..raja
    "Guillaume Bedard" <[email protected]> wrote in message
    news:3cab4a00$[email protected]..
    More specifically, I would like be able to join two clusters
    (each having their own cluster-wide replicated naming tree)
    by replicating their bindings into a global naming tree,
    possibly hosted by a dedicated "jndi" server.
    Guillaume
    "Raja Mukherjee" <[email protected]> wrote:
    My immediate response would be 'No', but I am confused as to what
    are
    you
    trying to achieve?
    ..raja
    "Guillaume Bedard" <[email protected]> wrote in message
    news:3ca9cd9c$[email protected]..
    Hi!
    Is it possible to have a JNDI tree replicated to an external
    global naming service? For instance, to merge two clusters
    of WLS 5.1 servers from two different network zones?
    Thanking you in advance,
    Guillaume Bedard

  • Replicated jndi tree

    We are running multiple WL servers (vers. 2.5.1 non-clustered)
    registered to
    different ports and would like to have the component names of one server
    known to the other. Is there a way of doing this w/o having to
    hard-code
    that component A lives on machineX : port 999 or buying the clustering
    option?

    Yes, you can use federation do achieve this but remember federation is
    just putting a refence that points to the original JNDI provider and
    doesn't really give you replication of the entire JNDI namespace.
    Guillaume Bedard wrote:
    Hi!
    Can you elaborate as to what makes it impossible?
    What if we "federate" the two clusters, which have their
    own autonomous naming systems, by binding a reference to
    these naming systems in another naming service?
    Thanks,
    Guillaume
    "Raja Mukherjee" <[email protected]> wrote:
    No
    ..raja
    "Guillaume Bedard" <[email protected]> wrote in message
    news:3cab4a00$[email protected]..
    More specifically, I would like be able to join two clusters
    (each having their own cluster-wide replicated naming tree)
    by replicating their bindings into a global naming tree,
    possibly hosted by a dedicated "jndi" server.
    Guillaume
    "Raja Mukherjee" <[email protected]> wrote:
    My immediate response would be 'No', but I am confused as to what
    are
    you
    trying to achieve?
    ..raja
    "Guillaume Bedard" <[email protected]> wrote in message
    news:3ca9cd9c$[email protected]..
    Hi!
    Is it possible to have a JNDI tree replicated to an external
    global naming service? For instance, to merge two clusters
    of WLS 5.1 servers from two different network zones?
    Thanking you in advance,
    Guillaume Bedard

  • RMI-IIOP JNDI lookup returns com.sun.corba.se.internal.iiop.CDRInputStream

    I have two different RMI-IIOP java clients, one is working fine and the other is not. Both are using weblogic.jndi.WLInitialContextFactory from wlclient.jar in WLS 8.1sp5 and JDK 1.4.2_6.
    One java client is a straight-forward java main. JNDI lookup is returning EJBHome_Stub correctly loaded by sun.rmi.server.LoaderHandler$Loader
    The other java client is a complex java program with multiple threads and many jars. A thread does the same JNDI lookup as the simple java client, but the object returned is of type com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1 which has NULL classloader (bootstrap classloader).
    What condition triggered the WebLogic InitialContext to default to com.sun.corba.se.internal.iiop.CDRInputStream?

    Kevin Fung <> writes:
    This is usally symptomatic of an IOR without the corresponding stub
    being loaded, usually because the correct security manager is not
    set. However the client jar bypasses the security manager to try and
    avoid this problem, so I am confused as to why you are seeing this. Do
    you know which object it is accessing? Can you try putting IIOP stubs
    for it in the client?
    andy
    I have two different RMI-IIOP java clients, one is working fine and the other is not. Both are using weblogic.jndi.WLInitialContextFactory from wlclient.jar in WLS 8.1sp5 and JDK 1.4.2_6.
    One java client is a straight-forward java main. JNDI lookup is returning EJBHome_Stub correctly loaded by sun.rmi.server.LoaderHandler$Loader
    The other java client is a complex java program with multiple threads and many jars. A thread does the same JNDI lookup as the simple java client, but the object returned is of type com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1 which has NULL classloader (bootstrap classloader).
    What condition triggered the WebLogic InitialContext to default to com.sun.corba.se.internal.iiop.CDRInputStream?

Maybe you are looking for

  • Insert Month and Year

    Table ( In-focus) CREATE TABLE "LIBRARY"."INFOCUS_LOG" ("LOGDATETIME" DATE, "COUNTER" NUMBER(6,0) Procedure create or replace PROCEDURE IN_FOCUS_PAGE (ldt INFOCUS_LOG.logdatetime%TYPE, COT INFOCUS_LOG.counter%TYPE) IS BEGIN INSERT INTO INFOCUS_LOG VA

  • Slider not rendering font size of text on another page

    I am using a slider to control the font size of the text. On one page, I have the slider setup as follows: <Grid Grid.Row="3" Margin="10,4.5,0.667,0">     <Slider x:Uid="FontSlider" x:Name="FontSlider" Header="Select font size" HorizontalAlignment="L

  • Someone Help Print To Go

    Hi All, I just can't get connected - when I download PTG software right at end Printers box message 'Operation could not be completed' but then says PTG installed successfully. When I go to print a document PTG shows and  after selecting it I go to p

  • Slow booting mac mini..

    Hi. I have a mac mini (early 2009, 2ghz, 4gb ddr3 memory). For some reason it seems to boot slower than my girlfriends mac mini (late 2006, 1.6ghz 2gb ddr2memory). Both are running 10.6.7 fully updated, connecting to the same network with only a keyb

  • Reboot - lost data?

    Hi all, MPB Retina - OSX 10.8 I was attemping to use my laptop and my trackpad was not working (I had no idea my mouse was in the next room with a bag on top of it holding the button down). Having tried everything to fix the trackpad issue I figured