4

I have an OSGi reference in my spring-context.xml cofiguration file. When I specify:

<osgi:reference id="cxfInboundLoggingInterceptor" interface="com.groupgti.esb.cxf.interceptors.MessageLoggerInbound" /> 

IntelliJ says that: Attribute id is not allowed here. My osgi prefix is pointing to this schema: xmlns:osgi="http://www.springframework.org/schema/osgi"

And schema location:

http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd 

From Spring OSGi documentation:

The <osgi:reference> element is used to define a local bean that acts as a proxy to an OSGi service (or set of services). The only required attributes are id (which defines the name of the local bean) and interface (which defines the fully qualified name of the interface that the target service is registered under).

So I see that id is required, but why then IntelliJ is complaining about it?

2
  • I spent a couple hours trying to figure out the same problem but failed. I suspect it's an IDEA bug and now I just ignore it. Commented Sep 1, 2012 at 15:56
  • Can an inspection be disabled (any idea which one?) to suppress these errors? Commented Oct 7, 2013 at 10:03

3 Answers 3

2

I've created the ticket to this bug in JetBrains Tracker

Sign up to request clarification or add additional context in comments.

Comments

0

I noticed that osgi xsd does

<xsd:import namespace="http://www.springframework.org/schema/beans"/> <xsd:import namespace="http://www.springframework.org/schema/tool"/> 

and for me they are not found. But even when you set them up it does not seem to work.

You probably need to file a bugreport for IntelliJ at http://youtrack.jetbrains.com/issues/IDEA.

Comments

0

Perhaps you need to qualify the id attribute: xml:id?

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.