-
Jul 23rd, 2007, 12:33 PM
#1
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
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
<property name="location">
<value>classpath:jndi.properties</value>
</property>
</bean>
<!-- define all jndi properties -->
<util
roperties id="jndiProps" location="classpath:jndi.properties"/>
<!-- initialize the jms boiler plate code here -->
<jee:jndi-lookup id="internalJmsQueueConnectionFactory1" jndi-name="${qmanager.1.name}"
environment-ref="jndiProps" lookup-on-startup="true"/>.
The weird thing is that at the point of loading the application context , I get an error sying "Attribute 'environment-ref' is not allowed to appear in element 'jee:jndi-lookup'. ".
I am really surprised that this is happening. I am using spring-2.0.5 and the corresponding versions.
I saw the on spring2.0.3 release notes that environment-ref is supported on all jee:* tags. Can some one help me figure this out.
thanks
-Satish
-
Jul 24th, 2007, 12:50 AM
#2
Strange. I have no 2.0.5 version at hand, but the xsd of 2.0.6 has the environment-ref entry.
I suggest checking your local xsd (located in org/springframework/ejb/config package).
Regards,
Andreas
-
Jul 24th, 2007, 08:36 AM
#3
Thanks Andreas for the response.
I checked the XSD for environment-ref attribute and it is present in the XSD distributed in 2.0.5 version. So not quite sure what is happening there. I wonder if any one else has noticed this.
I got this to work without using the environment-ref tag though. I think spring puts everything in <util
roperties ...> into context attributes for JNDI look ups.
I am not sure if I should log a JIRA for this one.
thanks
-Satish
-
Jul 24th, 2007, 08:54 AM
#4
Can you verify that the schema declaration is like the one stated in the reference?
Perhaps you are referring to an older xsd.
-
Jul 24th, 2007, 09:09 AM
#5
No.
My declaration is correct.
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schem...ring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schem...spring-aop.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schem...pring-lang.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schem...ng-jee-2.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
thx
-Satish
-
Jul 24th, 2007, 09:40 AM
#6
Very strange, indeed. Can you try this also with Spring 2.0.6? And can you post the stacktrace (using [ code] [ /code] tags around it) please?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules