JNDI 1 « Java EE « Spring Q&A





1. JNDI Context :: Name jms not bound in this Context    stackoverflow.com

I am trying to configure a JMS server (OpenJMS) into a Spring application and when I refer the resources using the notation "jms/<> I get a "name" not bound exception. Any clue ...

2. Resolve JNDI lookups from Spring application context?    stackoverflow.com

In our Spring application we use clustered Hibernate Search with ActiveMQ which sets up some objects via JNDI. These objects are configured via the Spring application context and I am looking ...

3. Why does calling close() on an InitialContext break JNDI for all future lookups (Glassfish)?    stackoverflow.com

The second JNDI lookup in the code below fails with an exception when running as a standalone application against Glassfish (which has been configured to expose a QueueConnectionFactory and a DataSource ...

4. Spring JndiTemplate and parameterized JNDI lookup from context    stackoverflow.com

How can I represent new JndiTemplate(properties).lookup(name), where name is a string variable, in the Spring application context file? Can I express it in a way similar to the following, where ...

5. com.sun.jndi.ldap.LdapCtxFactory : class not found in servlet    stackoverflow.com

Good morning / afternoon, I have a problem with LDAP connector, when I use it in my unit test no problem, but when it was called in a application server environment, it ...

6. Issue with JNDI resource with Tomcat 6 on Linux with WAR file    stackoverflow.com

I'm fairly new to Tomcat and Java web development and am banging my head against a wall with an issue im experiencing. I have a web application that works fine on my ...

7. JDNI Active Directory, creating groups with scope    stackoverflow.com

I'm trying to create some local groups in my AD but sadly if I set a groupType attribute in my context I only receive this exception

 Caused by: javax.naming.directory.InvalidAttributeValueException: Malformed 'groupType' ...

8. Controlling log file location via JNDI in Spring?    stackoverflow.com

I have a Java web application that uses the SLF4J logging facade. To date, we use the Log4J implementation underneath (though we are considering a switch to Logback). Log4J ...

9. Tomcat vs Jetty JNDI Lookup    stackoverflow.com

I use Spring to configure my Java Web App and in my Spring configuration I obtain a datasource via JNDI for Jetty as follows: <jee:jndi-lookup id="dataSource" jndi-name="jdbc/myDataSource" /> but this won't work with ...





10. Spring as a JNDI provider?    stackoverflow.com

I would like to use Spring as a JNDI provider. This means that I would like to configure a bean in my Spring context, which can be accessed via JNDI. ...

11. Spring Jndi Configuration problem    stackoverflow.com

I have a problem setting up my configuration for JNDI with Spring. I checked the other posts but could not get my problem solved. I am using Tomcat 6 ...

12. How does an application that uses Spring's SimpleNamingContextBuilder know to search its directory for resources?    stackoverflow.com

How does an application that uses Spring's SimpleNamingContextBuilder as its JNDI provider know to search its directory for resources? What links the application to the Spring ...

13. Load jndi.xml before beans.xml    stackoverflow.com

I have two files beans.xml and jndi.xml. We want to retrieve something in beans.xml that is put into JNDI through jndi.xml. Unfortunately, beans in beans.xml are created before jndi.xml is loaded, ...

14. Bean not in the JNDI    stackoverflow.com

I created a small web service(test), I'm unable to get it to deploy to jboss server. It might be something with one of these files, this is my web.xml :

<?xml version="1.0" ...

15. how to put(bind) object to jndi in spring declaratively?    stackoverflow.com

We have a plain standalone spring application and we need to put jdbc datasource in jndi. (we use jboss treecache and it need datasource to be in the jndi). Some googling ...

16. Connect to EMS JMS queue using Spring3 + JNDI    stackoverflow.com

I'm having some issues create a connection to (and reading from) a Tibco EMS JMS queue.

<beans>
    <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
        <property name="environment">
 ...





17. Load jndi resources into context:property-placeholder    stackoverflow.com

I have the following spring config file:

<context:property-placeholder order="2"
    ignore-unresolvable="true" ignore-resource-not-found="true"
    location="file:///${user.home}/application.properties" />
<context:property-placeholder order="1"
    ignore-unresolvable="true" ignore-resource-not-found="true"
    location="file:///C:/Services/Tomcat 6.0/cms/application.properties" />
<context:property-placeholder order="3"
 ...

18. Cannot activate SimpleNamingContextBuilder: there is already a JNDI provider registered    stackoverflow.com

Getting follwing error when I run junit test case report through ant srcipt:

Cannot activate SimpleNamingContextBuilder: there is already a JNDI provider registered. Note that JNDI is a JVM-wide service, shared at ...

19. Java JNDI Lookup Spring with JBoss 6 Error    stackoverflow.com

Can someone help me with the exception in Spring 3.0, I use jee:jndi-lookup with jboss 6 to return a javax.sql.DataSource follow the code

import org.springframework.jdbc.core.JdbcTemplate;

public abstract class CvmImplDao {

   ...

20. problem with spring tag    stackoverflow.com

Below is the the xml excerpts of spring context.xml file.

    <?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/batch"
    xmlns:beans="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
    xmlns:jee="http://www.springframework.org/schema/jee" ...

21. JNDI resource not found in Spring controller, but works in JSP    stackoverflow.com

I have one Tomcat 5.5 with one resource for JDBC Pool connection:

<Resource name="jdbc/orcl"
           auth="Container"
        ...

22. JMS implementation using JNDI in spring application    stackoverflow.com

I am trying to implement JMS in my spring application. I have defined the JNDI name + queue name in applicationContext.xml as follows:

<bean id="emailQueueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
<property name="jndiName" value="java:comp/env/jms/<<Name of JNDI of ...

23. How do I write the equivalent of Spring's jee:jndi-lookup in Grails resources.groovy?    stackoverflow.com

I want to take something like this that works ok in Grails' resource.xml (standard Spring xml stuff):

    <jee:jndi-lookup id="remoteConnectionFactory"
    jndi-name="jms/WLQueueConnectionFactory" resource-ref="false">
     ...

24. JNDI lookup: boolean default value    forum.springsource.org

Hi, I have a bean with a boolean (or Boolean, I don't mind) flag, that has to be injected by Spring. The value comes from a JNDI resource ("true" or "false"), ...

25. Not using JNDI but get JNDI lookup failed error!    forum.springsource.org

Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

26. WebSphre JNDI look up issue.    forum.springsource.org

Jan 12th, 2011, 07:32 AM #1 ayazahmad View Profile View Forum Posts Private Message Junior Member Join Date Jul 2010 Posts 1 WebSphre JNDI look up issue. Hi. I have written ...

27. JNDI BeanFactory lookup    forum.springsource.org

JNDI BeanFactory lookup I have a web application in context A needs access to some APIs provided by a web application in context B. I'm going to create a set of ...

28. JNDI Lookup    forum.springsource.org

JNDI Lookup Hi, i am making a JNDI Lookup with my Spring batch client to a Weblogic application server. The problem is when the server is not running; thus no connection ...

29. JMSSender and jndi queue    forum.springsource.org

JMSSender and jndi queue I am using the WebServiceTemplate to do SOAP requests. JMS is used as transport. queue connection factory and request Queue are configured in the application server. The ...

30. jee:jndi-lookup with startup false throws exception    forum.springsource.org

Mar 15th, 2011, 01:37 PM #1 karthikamarnath View Profile View Forum Posts Private Message Junior Member Join Date Nov 2009 Posts 5 jee:jndi-lookup with startup false throws exception Hi, Weblogic throws ...

31. Load jndi.xml before beans.xml?    forum.springsource.org

Apr 20th, 2011, 07:21 PM #1 jhowarth View Profile View Forum Posts Private Message Junior Member Join Date Apr 2011 Posts 1 Load jndi.xml before beans.xml? I have two files beans.xml ...

32. Spring JNDI mocking with Jetty    forum.springsource.org

Spring JNDI mocking with Jetty Hey, I'm developing a few webapps that use LDAP parameters as well as credentials to CRUD the LDAP servers. These parameters are placed on a server ...

33. Annotation-based DI of multiple JNDI resources    forum.springsource.org

My application uses two data sources (container managed) exposed to the Spring container via jee-jndi-lookup. The two data sources are used by separate hierarchy of @Repository and @Service components. Since I ...

34. Annotation-based DI of multiple JNDI resource    forum.springsource.org

My application uses two data sources (container managed) exposed to the Spring container via jee-jndi-lookup. The two data sources are used by separate hierarchy of @Repository and @Service components. Since I ...

36. how to bind application context to jndi    forum.springsource.org

I would like to access my beans from ejb. There are supported classes in ejb.support, but I want to load my application context once, not every time when new ejb is ...

37. Spring JNDI Lookup throws AopInvocationException    forum.springsource.org

Spring JNDI Lookup throws AopInvocationException Hello, someone can help, please, I'm using Spring 3.0 JNDI Lookup in Jboss 6, I need of a javax.sql.DataSource to a JdbcTemplate, the bind was make, ...

38. Tomcat, problem with org.springframework.jndi.JndiObjectFact    forum.springsource.org

Nov 19th, 2004, 08:28 AM #1 khem View Profile View Forum Posts Private Message Junior Member Join Date Aug 2004 Posts 25 Tomcat, problem with org.springframework.jndi.JndiObjectFact Hi all, In my application ...

39. JNDI: CachingConnectionFactory vs. jee:jndi-lookup    forum.springsource.org

Hi everbody, I have a question concerning JNDI configuration. Can anybody please explain the difference (if any) between the following configurations: 1. Code: 2. Code:

41. JNDI with SimpleRemoteStatelessSession in a cluster    forum.springsource.org

JNDI with SimpleRemoteStatelessSession in a cluster Hi all, I am new here and I would like to ask a question about the setting of JNDI with the SimpleRemoteStatelessSessionProxyFactoryBean in a cluster ...

42. Jndi binding error    forum.springsource.org

Jndi binding error i am developing in weblogic 8.1 and i wrote like this; java:comp/env/jdbc/OracleDS but it happens situations....... java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInsta ...

43. what about this Exception In jndi template?    forum.springsource.org

what about this Exception In jndi template? i am use jetty plus server + jtom +xapool Code: jndi.JndiTemplate - Could not close JNDI InitialContext javax.naming.OperationNotSupportedException at org.mortbay.jndi.NamingContext.close(NamingContext.java:1110) at javax.naming.InitialContext.close(InitialContext.java:478) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:89) ...

44. BeanCreationException - JNDI implementation    forum.springsource.org

Hello, I am a newbie trying to setup the spring environment and i believe i have setup everything correctly, however, i am getting a servlet exception from the applicationContext-resources.xml trying to ...

45. PropertyPlaceholderConfigurer search in JNDI    forum.springsource.org

Code: classes/datasource/DataSourceTypes.properties I have one properties file in JNDI (not in the classpath). So I want PropertyPlaceHolderConfigurer to search in ...

46. How to bind the application context to JNDI name    forum.springsource.org

Hi, I am trying to create the application Context and bind it to JNDI context and am not able to do so because the application context does not implement serializable. Is ...

47. JNDI Resolution Spring/JBOSS    forum.springsource.org

JNDI Resolution Spring/JBOSS Hi, I wonder if anyone can help - I'm currently trying to call a legacy SS Bean service from a Struts/Spring Web App (both deployed on JBOSS). I ...

48. Accessing multiple JNDI objects, with different principals    forum.springsource.org

Accessing multiple JNDI objects, with different principals Hi, I'm trying to access two JNDI objects within one class. So, I've declared two jndi templates :

49. Error loading context: unknown protocol: jndi    forum.springsource.org

Error loading context: unknown protocol: jndi I'm trying to use ContextSingletonBeanFactoryLocator for a shared factory. However, when I try load the context I get the following error: Code: Caused by: org.springframework.context.ApplicationContextException: ...

50. Registering ApplicationContext in JNDI    forum.springsource.org

Registering ApplicationContext in JNDI I'm trying to register my singleton ApplicationContext in JNDI so it can be accessed from different class loader contexts within a JVM running JBoss. Does anyone have ...

51. Help - ApplicationContext in Jndi    forum.springsource.org

Hi all, Im searching about this, but I not find. The applicationContext is started on start up of Jboss, but it is not bound in JNDI to use in Web, EJB, ...

52. Cant get past JNDI    forum.springsource.org

Oct 14th, 2005, 05:20 AM #1 joshuayip View Profile View Forum Posts Private Message Junior Member Join Date Sep 2005 Posts 9 Cant get past JNDI Hi all Spingers Good day. ...

53. JNDI works differently for different beans using JBoss?    forum.springsource.org

JNDI works differently for different beans using JBoss? I was configuring my beans to look up JNDI resources in JBoss and finally got things to look up properly but with inconsistent ...

54. RMI with Spring + Weblogic 8.1SP4 + JNDI    forum.springsource.org

RMI with Spring + Weblogic 8.1SP4 + JNDI Hi all. I am trying to expose some service POJOs with RMI using JndiRmiServiceExporter. These services are to be exported to Weblogic's JNDI. ...

55. Spring as a JNDI provider    forum.springsource.org

No, but it should be relatively easy to do. However, I would recommend that you should abstract away from JNDI towards POJO-based and injection-based approaches in general. Spring's JndiObjectFactoryBean facilitates this. ...

56. What is the recommended method for setting the JNDI environment on the client ?    forum.springsource.org

What is the recommended method for setting the JNDI environment on the client ? Hello all, I'm new to spring, so forgive the basic question, but I can't find the answer ...

57. SpringHibernate JNDI Binding    forum.springsource.org

SpringHibernate JNDI Binding Hi I am using Spring + Hibernate + Stuts I have a problem with JNDI Datasource Binding. Please see if u can help me. I have configured a ...

58. Jndi/jsp Problem    forum.springsource.org

Jndi/jsp Problem Hi, I am getting "datasource not bound" exception.Please help me to solve this.I have given the following details: My datasource connection name is OracleDS.I have put that xml in ...

59. Pulling String from JNDI using Spring    forum.springsource.org

I have a simple scenario and I hope that someone can give me a good and simple tip on how to accomplish it using Spring. I have URL (a String) set ...

60. JBOSS JNDI ResourceRef    forum.springsource.org

JBOSS JNDI ResourceRef Using JNDI Template in Tomcat I was able to get datasources using the configuration below. Unfortunately now that I am using JBoss I get a javax.naming.Reference instance instead, ...

61. JNDI Object Factory Bean    forum.springsource.org

JNDI Object Factory Bean I'm using JBoss HA JNDI to enable clustered JMS. The JBoss HA JNDI appears to work correctly as i'm able to execute the following code to retreive ...

62. Using Spring Application Context as a JNDI Replacement    forum.springsource.org

Using Spring Application Context as a JNDI Replacement Hi folks, I am looking into the idea of replacing the use of JNDI with a Spring application context. I would be curious ...

63. Fallback options for JNDI lookup    forum.springsource.org

Fallback options for JNDI lookup I'm interested to know if it is possible to configure/wrap JNDIObjectFactoryBean such that if the lookup fails it falls back to a bean defined in my ...

64. Tomcat and JNDI Reference issue (revisited)    forum.springsource.org

Mar 2nd, 2006, 08:55 PM #1 Loumeister View Profile View Forum Posts Private Message Senior Member Join Date Aug 2004 Posts 208 Tomcat and JNDI Reference issue (revisited) So I looked ...

65. lazy-init ignored for JNDI-based objects    forum.springsource.org

lazy-init ignored for JNDI-based objects I've read several threads about how lazy-init is ignored in some cases, especially JndiObjectFactoryBean and SimpleRemoteStatelessSessionProxyFactoryBean. And using a lazy lookup of the object using a ...

66. property value (in a props) from jndi    forum.springsource.org

Hi! I would like to set a property in a list with a value coming from a JNDI environment variable as following: I have this in tomcat's context.xml: Code:

67. problem with m4 jndi lookup in beans xml file    forum.springsource.org

hi; i just upgraded to M4. it looks like on the elemnt jndi:lookup the jndi name attribute was changed from 'jndiName' to 'jndi-name' but the schema in "http://www.springframework.org/schema/jndi/spring-jndi.xsd" is still the ...

68. JNDI Lookup Broken    forum.springsource.org

JNDI Lookup Broken Hi there, I had deployed HAR using JBoss MBean approach and it works properly. The problem now is when I uses WEB-IND\applicationContext.xml to point the JNDI registered, then ...

69. Set property value from a jndi lookup result    forum.springsource.org

In configuring an ejb stateless session bean proxy you can supply a jndiTemplate. This takes a provider url. I do not wish to hard code the URL here, but wish to ...

70. Jndi lookup from non Spring application    forum.springsource.org

Jndi lookup from non Spring application Hi, Am using Spring's JndiRmiServiceExporter to bind my services with JNDI. Can a non Spring appilcation lookup and use that service from JNDI? I was ...

71. jndi schema not avilable    forum.springsource.org

jndi schema not avilable hi; it seems that the jndi xsd is not available at http://www.springframework.org/schem...pring-jndi.xsd (at the time of this writing) this seem to affect my application that cannot be ...

72. Ref to jndi environment with jee schema    forum.springsource.org

Ref to jndi environment with jee schema Hi, I used spring old style configuration for my JNDI lookup: Hope that helps. -karl ...

77. Help - JBoss, JNDI and Spring    forum.springsource.org

Help - JBoss, JNDI and Spring I'm having a dickens of a time getting a simple JNDI datasource to bind to my web-services application, and so far haven't had much luck ...

78. AbstractDependencyInjectionSpringContextTests + jndi lookup    forum.springsource.org

AbstractDependencyInjectionSpringContextTests + jndi lookup Hey all, i'm having trouble looking up a jndi datasource while trying to run some integration tests. my setup is as follows: JBoss 4.0.5 Mysql Spring 2.0 ...

79.  of Tomcat Environment Entries    forum.springsource.org

of Tomcat Environment Entries This should be in theory really easy but it hasn't been for me so I post of the forum as a last resort. Problem Want to ...

80. Loading log4j properties from class path or from jndi lookup    forum.springsource.org

Loading log4j properties from class path or from jndi lookup We're using Spring and Log4j in a JEE project. When in DEV I want to load the log4j.properties file from the ...

81. JNDI configuration with WAS 4    forum.springsource.org

JNDI configuration with WAS 4 Hi, using Spring 1.2.7 + Hibernate 3 + Websphere Application Server 4.0 + Oracle 9. Before setting up a datasource in websphere, everything worked fine. Now ...

82. Injecting an application resource without programmatic JNDI lookup    forum.springsource.org

Injecting an application resource without programmatic JNDI lookup Hi all. I'm fairly new to Spring, hope this isn't the millionth time this question pops up. Here goes : I define a ...

83. InitializingBean as a JNDI resource    forum.springsource.org

Hi, I'm using JndiObjectFactoryBean to look up one of my beans and need to call an init-method on that bean. Implementing InitializingBean doesn't seem to help. Any ideas? Maybe there's a ...

84. This has gotta be easy: Creating a java.util.Properties object from jndi props    forum.springsource.org

This has gotta be easy: Creating a java.util.Properties object from jndi props Pretty sure this is really easy to do, but just can't find the syntax: I have a bean takes ...

85. J2EE client application hangs during startup finding JNDI intermittently    forum.springsource.org

J2EE client application hangs during startup finding JNDI intermittently I couldn't find anything like this on the forum, so I'm posting hoping for help. I'm working on a Spring-based client that ...

86. JNDI with Spring to read resources.    forum.springsource.org

JNDI with Spring to read resources. I have an application running using Spring Framework on Tomcat 5.5 The application uses several resource files either as name-value pairs or xml. currently it ...

87. How to manage a growing list of jndi items?    forum.springsource.org

How to manage a growing list of jndi items? I have a question that is probably pretty simple, and may sound a little crazy? I have an application we are building ...

88. JNDI connect error    forum.springsource.org

JNDI connect error Hi, I have a Spring config file that contains definitions of JNDI names of datasources living on a J2EE server (BEA Weblogic). There are some beans that these ...

89. setup problem with tomcat5.5 Spring and JNDI    forum.springsource.org

setup problem with tomcat5.5 Spring and JNDI I am trying a program that will read a properties file (name value) pair and print the same. I am doing this prototying to ...

90. why jmock can't work with JNDI    forum.springsource.org

as i know jmock can run junit tests without container, but in my application it seems doesn't work. I using JNDI as the dataSource bean, after I run the Daotest console ...

91. Connecting to databse using JNDI Issue...    forum.springsource.org

Connecting to databse using JNDI Issue... Hi, Without using JNDI, i was able to connect to Database. The config file is below... Code: ...

92. Sample usage of jndi-lookup    forum.springsource.org

Sample usage of jndi-lookup I need to lookup a JMS connection factory from jndi and inject the connection factory into another bean (a JMS Template). I can do this manually in ...

93. spring setting issue about muti jndi with weblogic server    forum.springsource.org

dear all: I'd like to use Jndi with weblogic server and spring, but our project needs to get jndi setting form different DataBase. Can anyone tell me how to setting muti ...

94. spring jndi    forum.springsource.org

spring jndi hi i developed code using spring hibernate to connect to DB in my applciationcontext.xml my code is like this Code: file:jdbc.properties

95. spring jndi on tomcat    forum.springsource.org

spring jndi on tomcat hi I'm having trouble running this on tomcat. my appliactioncontext.xml is like this Code: ...

96. different jndi in application context    forum.springsource.org

hi i have to use two different dbs in my aplication. how can i use the two jndi datasources in my applicationContext.xml can somebody help me please. AD

97. calling stroed procedure thru jndi context    forum.springsource.org

hi ii need to call storedprocedure thru jndi context, how can i do this please as earlier i was getting dbconnection thru jdbc and using that. my previous code Code: ds ...

98. jndi-name    forum.springsource.org

Hello, In my applicationcontext.xml I use JNDI. And I'd like to "concat" 2 jndi for a property to have something like Anyone has a solution? Thanks for ...

99. Storing properties in JNDI    forum.springsource.org

Storing properties in JNDI Hi there, I'd like to store our application properties in JNDI so that different property values can be accessed in our different environments (dev,qa,prod). I tried to ...

100. environment-ref unrecognized on jee:jndi-look-up tag    forum.springsource.org

environment-ref unrecognized on jee:jndi-look-up tag Hello I am trying to look up a jndi resource (a jms connection factory) using the jee:jndi-look-up tags. Here is how it looks like