aspose file tools
The moose likes Spring and the fly likes xml error. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "xml error." Watch "xml error." New topic
Author

xml error.

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 204
HI I am having some mis config in the xml configuraiton, but I couldn't couldn't found out where it got wrong.
Here is its error exception during its deployment:



security-config.xml file is shown as below:



Any help is much appreciated.
Thanks
Sam
Kathleen Angeles
Ranch Hand

Joined: Aug 06, 2012
Posts: 113

I found this thread.

The thread mentioned above involves deploying in Jboss. Jboss 5.x apparently validates all xmls in /WEB-INF folder. The solution involves moving the xmls that get the errors, into a sub-folder in /WEB-INF. For example, move the xmls that is getting the error into /WEB-INF/myXmls. Of course, adjust the configurations, etc. that need to point to the new xml locations.



-k

[SpringSource Certified Spring Professional - Practice Tests]
sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 204
the I changed the xml file to the following:



and now when I deployed the project, I got the following error:



Looking forward more suggestion to resolve this error.
Thanks
Sam
Kathleen Angeles
Ranch Hand

Joined: Aug 06, 2012
Posts: 113

Another possible solution that you can try that is also mentioned in the thread mentioned above, is to arrange the order of the schemaLocation data. That is, in the xml you posted above, change



into





-k

[SpringSource Certified Spring Professional - Practice Tests]
sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 204
With this new approach, I got the following error exception:



Here is my xml file:



Thanks
Sam
sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 204
the error should be shown as below:

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 204
sorry I messed up the xml config file.
the config file should be the one shown as below:

Kathleen Angeles
Ranch Hand

Joined: Aug 06, 2012
Posts: 113

Try reordering, and removing :beans from xlmns:beans, and adding the xlmns:security where appropriate, as below, from:



into

.


-k

[SpringSource Certified Spring Professional - Practice Tests]
sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 204
Great! it fixed the error.
Excellent help!.
VERY APPRECIATED.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: xml error.
 
Similar Threads
Exception while running the Spring example
applicationContext.xml - Can not find definition for element 'beans'
HTTP Status 404 - /j_spring_security_check
nullpointer with @Autowired AuthenticationManager
Spring security and jsf Integration