JNDI lookup fails ...IMMEDIATE HELP REQUIRED !!!

Hi
I am new to using the WLS,currenty I am using Weblogic6.1(sp).I developed a statelessSession
Bean and have successfully deployed it to the server.Counterfit I wrote a Client
class to check weather my beans are working properly.My client class to be in
breif inserts some values into the database.
When I am trying to execute my client code it gives me out the following error
- with nested exception:
[javax.naming.NameNotFoundException: Unable to resolve SQLConnectionPool. Resolved:
'' Unresolved:'SQLConn
ectionPool' ; remaining name '']
at com.wellmanage.Bean.MessageLoggerBean.getConnection(MessageLoggerBean.java:186)
at com.wellmanage.Bean.MessageLoggerBean.logMessage(MessageLoggerBean.java:77)
at com.wellmanage.Bean.MessageLoggerBean_3p5ifg_EOImpl.logMessage(MessageLoggerBean_3p5ifg_EOImpl.
java:79)
at com.wellmanage.Bean.MessageLoggerBean_3p5ifg_EOImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
End server side stack trace
SQLConnectionPool is the JNDI name i mentioned in the weblogic console.In the
same fashion I also mentioned the jndilookup in my bean class with the same name
(SQLConnectionPool)as follows
public Connection getConnection() throws SQLException
try
InitialContext jndiCntx = new InitialContext();
// DataSource ds = (DataSource)jndiCntx.lookup("java:comp/env/jdbc/SQLConnectionPool");
DataSource ds = (DataSource)jndiCntx.lookup("SQLConnectionPool");
return ds.getConnection();
catch(NamingException ne)
throw new EJBException(ne);
SO FINALLY IT GIVES ME OUT THE ABOVE FIRST MENTIONED ERROR.i ALSO TRIED USING
THE jnidlookup mentioned in the comments ie.."DataSource ds = (DataSource)jndiCntx.lookup("java:comp/env/jdbc/SQLConnectionPool");
" then also it throws an error.
CAN ANYBODY HELP ME IT A MATTER OF URGENCY...
Thanks
Srini

can u post ur config.xml
Srini wrote:
Hi
I am new to using the WLS,currenty I am using Weblogic6.1(sp).I developed a statelessSession
Bean and have successfully deployed it to the server.Counterfit I wrote a Client
class to check weather my beans are working properly.My client class to be in
breif inserts some values into the database.
When I am trying to execute my client code it gives me out the following error
- with nested exception:
[javax.naming.NameNotFoundException: Unable to resolve SQLConnectionPool. Resolved:
'' Unresolved:'SQLConn
ectionPool' ; remaining name '']
at com.wellmanage.Bean.MessageLoggerBean.getConnection(MessageLoggerBean.java:186)
at com.wellmanage.Bean.MessageLoggerBean.logMessage(MessageLoggerBean.java:77)
at com.wellmanage.Bean.MessageLoggerBean_3p5ifg_EOImpl.logMessage(MessageLoggerBean_3p5ifg_EOImpl.
java:79)
at com.wellmanage.Bean.MessageLoggerBean_3p5ifg_EOImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:265)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
End server side stack trace
SQLConnectionPool is the JNDI name i mentioned in the weblogic console.In the
same fashion I also mentioned the jndilookup in my bean class with the same name
(SQLConnectionPool)as follows
public Connection getConnection() throws SQLException
try
InitialContext jndiCntx = new InitialContext();
// DataSource ds = (DataSource)jndiCntx.lookup("java:comp/env/jdbc/SQLConnectionPool");
DataSource ds = (DataSource)jndiCntx.lookup("SQLConnectionPool");
return ds.getConnection();
catch(NamingException ne)
throw new EJBException(ne);
SO FINALLY IT GIVES ME OUT THE ABOVE FIRST MENTIONED ERROR.i ALSO TRIED USING
THE jnidlookup mentioned in the comments ie.."DataSource ds = (DataSource)jndiCntx.lookup("java:comp/env/jdbc/SQLConnectionPool");
" then also it throws an error.
CAN ANYBODY HELP ME IT A MATTER OF URGENCY...
Thanks
Srini

Similar Messages

  • JNDI lookup fails for client applications

    I am currently porting our j2ee application to weblogic 7.0. The application already
    runs successfully on Orion and Jboss. I have got everything working now except
    for our client applications, which all fail with a JNDI lookup error. The exception
    is:
    javax.naming.NameNotFoundException: Unable to resolve 'java:comp.env/ejb/QualiferInstance'
    Resolved: '' Unresolved:'java:comp' ; remaining name 'java:comp.env
    /ejb/QualifierInstance'
    at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutbound
    equest.java:109)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemote
    ef.java:262)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemote
    ef.java:229)
    at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown Source
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at BatchIndexer.main(BatchIndexer.java:89)
    I have looked up numerous postings on various mailing lists describing similar
    problems, but none of them give an explanation which helps me.
    I am convinced that I have the ejb deployment descriptors correct because all
    our JSPs, servlets and session beans successfully lookup and use the EJBs.
    I am also convinced that I have the correct code for the JNDI lookup in our client
    applications, because they work perfectly well on Orion and Jboss and use syntax
    which is described as correct in the jsee specification, i.e. "java:comp/env/..."
    Here is the descriptor from weblogic-ejb-jar.xml for the EJB mentioned in the
    example exception above:
    <weblogic-enterprise-bean>
    <ejb-name>QualifierInstance</ejb-name>
    <jndi-name>comp/env/ejb/QualifierInstance</jndi-name>
    </weblogic-enterprise-bean>
    And here is the descriptor in the application-client.xml file:
         <ejb-ref>
              <ejb-ref-name>ejb/QualifierInstance</ejb-ref-name>
              <ejb-ref-type>Entity</ejb-ref-type>           <home>com.espritsoutron.xengine.ejb.metamodel.QualifierInstanceHome</home>
              <remote>com.espritsoutron.xengine.ejb.metamodel.QualifierInstance</remote>
              <ejb-link>QualifierInstance</ejb-link>
         </ejb-ref>
    And here is the code in the client application that attempts to perform the lookup:
    qiHome = (QualifierInstanceHome)PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/QualifierInstance"),
    QualifierInstanceHome.class);
    The annoying thing is that I know I can make this work if I change the code to
    omit the "java:" prefix, but I don't want to do this because then it would no
    longer work on either Orion and Jboss.
    P.S. I have also tried changing the jndi-name in the weblogic-ejb-jar descriptor
    to "ejb/QualifierInstance" and just "QualifierInstance", but neither of these
    make any difference. I even tried chaning it to "java:comp/env/ejb/QualifierInstance"
    but that totally breaks the server.
    Can anyone can please help with this?

    you can find the JNDI name in the JNDI tree from the admin console
    right click on your server and choose "view jndi tree".
    if you bind your ejb to ejb/QualifierInstance
    you look it up with that exact same name ejb/QualifierInstance
    Julian Fawcett wrote:
    I am currently porting our j2ee application to weblogic 7.0. The application already
    runs successfully on Orion and Jboss. I have got everything working now except
    for our client applications, which all fail with a JNDI lookup error. The exception
    is:
    javax.naming.NameNotFoundException: Unable to resolve 'java:comp.env/ejb/QualiferInstance'
    Resolved: '' Unresolved:'java:comp' ; remaining name 'java:comp.env
    /ejb/QualifierInstance'
    at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutbound
    equest.java:109)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemote
    ef.java:262)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemote
    ef.java:229)
    at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown Source
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at BatchIndexer.main(BatchIndexer.java:89)
    I have looked up numerous postings on various mailing lists describing similar
    problems, but none of them give an explanation which helps me.
    I am convinced that I have the ejb deployment descriptors correct because all
    our JSPs, servlets and session beans successfully lookup and use the EJBs.
    I am also convinced that I have the correct code for the JNDI lookup in our client
    applications, because they work perfectly well on Orion and Jboss and use syntax
    which is described as correct in the jsee specification, i.e. "java:comp/env/..."
    Here is the descriptor from weblogic-ejb-jar.xml for the EJB mentioned in the
    example exception above:
    <weblogic-enterprise-bean>
    <ejb-name>QualifierInstance</ejb-name>
    <jndi-name>comp/env/ejb/QualifierInstance</jndi-name>
    </weblogic-enterprise-bean>
    And here is the descriptor in the application-client.xml file:
         <ejb-ref>
              <ejb-ref-name>ejb/QualifierInstance</ejb-ref-name>
              <ejb-ref-type>Entity</ejb-ref-type>           <home>com.espritsoutron.xengine.ejb.metamodel.QualifierInstanceHome</home>
              <remote>com.espritsoutron.xengine.ejb.metamodel.QualifierInstance</remote>
              <ejb-link>QualifierInstance</ejb-link>
         </ejb-ref>
    And here is the code in the client application that attempts to perform the lookup:
    qiHome = (QualifierInstanceHome)PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/QualifierInstance"),
    QualifierInstanceHome.class);
    The annoying thing is that I know I can make this work if I change the code to
    omit the "java:" prefix, but I don't want to do this because then it would no
    longer work on either Orion and Jboss.
    P.S. I have also tried changing the jndi-name in the weblogic-ejb-jar descriptor
    to "ejb/QualifierInstance" and just "QualifierInstance", but neither of these
    make any difference. I even tried chaning it to "java:comp/env/ejb/QualifierInstance"
    but that totally breaks the server.
    Can anyone can please help with this?

  • 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).

  • WLS/OSB DB Adapter - JNDI lookup failed

    Hello all.
    I've got a DB adapter service set up in a clustered environment, and it all works (and I've built proxy services, transformations etc around it), but I've just noticed that the log shows a warning regarding the JNDI lookup of the ConnectionFactory, as below.
    It's working, and the error is only a warning, but could this cause problems going forward, particularly with regards performance?
    Given that the ConnectionFactory name is 'com.whatever.myServiceDB', and the Endpoint URI of the service is 'jca://com.whatever.myServiceDB', what could be wrong? Has anyone seen/fixed this before? It's almost like the managed servers don't know about the JNDI name...but the DbAdapter deployent has 'All servers in the cluster' selected in its 'Targets' tab, so I'm not sure.
    Any pointers would be appreciated, I'm probably missing something obvious.
    Cheers.
    ####<Apr 15, 2010 10:53:10 AM BST> <Warning> <JCA_FRAMEWORK_AND_ADAPTER> <servername> <managed3_domainname> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1271325190453> <BEA-000000> <servicebus:/WSDL/MyProject/MyService [ MyService_ptt::merge(MessagesCollection) ] - JNDI lookup of 'com.whatever.myServiceDB' failed due to: String index out of range: -1>

    Thanks again.
    In case anyone runs into a similar problem and is wondering: a bit of mucking about reveals that the WLS ConnectionFactory config is fine with dots or slashes, and it seems to treat both the same when creating the JNDI tree.
    However, the WSDL (that you probably created in JDeveloper) has to have slashes for doing its lookup. So, for example, always use slashes rather than dots when setting your DB Adapter JNDI name in JDeveloper. I guess this is a bit different from usual class/package naming standards, so may catch someone else out too.
    Cheers.

  • JNDI lookup fails - No such domain/application

    Hi,
    I tried to perform a JNDI lookup from a stand alone Java client towards Oracle 9iAS version 9.0.3 and failed with the following error:
    javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: No such domain/application: mindejb; nested exception is:
         javax.naming.AuthenticationException: No such domain/application: mindejb
         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:345
         void Samplecom.mind.ejb.stubs.AccountComplexStubClient.main(java.lang.String[])
              AccountComplexStubClient.java:21
    Below, are the JNDI settings I am using. The application by the name mindejb was deployed and is accessible using server side JSP or servlets. When I use a stand alone OC4J, the same settings (different port) work fine!
    java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
    java.naming.provider.url=ormi://localhost:3101/mindejb
    java.naming.security.principal=admin
    java.naming.security.credentials=admin
    Thanks,
    Avi

    When you are running within an Oracle Application Server managed OC4J environment, then you should use the OPMN protocol loader we have that will insulate you from the specified ORMI port being used by OC4J.
    The OPMN port is fixed so you can always rely on it, whereas the specific ORMI port used by an OC4J instance changes depending on the startup sequence, the number of procs configured, etc.
    Here's a piece from the EJB documentation
    http://download-west.oracle.com/docs/cd/B14099_19/web.1012/b15505/access.htm#i1019709
    Location
    All ports, including the RMI port, are dynamically set by OPMN when each OC4J instance starts. When you specify the following URL in the client JNDI properties, the client-side OC4J retrieves the dynamic ports for the instance, and chooses one from the list for communication.
    java.naming.provider.url= opmn:ormi://<opmn_host>:<opmn_port>:<oc4j_instance>/<application-name>
    The OPMN host name and port number is retrieved from the opmn.xml file. In most cases, OPMN is located on the same machine as the OC4J instance. However, you must specify the host name in case it is located on another machine. The OPMN port number is optional; if excluded, the default is port 6003. The OPMN port is specified in opmn.xml.
    cheers
    -steve-

  • JNDI lookup failed:javax.naming.NameNotFoundException

    Hello:
    I have a application (not web) that publish messages to a specific topic, i want to receive these messages in a Web Service, but when the web service make the call to a class that is the JMS Client it can't find the Connection factory Name that i create in the aplication.
    I want to know what i have to do,
    I work with J2EE1.3.1 and JMS1.0.2 for the application that publish the messages
    and Jwsdp1.1, tomcat 4 and j2sdk 1.4.0 for the web service.
    I create the connection factory with this command:
    j2eeadmin -addJmsFactory jms/DurableTopicB topic -props clientID=IdTopicB
    Then in the class that the web service invoke i trying to join with this:
    try {
    jndiContext =new InitialContext();
    }catch (NamingException e){
    System.err.println("Could not create JNDI API "+
    "context:"+e.toString());
    return;
    *Look up connection factory and topic.If either  
    *does not exist,exit.                            
    try {
    topicConnectionFactory =(TopicConnectionFactory)
    jndiContext.lookup(conFacName);
    }catch (NamingException e){                      
    System.err.println("JNDI API lookup failed:"+
    e.toString());
    return;
    //System.exit(1);
    But i receive a error message in the log of Tomcat:
    JNDI API lookup failed:javax.naming.NameNotFoundException: El nombre DurableTopicB no este asociado a este contexto
    Thanks

    Hello:
    I display the full context of the connection factory in the application that publish the message:
    Full context is :
    Enviroment is : {java.naming.corba.orb=com.sun.enterprise.iiop.POAEJBORB@ec4a87}
    And in the web service when i create the initial context the full context is:
    Full context is : java:
    Enviroment is : {java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory, java.naming.factory.url.pkgs=org.apache.naming}
    How can i see the connection factory in the Web Service, because the connection factory was created in other Application?

  • JNDI lookup failing

    I have a small test program that gets a Context to our server and does a
    lookup for an EJB. The lookup fails with the following client-side
    trace...
    javax.naming.CommunicationException. Root exception is
    java.lang.ClassNotFoundException: class
    com.prismadata.appserv.session.series.TimeseriesSBBeanHomeImpl_ServiceStub
    previously not found
    at weblogic.rjvm.MsgAbbrev.read(MsgAbbrev.java:181)
    at
    weblogic.socket.JVMAbbrevSocket.readMsgAbbrevs(JVMAbbrevSocket.java:505)
    at
    weblogic.rjvm.MsgAbbrevInputStream.prime(MsgAbbrevInputStream.java:134)
    at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:610)
    at
    weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.java:34)
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
    at
    weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
    at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java:342)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:247)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    weblogic.rmi.UnmarshalException: Unmarshalling return
    - with nested exception:
    [java.lang.ClassNotFoundException: class
    com.prismadata.appserv.session.series.TimeseriesSBBeanHomeImpl_ServiceStub
    previously not found]
    at
    weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(BasicWLContext_WLStub.java:256)
    at
    weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
    at javax.naming.InitialContext.lookup(InitialContext.java:349)
    at
    com.prismadata.appserv.session.series.test.Client.main(Client.java:73)
    However, when I perform the same lookup in a servlet (admittedly running
    in the same JVM) I successfully get the home interface object back.
    Any ideas why ?
    Thanks,
    Gino

    In order to get a reference to you EJB Home interface from JNDI, your
    application has to have an access to the stub of this interface. This stub
    is generated by WL tools when you deploy your EJB. Because your servlet runs
    inside the server's VM, it has an access to this stub by default. So just
    include these stubs in CLASSPATH of your test program and you will see the
    difference.
    kesha
    "Gino Coccia" <[email protected]> wrote in message
    news:[email protected]...
    I have a small test program that gets a Context to our server and does a
    lookup for an EJB. The lookup fails with the following client-side
    trace...
    javax.naming.CommunicationException. Root exception is
    java.lang.ClassNotFoundException: class
    com.prismadata.appserv.session.series.TimeseriesSBBeanHomeImpl_ServiceStub
    previously not found
    at weblogic.rjvm.MsgAbbrev.read(MsgAbbrev.java:181)
    at
    weblogic.socket.JVMAbbrevSocket.readMsgAbbrevs(JVMAbbrevSocket.java:505)
    at
    weblogic.rjvm.MsgAbbrevInputStream.prime(MsgAbbrevInputStream.java:134)
    at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:610)
    at
    weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.jav
    a:34)
    >
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
    at
    weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
    at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java:342)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:247)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    weblogic.rmi.UnmarshalException: Unmarshalling return
    - with nested exception:
    [java.lang.ClassNotFoundException: class
    com.prismadata.appserv.session.series.TimeseriesSBBeanHomeImpl_ServiceStub
    previously not found]
    at
    weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(BasicWLContext_WLStub.jav
    a:256)
    >
    at
    weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
    at javax.naming.InitialContext.lookup(InitialContext.java:349)
    at
    com.prismadata.appserv.session.series.test.Client.main(Client.java:73)
    However, when I perform the same lookup in a servlet (admittedly running
    in the same JVM) I successfully get the home interface object back.
    Any ideas why ?
    Thanks,
    Gino

  • JNDI Lookup failing in specific instances

    Hi All
    We have an application deployed to OC4J 9.0.4.1 - the application consists of a collection of local/remote session beans and nearly 100 entity beans.
    We are calling a local session bean and local entity bean from a remote SB. Now in most cases our JNDI lookups work fine, however some specific ones do not.
    The following are our JNDI specific properties :
    "jndiproviderclass"
    com.evermind.server.rmi.RMIInitialContextFactory</property"url"
    ormi://HOSTNAME:23792/Twe
    "security_principal"
    admin
    "security_credentials"
    welcome
    If anyone has any ideas why some specific deployments would not work, I can provide more details.
    Thanks

    Hi Jon,
    I got it working a couple of days ago. First I tried manually but could not get it working, then I found this description of how to do it using the Enterprise Manager and then it worked. Check: http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_db.htm#BDCFIEDJ
    I defined a connection pool, a datasource and connection factory. In 6 step you should use a DbAdapter instead of an AppsAdapter, and don't put anything in dataSourceName. I choose No Connection Pool for the connection factory.
    Regards Pete

  • Query- Personnel Cost Planning-Immediate Help required

    Hi,
    I have a query.
    I am trying to Assign Percentage to Cost Item ( Personnel cost Planning)- Bonus which is a dependent cost item to Direct Cost Item-Base Salary but when I run the
    T. Code:- PHCPADMN the Bonus Percentage is not getting reflected and if I run the report-Plan data it is not showing any calculation of percentage.
    Kindly any immediate help is highly appreciable as I need to resolve it ASAP.
    Regards,
    Happy

    Hi Soniya
    I think you should look into following links:
    help.sap.com/printdocu/core/Print46c/en/data/pdf/PACMCP/PACMCP.pdf
    help.sap.com/saphelp_46c/helpdata/en/fd/45a4f79d6411d189b60000e829fbbd/content.htm
    Thanks
    Yash

  • Data source JNDI lookup fails in Weblogic 12.1.2

    What  is changed in the Weblogic 12.1.2 JNDI handling?
    My EJB 2.1 application has been working fine with Weblogic versions up to 12.1.1, but with version 12.1.2 it is giving the following error at startup:
    weblogic.application.ModuleException: javax.naming.NameNotFoundException: remaining name: comp/env/jdbc/DataSourceAlias
    where jdbc/DatasourceAlias is the res-ref-name of the actual datasource named jdbc/APP_DATASOURCE which is set through the admin console.
    The discovery of the datasource is performed by this piece of code :
    ds = initialContext.lookup ("java:comp/env/" + refName)
    This is what is failing with Weblogic 12. After some research I found out that in order for the datasource lookup to succeed, I have to :
    1) ignore the subcontext "comp/env" and
    2) use the actual JNDI name "jdbc/APP_DATASOURCE" instead of the reference "jdbc/DataSourceAlias"
    However for the EJBs, nothing is changed, they are found in the comp/env subcontext.
    Hope this helps someone, or let someone tell me how the migration to Weblogic 12.1.2 is supposed to be done.

    Hi,
    If it is war then try to apply following  Patch 13893259.
    Regards,
    Kal

  • RMI tunneling: JNDI lookup fails with : Disconnected: Type code out of range, is -29

    9iAS Release 2
    When trying to tunnel through Apache to the OC4J_home instance using ...
    http:ormi://<host>:<HTTPport>/<application> <admin><password>
    and then looking up a JNDI name ...
    TopicConnectionFactory connectionFactory =
    (TopicConnectionFactory)new InitialContext(p).lookup("jms/myTopicConnectionFactory");
    I get a NamingException thrown, with the message: Disconnected: Type code out of range, is -29.
    The jms.xml file is correct. It works against a standalone OC4J instance (therefore no tunneling) ...
    ormi://<host>:23791/<application> <admin><password>
    I'm connecting from a standalone client and using the RMIInitialContextFactory, the tunneling is working (changing oc4j username/password gets a SecurityException). What's missing? Do you have to change the jndi name when tunneling? What does -29 mean in english?

    Tunneling through the Apache HTTP server to an OC4J instance from remote standalone clients works on Linux installations of 9iAS but not on NT installations, failing with a 'Type Code out of range, is -29' error, JVM versions on client and server are the same. Also works against a standalone version of oc4j on NT, what's happening?

  • Immediate help required with decode statement in scheduling jobs

    Hi
    Iam trying to change a job that runs my procedure using dbms_job.. Here is the output I got.
    Can someone help me why this is giving me errors.
    <code>
    SQL> exec dbms_job.next_date(395,decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),-1,'trunc(sysdate) +18.5/24',1,'trunc(sysdate)+1+6.5/24'));
    BEGIN dbms_job.next_date(395,decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),-1,'trunc(sysdate) +18.5/24',1,'trunc(sysdate)+1+6.5/24')); END;
    ERROR at line 1:
    ORA-06550: line 1, column 30:
    PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL
    statement only
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    </code>
    Thanks in advance

    A possible solution:
    declare
    v_next_varchar varchar2(30);
    v_next_date date;
    begin
    select decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),
                              -1,'trunc(sysdate) +18.5/24',
                                 1,'trunc(sysdate) +1+6.5/24'
    into v_next_varchar
    from dual;
    execute immediate 'select ' || v_next_varchar || ' from dual ' into v_next_date;
    dbms_job.next_date(22, v_next_date);
    commit;
    end;Bye, Aron

  • Dynamic ALV Layout - Immediate help required

    I have a Summary and a Detailed ALV layout screen. Now when i get to detailed screen from summary screen; I choose a layout say L1 here. Then I press F3(back) this would get me back to the summary screen.Now my requirement is when i click on detailed view from here now; the previously chosen layout L1 needs to be used for the report output. Can this be done?
    Note : This needs to be done without choosing layout from selection screen.
    Require help urgently on this.
    Regards
    Swamy

    Yes you can do that.
    When you are backing out of detailed screen, store the name of the layout in a variable. When you are coming in the detailed screen again, pass this layout name in the IS_VARIANT-LAYOUT variable along with other values.
    Before backing out of the detailed screen you can get the layout chosen using the function REUSE_ALV_GRID_LAYOUT_INFO_GET or calling the method GET_FRONTEND_LAYOUT of the class CL_GUI_ALV_GRID, depending on how you are displaying the report.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • Behavior of load balancers - Oracle weblogic 10.0 - immediate help required

    Hi,
    We have an environment where we have two load balancing servers for one application. We are facing an issue, where a request which comes from the front end (Ajax request) is re-submitted exactly after 3 minutes in this load balancing environment. At any time, one server is taking the requests, but the request is getting re-submitted after every 3 mins. First time, the request is taking more than 3 minutes to give the response, so, many requests are getting submitted each after 3 minutes. Can any one suggest me which setting/parameter of the load balancer cause this? And how to resolve this? We came to know that this is purely of load-balancing issue, as the same issue is not reproducible in normal environments (single server env)
    Awaiting your immediate response,
    Thanks in advance...
    Gayathri.
    Edited by: 900817 on Dec 29, 2011 9:34 PM

    If I understand your scenario,
    * a client at some other layer of your application submits an AJAX type request towards a service running on WebLogic 10.x
    * that transaction IS expected to have a long execution time -- longer than 3 minutes
    * your service on WebLogic is seeing the request submitted a second time (in error) after 3 minutes elapse while the prior thread is still running
    It sounds like:
    * the request was implemented as a synchronous call
    * your AJAX framework is using a default TCP timeout of 180 seconds (3 minutes) -- pretty standard setting
    * the client isn't seeing a response in 180 seconds and its TCP layer is assuming something errored out and is aborting the first TCP connection and resubmitting it.
    Assuming the load balancer isn't implementing its own 180 second limit on connections without any traffic flowing, you may need to either
    * find a way to tune your AJAX client to configure it to wait longer for responses
    * alter the implementation of the service to be an asynchronous call so the AJAX client waits for a callback sent by your service when execution completes.
    Hope that helps.

  • Jndi lookup fails on Sun app server 8

    My standalone client on java is able to lookup TopicConnectionFactory on localhost on Sun Server 7 perfectly, but fails on Sun Server 8. I've set up the resources correctly as described in the J2EE 1.4 tutorial, but I get the following error:
    SEVERE: NAM5003: CommunicationException in SerialContext lookup()
    java.lang.NullPointerException
         at com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:64)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:148)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
    javax.naming.CommunicationException:
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:174)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)What could be wrong??

    It turned out to be a JMS library version issue. I had files for Server 8.0, but was running 8.1. Who knew it would be that big a deal.
    Now that I have the right version, I'm able to look up topics and queues, but cannot lookup TopicConnectionFactory. The client does not return at connectionFactory = (TopicConnectionFactory)initial.lookup("jms/FieldTopicConnectionFactory"); and no error in server.log.
    Here's the rest of the code:
    try {
             Context initial = new InitialContext();
               connectionFactory = (TopicConnectionFactory)initial.lookup("jms/FieldTopicConnectionFactory"); //does not return
             dest = (Topic) initial.lookup("jms/FieldTopic"); //this works!!
    } catch{...}I run my standalone through these JVM args:
    -Dorg.omg.CORBA.ORBInitialPort=3700 -Dorg.omg.CORBA.ORBInitialHost=myserver.com

Maybe you are looking for