5 Replies Last post: Feb 1, 2013 6:07 PM by Yann Cebron  
Eric Darchis Newbie 5 posts since
May 31, 2011
Currently Being Moderated

Jan 31, 2013 10:35 PM

spring config jndi-lookup id="foo" marked red as not allowed

I have a spring 2.x config file that contains a <jee:jndi-lookup id="xxxxxDS"..../>

This is working fine but IntelliJ marks it as wrong:

Screen Shot 2013-01-31 at 19.24.58.PNG

If you check the documentation, this attribute is meant to be specified,

the xsd (http://www.springframework.org/schema/jee/spring-jee-2.0.xsd)

says that jndi-lookup extends jndiLocatingType which in turns extends beans:identifiedType that contains:

<xsd:attribute name="id" type="xsd:ID">

 

So why is IntelliJ saying that I can't have an id there ? I can't even turn it off. As you can see in the screenshot...

 

I'm using IDEA 12.0.2 on a Mac if that has anything to do with it.

Yann Cebron JetBrains 1,472 posts since
Aug 22, 2002
Currently Being Moderated
Jan 31, 2013 11:07 PM in response to: Eric Darchis
Re: spring config jndi-lookup id="foo" marked red as not allowed

Can you CTRL-click on "http://www.springframework.org/schema/jee/spring-jee-2.0.xsd" in the xsi:schemaLocation? To what file does it resolve to? What version of Spring library JARs do you use in your project?

Yann Cebron JetBrains 1,472 posts since
Aug 22, 2002
Currently Being Moderated
Feb 1, 2013 12:35 AM in response to: Eric Darchis
Re: spring config jndi-lookup id="foo" marked red as not allowed

According to your description it should work properly.

 

Does it open the XSD contained in your spring-2.0.6.jar? If not, which XSD file is linked? Could you double-check if you have a second spring.jar somewhere in your project? Did you setup custom mappings for Spring schema (Settings->Schemas and DTDs)?

Yann Cebron JetBrains 1,472 posts since
Aug 22, 2002
Currently Being Moderated
Feb 1, 2013 6:07 PM in response to: Eric Darchis
Re: spring config jndi-lookup id="foo" marked red as not allowed

Did you include spring-remoting.jar in your classpath (see http://forum.springsource.org/showthread.php?65317-Trouble-with-spring-jee-2-0-xsd). Also I found some posts about issues with XSD packaging issues in Spring 2.0.x distributions, I would also highly recommend you to upgrade to 2.5.6 or later, last but not least for security considerations.

 

spring-web.jar will be downloaded when you add support for Spring MVC framework.

More Like This

  • Retrieving data ...