我正在尝试将 akka 与 spring 结合起来(没有成功)。基本上,我的应用程序似乎不会以某种方式阅读 akka 模式
带有架构的 service-context.xml 的一部分:
<beans 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:akka="http://akka.io/schema/akka"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://akka.io/schema/akka http://repo.akka.io/akka-1.3.1.xsd">
接下来是一些beans和akka actor定义:
<akka:untyped-actor id="pushManager" autostart="false" implementation="com.myspace.messaging.PushManager"> </akka:untyped-actor>
在运行服务器时,我收到消息:
org.xml.sax.SAXParseException; lineNumber: 55; columnNumber: 143; schema_reference.4: Failed to read schema document 'http://repo.akka.io/akka-1.3.1.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>.
例外:
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 55 in XML document from class path resource [service-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 55; columnNumber: 143; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'akka:untyped-actor'.
Schema 位于 url 下:http ://repo.akka.io/akka-1.3.1.xsd - 我可以在网络浏览器中轻松打开它。
任何线索都可能有所帮助,谢谢马雷克。