• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

XML problems in java project

 
Ranch Hand
Posts: 182
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a question about xml files in a java project. I have a spring 4 project which can be downloaded from here - http://www.perfmath.com/spring/soba_zip/soba4_download_1.zip

Under src > main > webapp > web-inf > lib, the soba-webflow.xml file is giving me many errors. I googled this and saw similar errors, but I did not find a method to correct it in my case.
Please help.

Error 1 -




Error 2 -



Code snippet from the xml file -


 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd', because 1) could not find the document; 2) the document could not be
read; 3) the root element of the document is not <xsd:schema>.



That document isn't present at that location (you can verify by accessing it in your browser). Try pointing the schema location to a valid xsd.
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
THe XSD doesn't have to be on the internet for spring to work. The XSD can be inside a JAR file in the classpath. That JAR file needs to have a spring.schemas file that maps the URL to the XSD inside the JAR file THis document describes how Spring namespaces are handled


Generally, if you get an error from Spring that says that it can;t locate the namespace XSD, the problem is that you have a JAR file missing in your classpath (or you have merely misspelled something in the namespace declaration)

So,
1) DOuble check your name space declaration. There might be silly mistake
2) Look at your dependencies. You probably have a jar file missing. THis could happen if you have the wrong version of spring web flow.


Edit:

Ok my hunch was correct. I looked at your POM, and it has
<spring.webflow.version>2.3.3.RELEASE</spring.webflow.version>


So, you are using 2.3.3 release of spring web flow, but referring to 2.4.xsd. That's not going to work. You need to have the correct version.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic