2012-08-07 147 views
2

我想結合阿卡和春天(沒有成功)。 Basicly似乎不知我的申請犯規不會讀阿卡架構服務的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"> 

接下來還有一些豆類和阿卡演員的定義:

<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'. 

模式位於url:http://repo.akka.io/akka-1.3.1.xsd - 我可以在web瀏覽器中輕鬆打開它。

任何線索可能會有所幫助, 謝謝 馬立克。

回答

0

我使用我的春天豆XML schemaLocation屬性如下取得了成功:

http://akka.io/schema/akka http://akka.io/akka-1.3.1.xsd

如果您發現一個瀏覽器會導致下載提示而不是渲染結果,因此它可能與Spring正在尋找的內容更加兼容。

0

如果您轉移到新版本的Akka 2.2,Spring集成包已被刪除(您真的不需要它)。您應該實現一個UntypedActorFactory,一個Creator函數或一個IndirectActorProducer。

查看此博客文章瞭解更多信息; http://blog.nemccarthy.me/?p=272

+0

鏈接給出數據庫錯誤 – 2013-11-27 05:17:40

+0

鏈接看起來對我好 – NightWolf 2013-11-28 04:26:04

+0

是的,現在沒關係。 – 2013-11-29 06:41:16