Questions tagged [initial-context]
74 questions
1
vote
2 answers
Initial Context lookup failure over VPN
I have a setup as shown above. Recently, our Oracle databases were moved into a protected network segment protected by a firewall.
Hashtable table = new Hashtable();
table.put("java.naming.factory.initial",…

Rao Pathangi
- 504
- 3
- 11
1
vote
1 answer
Can I build a directory structure (JNDI) with the file based context factory com.sun.jndi.fscontext.RefFSContextFactory
Using the com.sun.jndi.fscontext.RefFSContextFactory file based JNDI context factory and it seems to only allow 1 binding file in location you specify. For example
Hashtable properties = new…

mrjohn
- 1,141
- 2
- 13
- 21
1
vote
1 answer
Recover environment properties sent to EJB
I have a Delegate that instanciate the corresponding Bean sending credentials (Josso Authentication) through InitialContext as shown here.
At Bean, I've tried to recover Josso Data with SessionContext, as shown below:
@Resource private…

André Luís Oliveira
- 464
- 1
- 3
- 15
1
vote
1 answer
javax.naming.NoInitialContextException Tomcat DataSource JNDI intellij idea 14
I am trying go get Connection Pool with Tomcat DataSource and MySQL in ntellij idea 14. I've done these steps:
Select "Project Structure" from the File menu
From there, select the "Facets" option. Make sure that you have a Web
facet configured.…

Oleg Kuts
- 769
- 1
- 13
- 26
1
vote
0 answers
NoInitialContextException in Apache Camel
I have a route that fetches a group of person ids from a database, splits them and does a LDAP lookup for each id. The code below is simplified but I hope you'll get the idea.
Main
public class MainApp {
public static void main(String... args)…

tok
- 909
- 1
- 10
- 21
1
vote
3 answers
Java RMI InitialContext: Equivalent of LocateRegistry.createRegistry(int)?
I am trying to some pretty basic RMI:
// Context namingContext = new InitialContext();
Registry reg = LocateRegistry.createRegistry(9999);
for ( int i = 0; i < objs.length; i++ ) {
int id = objs[i].getID();
// …

bguiz
- 27,371
- 47
- 154
- 243
1
vote
1 answer
How can I bind lookup with a String
My Program is
package client;
import homeif.HelloWorldHome;
import remoteif.HelloWorld;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.awt.image.LookupOp;
import…

Sreevidya Aravind
- 433
- 1
- 6
- 18
1
vote
0 answers
InitialContext Context.INITIAL_CONTEXT_FACTORY lucene4 ejb3
i'm use hibernate4 lucene4 in EJB3.
it ran perfectly but when i added a transaction in first managed bean.
the InitialContext return :
javax naming not found in ctx.lookup("java:comp/UserTransaction");
ex = (javax.naming.NamingException)…

user3008708
- 11
- 2
1
vote
1 answer
EJB lookup with InitialContext
I have a problem to look up a EJB hosted on a server. The server itself is an SAP environment, which is basicly a modified tomcat.
I tried several lookupstrings starting with
java:comp/env/
and
ejb:/
but nothing works.
This is what the server…

DI MI
- 245
- 2
- 5
- 16
1
vote
1 answer
Unable to Initialize InitialContext in JBoss AS 7.1
I am unable to initialize InitialContext and lookup for a string. Here is my code snippet :
java.util.Hashtable env = new…

Diganta
- 671
- 3
- 11
- 27
1
vote
0 answers
Glassfish infinite loop when lookup MailResource combined with module-name
Glassfish runs into an infinite loop when lookup Mail Resource. The error occurs only when defining a custom in the ejb.jar.xml.
Exception:
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at…

Mischa Höchsmann
- 101
- 1
- 5
1
vote
1 answer
InitialContext.lookup(ejbMappedName) return a new instance or an old same instance
For a statful EJB, if I get its reference using InitialContext.lookup(itsMappedName), for each call of (InitialContext.lookup(itsMappedName)) it will return a new Stateful EJB or the same stateful EJB?

user1169587
- 1,104
- 2
- 17
- 34
1
vote
1 answer
OpenEJB 4.5.1: NameNotFoundException
Its the first time I used the OpenEJB container system. When I use the lockup-Method of the InitialContext, I get a NameNotFoundException. I've read lots of examples and tutorials and in every example the lookup method looks…

FredFloete
- 627
- 2
- 13
- 33
0
votes
0 answers
How to get InitialContext value in test class
I am trying to Mock the InitialContext Value to my test class, but was getting the below exception.
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an…

user2816424
- 73
- 2
- 3
- 9
0
votes
2 answers
Trying to work with different remote data sources. Failing - jndi resolve exception
I have an application deployed on tomcat which tries to work with remote JMS queues of external system A and B. External systems are deployed on Weblogic, so in order to communicate with them I am providing also wlthint3client.
That is my code:…

liotur
- 809
- 2
- 17
- 36