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-
Similar Messages
-
Javax.naming.AuthenticationException: No such domain/application:
I'm trying on JDeveloper 11g tutorial on "Build a Web Application with JDeveloper 11g Using EJB, JPA, and JavaServer Faces. I encounter this problem when try to run the simple java client created by Jdeveloper.
javax.naming.AuthenticationException: No such domain/application: "current-workspace-app"
at oracle.oc4j.rmi.ClientRmiTransport.connectToServer(ClientRmiTransport.java:120)
at oracle.oc4j.rmi.ClientSocketRmiTransport.connectToServer(ClientSocketRmiTransport.java:70)
at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:720)
at com.evermind.server.rmi.RMIClientConnection.sendLookupRequest(RMIClientConnection.java:252)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:235)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:302)
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:64)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at mssql.HRFacadeClient.main(HRFacadeClient.java:13)
Anyone knows what's the cause of this error? I follow exactly the steps in Jdeveloper 11g tutorial. The only difference is that my database is MS SQL database.Same error.
The real application (web and ejb's) are running on the same OC4J instance. The Web client are accessing the ejb's on port 3101, so i think this is the correct rmi port.
The server is a part of an infrastructure that are running on the same server, the server is one of two ApplicationServers that the infrastructure (farm) is controlling.
each server has an instance name, the server i was deplying to has name instance2. Maybe i have to give a reference to to the instance? -
No such domain/application: "orabpel"
Hello, I am using a web application to call a bpel process, but when the application tries to do the lookup it launches this exception:
Caused by: java.lang.Exception: Fallo al crear el bean "ejb/collaxa/system/DeliveryBean"; la excepción mostrada es: "javax.naming
.NamingException: Lookup error: javax.naming.AuthenticationException: No such domain/application: "orabpel"; nested exception is:
javax.naming.AuthenticationException: No such domain/application: "orabpel" [Root exception is javax.naming.AuthenticationException
: No such domain/application: "orabpel"]
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClientContext.lookup(RMIClientContext.java:64)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)
at com.heinsohn.runt.web.server.PreregistroServiceImpl.iniciar(PreregistroServiceImpl.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:528)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher
.java:711)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
.java:368)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler
.java:866)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler
.java:448)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor
.java:303)
at java.lang.Thread.run(Thread.java:595)
What can i do?, thanks.Right - when signing on to the BPEL Console this error is most commonly the database not being up but you are not doing that. Besides, your error points to authentication.
"Root exception is javax.naming.AuthenticationException"
It might be the same issue as discussed in this thread.
Re: Call a BPEL process as non oc4jadmin user
Heidi. -
No such domain/application
I'm attempting to deploy an application on version 10 of Oracle Application Server built by others and I keep getting the following error. I'm trying to find some basic information on what this error means and how to figure out the cause. Thanks.
javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: No such domain/application: "etrace"; nested exception is:
javax.naming.AuthenticationException: No such domain/application: "etrace" [Root exception is javax.naming.AuthenticationException: No such domain/application: "etrace"]
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:64)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at gov.treas.atf.firearms.tracing.app.EtraceUtil.getEtraceAuthenticatorServiceRemoteInterface(EtraceUtil.java:353)
at gov.treas.atf.firearms.tracing.client.EtraceAuthenticatorDelegate.createServicesBean(EtraceAuthenticatorDelegate.java:90)
at gov.treas.atf.firearms.tracing.client.EtraceAuthenticatorDelegate.loginUser(EtraceAuthenticatorDelegate.java:56)
at gov.treas.atf.firearms.tracing.client.etrace.security.EtraceLoginAction.perform(EtraceLoginAction.java:73)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
at gov.treas.atf.firearms.tracing.client.etrace.TraceActionServlet.processActionPerform(TraceActionServlet.java:90)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.naming.AuthenticationException: No such domain/application: "etrace"
at oracle.oc4j.rmi.ClientRmiTransport.connectToServer(ClientRmiTransport.java:99)
at oracle.oc4j.rmi.ClientSocketRmiTransport.connectToServer(ClientSocketRmiTransport.java:68)
at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:646)
at com.evermind.server.rmi.RMIClientConnection.sendLookupRequest(RMIClientConnection.java:190)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:174)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:287)
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
... 20 moreLooks like the app you try to deploy looks for an MBean named etrace which you don't have. This will cause the domain/application not found.
Timo -
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 moreOkay "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).
-
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 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
ThanksHello:
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? -
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,
GinoIn 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 -
Manual JNDI lookup for EJB3 between different Application Server Instances
Hi all,
i have spent quite some time looking into this problem and searching the net but i just can't figure out for the life of me what i am doing wrong so i hope someone here can give me a clue or a good resource where i can look it up myself.
I am currently doing some interoperability tests concerning EJB calls between Glassfish and Weblogic 10. In my test setup i have an EJB deployed in a jar file on one server and a servlet in a war file deployed on the other. The objective is to try to look up and call the EJB from the servlet. As there seem to be some issues with injection in Weblogic 10 i set that one aside for now (i have opened a case at BEA support for this) but i would like to do a plain old JNDI lookup to obtain the EJB.
The online tutorials and FAQs i have read so far all state that this can be done the same way as it works for EJB2.x, at least if i understood them correctly. The interessting thing is, when i deploy an EJB2.x bean i can look it up without problems, but when i try to do the same with the EJB3 bean the name cannot be found. On the other hand when listing all contents of the JNDI tree in Glassfish from a stand alone application i can see entries for both EJBs of the type java.naming.Reference (in Weblogic i can also see entries for both, but the ones for EJB3 are of some weird internal weblogic types, which i put down as a weblogic problem for now).
The lookup code for the servlet running in weblogic looks like this:
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "corbaname:iiop:1.2@localhost:3700");
Object myEjb = new InitialContext(env).lookup("JNDINameDisplayedByContextListing");
I know that the preferred way would be to have the corbaname put into weblogic.xml/sun-web.xml and just use an InitialContext without an environment to perform the lookup but i wanted to get rid of any additional indirections to pinpoint the source my problem and it should work this way, too. As i said, it works when i target an EJB2.x bean but not with the EJB3 one, so i guess i am doing something wrong there. The jar file contains the interface of the bean annotated with @Remote and the implementation of the interface annotated with @Stateless, i also tried setting the mappedName attribute for the bean and use that name as JNDI name, but that also fails. In addition i added an ejb-jar.xml to the jars META-INF containing the following:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
version="3.0">
<enterprise-beans>
<session>
<ejb-name>SecurityTest3EJB</ejb-name>
<ejb-class>
testcase.ejb.SecurityTestBean
</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
But the ejb-name specified there does not show up in a context listing, so i would guess that means the file is ignored or only accessible from within the same application server (note, there is no indication of any problems in the Glassfish log when deploying the jar file).
This might be just a stupid mistake by me, but i just can't figure it out at the moment, so any advice will be greatly appriciated.
Thanks, ChrisI think i stumbled across something now. From some posts it seems to me that the EJB3 spec does not require EJBs to be accessible from a remote location, since this can be achieved by using the @RemoteHome annotation and performing a EJB2.x compliant look up. Is that correct?
-
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 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.
ThanksHi 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 -
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 -
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?
-
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
Srinican 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 -
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
-
Here's one for the strange folder... I have my Flex app. I build the project and copy the resulting swf to my development (192.168.100.110:511/devportal/) server for testing....this works perfectly fine. However, some of my testers see an error (inc
-
Using Tiger 10.4.11 and trying to back up hard drive on time capsule
I have successful set up time capsule to be my base internet station. Now I want to copy my hard drive onto Time Capsule but cannot figure out how to do it. I visited the apple store today in NYC and they folks there suggested I use "migration assist
-
Shockwave 10 on Firefox Not Working
After receiving a message from Adobe Update that there was a new version of Shockwave, I followed the link, but Firefox failed to automatically install the plugin. So I tried manual installation, but when I ran the executable, it just said "Congratul
-
Can a G5 run on its side, can it be used horizontally?
I have a fully functional dual 2 ghz G5 tower and was wondering if it can function on its side? Or, does it have to be vertical?
-
Fans are blowing in 10.4.6
Hello, some days ago, i have updated from 10.3.9 to 10.4.6. Since this time the fans of my PPC G5 2x2GHz are blowing much more than in the past. Has someone an idea, why it is? Greetings from Achim