Akka Spring integration

156 views
Skip to first unread message

voronoff

unread,
Jan 19, 2011, 10:32:50 AM1/19/11
to Akka User List
Hi,
I'm trying configure Akka with Spring:

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:akka="http://www.akka.io/schema/akka"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.akka.io/schema/akka
http://akka.io/akka-1.0.xsd">


<akka:typed-actor id="myActor"
interface="MyActor"
implementation="MyfActorImpl"
transactional="true"
timeout="1000"
scope="singleton" >

</akka:typed-actor>
</beans>

But I'm getting exception:

Caused by:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 27 in XML document from class path resource [amserver-akka-spring/
applicationContext-akka.xml] is invalid; nested exception is
org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching
wildcard is strict, but no declaration can be found for element
'akka:typed-actor'.
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:
396)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:
334)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:
302)
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:
203)
... 42 more
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
matching wildcard is strict, but no declaration can be found for
element 'akka:typed-actor'.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:
195)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:
131)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:
384)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:
318)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator
$XSIErrorReporter.reportError(XMLSchemaValidator.java:417)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:
3182)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:
1927)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:
705)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:
400)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:
648)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:
140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:
511)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:
808)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:
737)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:
119)
at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:
235)
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:
284)
at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:
75)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:
388)

Thank you
voronoff

√iktor Klang

unread,
Jan 19, 2011, 10:46:08 AM1/19/11
to akka...@googlegroups.com
Hi,

Knowing nothing about what version you are using, and how your project is set up there isn't much to say.

I suspect you shouldn't be using the 1.0.xsd nor the akka.io namespace since that's not released yet.

Googling your error message yields this: http://forum.springsource.org/showthread.php?t=51239

Does that help?


--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.




--
Viktor Klang,
Code Connoisseur
Work:   Scalable Solutions
Code:   github.com/viktorklang
Follow: twitter.com/viktorklang
Read:   klangism.tumblr.com

Kahli Burke

unread,
Jan 20, 2011, 3:31:46 PM1/20/11
to Akka User List


On Jan 19, 7:32 am, voronoff <voron...@gmail.com> wrote:
> Hi,
> I'm trying configure Akka with Spring:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:akka="http://www.akka.io/schema/akka"
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans
>        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>        http://www.akka.io/schema/akka
>        http://akka.io/akka-1.0.xsd">



Try this if you are using the 1.0-RC3 release:
xmlns:akka="http://www.akkasource.org/schema/akka"
http://www.akkasource.org/schema/akka http://akka.io/akka-1.0-RC3.xsd">

I believe the schema configuration you have is wrong.

Hope it helps,

Kahli

voronoff

unread,
Jan 23, 2011, 1:17:42 AM1/23/11
to Akka User List
Thank you for response, but still have exception:
Caused by:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Unable to locate Spring NamespaceHandler for
XML schema namespace [http://www.akkasource.org/schema/akka]
Offending resource: class path resource [amserver-akka-spring/
applicationContext-akka.xml]


thank you

voronoff

On Jan 20, 10:31 pm, Kahli Burke <kahli.bu...@wintermutesys.com>
wrote:
> On Jan 19, 7:32 am, voronoff <voron...@gmail.com> wrote:
>
> > Hi,
> > I'm trying configure Akka with Spring:
>
> > <beans xmlns="http://www.springframework.org/schema/beans"
> >        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >        xmlns:akka="http://www.akka.io/schema/akka"
> >        xsi:schemaLocation="
> >        http://www.springframework.org/schema/beans
> >        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
> >        http://www.akka.io/schema/akka
> >        http://akka.io/akka-1.0.xsd">
>
> Try this if you are using the 1.0-RC3 release:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xmlns:akka="http://www.akkasource.org/schema/akka"
>   xsi:schemaLocation="
>    http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>    http://www.akkasource.org/schema/akkahttp://akka.io/akka-1.0-RC3.xsd">

√iktor Klang

unread,
Jan 23, 2011, 5:40:48 AM1/23/11
to akka...@googlegroups.com

We have moved the schema to akka.io for RC5, please read the migration docs when migrating versions.

Thanks!

On Jan 23, 2011 7:17 AM, "voronoff" <voro...@gmail.com> wrote:

Thank you for response, but still have exception:
Caused by:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Unable to locate Spring NamespaceHandler for
XML schema namespace [http://www.akkasource.org/schema/akka]
Offending resource: class path resource [amserver-akka-spring/
applicationContext-akka.xml]


thank you

voronoff

On Jan 20, 10:31 pm, Kahli Burke <kahli.bu...@wintermutesys.com>
wrote:

> On Jan 19, 7:32 am, voronoff <voron...@gmail.com> wrote:
>
> > Hi,

> > I'm trying configure Akka w...

>
> I believe the schema configuration you have is wrong.
>
> Hope it helps,
>
> Kahli

--
You rece...

Reply all
Reply to author
Forward
0 new messages