配置问题:无法找到XML架构命名空间的Spring NamespaceHandler [urn:infinispan:config:7.0]

时间:2016-01-13 06:21:04

标签: java spring spring-mvc infinispan

我正在测试infinispan缓存嵌入模式。 但是它发生在springframework中......但是在独立模式下它是可以的......

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [urn:infinispan:config:7.0]
Offending resource: file [C:\dev\ide\eGovFrameDev-3.5.1-64bit\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\demo\WEB-INF\classes\egovframework\spring\com\context-infinispan.xml]

    at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
    at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]

1 个答案:

答案 0 :(得分:0)

是的,这可能是由类路径问题或缺少架构位置引起的(请参阅this link for reference)。

所以,为了解决这个问题,我建议检查:

  • 如果它正确部署到您的容器(不使用IDE)
  • 检查private async void AddPic_OnClick(object sender, RoutedEventArgs e) { FileOpenPicker openPicker = new FileOpenPicker(); openPicker.ViewMode = PickerViewMode.Thumbnail; openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary; openPicker.FileTypeFilter.Clear(); openPicker.FileTypeFilter.Add(".bmp"); openPicker.FileTypeFilter.Add(".jpg"); openPicker.FileTypeFilter.Add(".jpeg"); openPicker.FileTypeFilter.Add(".png"); // Launch file open picker and caller app is suspended and may be terminated var file = await openPicker.PickSingleFileAsync(); if (file != null) { var loadImage = new BitmapImage(); using (var stream = await file.OpenReadAsync()) { await loadImage.SetSourceAsync(stream); } img.Source = loadImage; _imageFilePath= file.Path; } } 是否正确

但是,如果它仍然不起作用 - 你能不能把你的Spring配置XML和你的pom(ant或gradle文件)粘贴我?