Questions tagged [jndi]

The Java Naming and Directory Interface (JNDI) is a Java API for a directory service that allows Java software clients to discover and look up data and objects via a name.

The Java Naming and Directory Interface (JNDI) is a Java API for a directory service that allows Java software clients to discover and look up data and objects via a name. Like all Java APIs that interface with host systems, JNDI is independent of the underlying implementation. Additionally, it specifies a service provider interface (SPI) that allows directory service implementations to be plugged into the framework. It may make use of a server, a flat file, or a database; the choice is up to the vendor.

For additional info check:

3073 questions
1
vote
1 answer

JBoss-A-MQ encountered an UnknownHostException in JMS messaging application

I have a sample JMS messaging application as shown in below snippet. When I executing the program (specifically when starting the connection) I get an UnknowHostException. The reason for the exception is clientid property get's…
helloworld
  • 965
  • 5
  • 14
  • 34
1
vote
1 answer

what is the difference between jndi binding of module and app in Java ee 6/7?

We migrated from Jboss EAP 5 to EAP 6 in our development environment. I now see the following in my JBOSS logs. I am trying to understand how this binding happens. I have read JBOSS docs on JNDI namespace binding. Still I am not totally clear how it…
brain storm
  • 30,124
  • 69
  • 225
  • 393
1
vote
2 answers

setting passwordMustChange attribute to "on" in Sun-one LDAP doesn't have any expected effect

I am using JNDI framework to interact with various LDAP servers specifically for Sun one LDAP, I am observing the following: Use case: If Administrator resets password of any user in Sun-One LDAP server then passwordMustChange attribute is set to…
BND
  • 51
  • 12
1
vote
1 answer

javax.naming.NoInitialContextException when try to get JMS resource from Glassfish

I am new-bee in JMS and trying to execute my first JMS program using Glassfish application server. I have created Connection factory [jms/MyQueueFactory] and Destination resource [jms/myQueue] in Glassfish admin console as per following: Following…
Chintan Patel
  • 729
  • 3
  • 14
  • 31
1
vote
1 answer

resource-ref at application scope in EJB 2.1 Project

Is it possible to define resource references that are applicable to all EJBs in an application? Currently I have an ejb-jar.xml that looks something like this:
Mike Deck
  • 18,045
  • 16
  • 68
  • 92
1
vote
0 answers

Multiple Datasources to perform read and write separately

In a spring java project i am having one datasource configured in persistence-config.xml as
tinker_fairy
  • 1,323
  • 1
  • 15
  • 18
1
vote
1 answer

Null pointer exception when attempting to use JNDI for JDBC

In Glassfish admin, I setup a JDBC connection pool that I can ping ok. Also in Glassfish admin, I have setup a JNDI JDBC resource called jdbc/myDb However I'm unable to connect to it from Java. I have tried both injection style: @Resource…
Little Code
  • 1,315
  • 2
  • 16
  • 37
1
vote
1 answer

Dynamically datasource with hibernate and netbeans

How I can create web application project which is loading the jndi datasource set in the server configuration? I want to make the web application independent from the server and the database. Is it possible.
Jordan Borisov
  • 1,603
  • 6
  • 34
  • 69
1
vote
1 answer

Error `specify class name in environment or system property` while using Jndi

What is wrong with this code? I tried to run the file through .sh and get this error : Error creating bean with name 'entityManagerFactory' defined in class path resource [com/.../beans.xml]: Cannot resolve reference to bean 'dataSource' while…
mrjimoy_05
  • 3,452
  • 9
  • 58
  • 95
1
vote
1 answer

EJB3 Weblogic 10.3.6 JNDI lookup

I am getting a javax.naming.NameNotFoundException: While trying to look up a EJB3 Stateless session bean. I have 1 weblogic domain and it consists of two servers Server_1 and server_2. I have deployed a EAR file to server_2 which consists of a EJB3…
user3564093
  • 65
  • 3
  • 10
1
vote
0 answers

Name [java:comp/env/jdbc/WalletDB] is not bound in this Context

I know that there is other relative questions but I didn't find a solution in them. I want to use hibernate with tomcat 8 and jndi for mysql database. My server context.xml .........
Jordan Borisov
  • 1,603
  • 6
  • 34
  • 69
1
vote
0 answers

Servlet execution threw an exception org.apache.tomcat.websocket.server.WsFilter.doFilter

I'm starting in Java. I'm following a tutorial to setting up a JNDI DataSource using Tomcat, but I'm not able to achieve it. I always get the same error, status 500. The exception is: type Exception report message Servlet execution threw an…
user3691735
  • 11
  • 1
  • 4
1
vote
1 answer

How to override TOMCAT Oracle ojdbc14 driver in the application?

The TOMCAT server is using an Oracle 9G ojdbc14 driver to its jndi connections in the /common/lib folder. My web application uses Maven + Spring and I'm getting the dataSource using Spring jndi features. I'm trying to bypass TOMCAT old ojdbc14…
1
vote
1 answer

How to set up jndi.properties for DataStore?

I'm struggling to set connect a Java program to MySQL using JPA/Hibernate. I'm currently getting the following error when I try to call createEntityManagerFactory(): [main] ERROR org.hibernate.connection.DatasourceConnectionProvider - Could not find…
Eric Wilson
  • 57,719
  • 77
  • 200
  • 270
1
vote
0 answers

Can I use (not set) jndi values in web.xml under jboss 5 or later?

I use org.jboss.naming.JNDIBindingServiceMgr mbean to setup config under jboss 5.xx. Can I use such bound values in web.xml? Sample servlet name
ysa
  • 141
  • 1
  • 7