- This topic has 2 replies, 3 voices, and was last updated 16 years, 6 months ago by Brian Fernandes.
-
AuthorPosts
-
James NorrisMemberAdding JPA capabilities to a project that has Spring capabilities causes errors in applicationContext.xml for the added beans. The errors can be resolved by changing the namespace declarations to:
xmlns=”http://www.springframework.org/schema/beans”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xmlns:context=”http://www.springframework.org/schema/context”
xmlns:tx=”http://www.springframework.org/schema/tx”
xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd”>from the original values:
xmlns=”http://www.springframework.org/schema/beans”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd” xmlns:tx=”http://www.springframework.org/schema/tx”>To re-create this issue, create a new java maven project, add spring capabilities to it with default settings, add JPA capabilities with Hibernate. Same problem occurs with a web maven project.
Loyal WaterMemberI’ll get this issue checked by the team right away and get back to you with an update asap.
Brian FernandesModeratorjnorris,
I tried to replicate this but could not see any errors, could you please elaborate on what you mean by “errors in applicationContext.xml for the added beans”?
From your snippet above, I see you have added the context namespace (and the tx namespace twice); the beans added by the JPA / Spring wizards do no use the context namespace.
Please let me know if I missed something. -
AuthorPosts