Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Data- JPA Schema validation error in STS [DATAJPA-160] #581

Closed
spring-projects-issues opened this issue Jan 31, 2012 · 4 comments
Closed
Assignees
Milestone

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Jan 31, 2012

William Gorder opened DATAJPA-160 and commented

I have included a forum link here http://forum.springsource.org/showthread.php?118643-xsd-validation-errors-in-Eclipse-when-using-spring-data by someone else apparently having the same issue as I am. My configuration is even simpler than the one described in the forum thread I have posted it in its entirety below:

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns= "http://www.springframework.org/schema/data/jpa" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:beans="http://www.springframework.org/schema/beans"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd">
		
	<repositories base-package="com.xxxx.xxxx.store.repository" entity-manager-factory-ref="localContainerEntityManagerFactoryBean">
	</repositories>
</beans:beans>

Basically STS is showing the annoying red X saying that 'A schema cannot contain two global components with the same name; this schema contains two occurrences of 'http://www.springframework.org/schema/{context, beans tool},xxx' Where xxx can be replaced by one of the many components within the namespace.

I am using Java Config and importing that XML with @ImportResource from my java configuration file. Since I noticed a post was just made on how to configure spring data JPA with java configuration I will try that as a work around. I have classified this as a minor bug as things seem to still work normally but I am trying to introduce Spring data into one of my enterprise projects and a big red X does not instill a lot of faith :(

Thanks,


Affects: 1.0.2

Reference URL: http://forum.springsource.org/showthread.php?118643-xsd-validation-errors-in-Eclipse-when-using-spring-data

Issue Links:

Referenced from: commits 0795827, 2ac8b13

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Jan 31, 2012

Oliver Drotbohm commented

Removed the version references in the XSD file

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Feb 3, 2012

William Gorder commented

Oliver,

Is there a way for me to get this fix before 1.0.3 is officially released? (I am not sure how soon that is happening). If so what would I have to include in my POM?

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Mar 6, 2013

Hendrik Leppkes commented

I'm still getting a XML validation error in STS 3.1 (Eclipse 3.8), with Spring-Data JPA 1.2 or1.3, and Spring 3.1 or 3.2. With Spring 3.0 its fine.

sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurrences of 'http://www.springframework.org/schema/tool,annotation'.

There is a forum thread with more details here:
http://forum.springsource.org/showthread.php?122577-XML-Validation-Problems-A-schema-cannot-contain-two-global-components-with-the-same

Some people seem to have found some odd workaround, but none of them work for me.
The thread started with the original issue mentioned here (the hardcoded version reference), however it seems it was not resolved completely for some of us.

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Mar 6, 2013

Oliver Drotbohm commented

Please do not re-open tickets marked as resolved against an already released version. Please create a new ticket to solve further issues. We can link this one as related then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants