Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Problem with Spring NamespaceHandler(Unable to locate Spring NamespaceHandler)
Problem with Spring NamespaceHandler [message #1715878] Fri, 27 November 2015 06:53 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi All,

I create simple Virgo Bundle which contains Spring context, when I add 3rd party namespace and deploy it to Virgo Jetty Server 3.6.4, the following exception keeps popping up:
[2015-11-27 13:28:42.842] start-signalling-1           <DE0006E> Start failed for bundle 'VirgoTestBundle' version '1.0.0'. org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.axonframework.org/schema/core]
Offending resource: URL [bundleentry://174.fwk1188502183/META-INF/spring/context.xml]

	at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
	at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
	at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:316)
	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1416)
	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1409)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
	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.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
	at org.eclipse.gemini.blueprint.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:170)
	at org.eclipse.gemini.blueprint.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:140)
	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:522)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:60)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:242)
	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:220)
	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:224)
	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:177)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:157)
	at org.eclipse.gemini.blueprint.extender.internal.activator.LifecycleManager$1.run(LifecycleManager.java:211)
	at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

[2015-11-27 13:28:42.852] start-signalling-1           <DE0010I> Stopping bundle 'VirgoTestBundle' version '1.0.0'. 
[2015-11-27 13:28:42.856] start-signalling-1           <DE0011I> Stopped bundle 'VirgoTestBundle' version '1.0.0'.


I also deploy the 3rd party jar as plan and as standalone, I even put it in the same plan as Virgo bundle and nothing works.

I create the same OSGI bundle from Eclipse Plug-in Project and run it using OSGI Framework launcer and it works fine.

Attached is the Virgo bundle & 3rd party jar.

Any help would be greatly appreciated.

Thanks & Regards,
Setya
Re: Problem with Spring NamespaceHandler [message #1716142 is a reply to message #1715878] Tue, 01 December 2015 16:36 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi All,

I've read that somewhere that this is a known issue caused by multiple version of Spring, but all I can find is Spring 3.1.0.RELEASE.

Any words, anyone ?

Thanks & Regards,
Setya
Re: Problem with Spring NamespaceHandler [message #1716229 is a reply to message #1716142] Wed, 02 December 2015 11:10 Go to previous messageGo to next message
daniel marthaler is currently offline daniel marthalerFriend
Messages: 77
Registered: April 2012
Location: Zürich
Member
Hi Setya

I have tried to deploy those Bundles you have provided in your previous post using Virgo for Tomcat Server 3.6.4 with Spring 3.1 and newest nightly builds using Spring 4.2.1 and I get the same error.

Doesn't the same exception occur when you build a standard application (non osgi)? For me it looks as if the axon core jar file does not specify the handlers properly.

Have you already checked by yourself if this problem does not relate to [1]?

[1] http://robert-reiz.com/2011/11/14/832/

Regards,
Dani
Re: Problem with Spring NamespaceHandler [message #1716270 is a reply to message #1716229] Wed, 02 December 2015 15:44 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi Daniel,

Thank you for time looking out my problem.
I've tried running the bundle w/o OSGI and it worked fine.
I even run it using OSGI launcher from Eclipse succesfully.
It's when deployed in Virgo that's problematic.

I've looked at your link. The error is the same,
but my jar doesn't have dependency over multiple Spring version.

Best Regards,
Setya
Re: Problem with Spring NamespaceHandler [message #1716361 is a reply to message #1716270] Thu, 03 December 2015 09:03 Go to previous messageGo to next message
daniel marthaler is currently offline daniel marthalerFriend
Messages: 77
Registered: April 2012
Location: Zürich
Member
Hi Setya

What are you exactly doing when you run "OSGi laucner from Eclipse"? Do you have Gemini Blueprint deployed as well?
Because if not the bundles might start but they are certainly not initialized by a Spring Context.

Regards,
Dani
Re: Problem with Spring NamespaceHandler [message #1716377 is a reply to message #1716361] Thu, 03 December 2015 11:11 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi Daniel,

I did nothing special when running from Eclipse's OSGI launcher, I just include the necessary bundles including Gemini Blueprint and I can see from log Spring contexts are initialized, services are published, etc.

The only difference is the Spring version which is 3.2.1 as opposed to Virgo's (3.1.0), but this shouldn't be a problem should it ?

Thanks & Regards,
Setya
Re: Problem with Spring NamespaceHandler [message #1716379 is a reply to message #1716377] Thu, 03 December 2015 11:34 Go to previous messageGo to next message
daniel marthaler is currently offline daniel marthalerFriend
Messages: 77
Registered: April 2012
Location: Zürich
Member
You can change the Spring Framework version in the User Region of Virgo as mentioned in the Virgo FAQ [1]. And the bundles of the Spring Framework for 3.2.1 version you can download from Spring EBR [2]. Or you could use the 3.2.5 version [3].
Remove the 3.1 bundles from [VIRGO_HOME]/repositories/ext and the .libd file and move the downloaded bundles in the ext repo. Follow [1] for detailed guidance and how to. If you do this on a Virgo installation which you have started before you replaced Spring Framework, make sure you start Virgo with the -clean option or manually delete the [VIRGO_HOME]/work folder.


[1] http://wiki.eclipse.org/Virgo/FAQ#How_can_I_change_the_version_of_Spring_framework_in_the_user_region.3F
[2] http://ebr.springsource.com/repository/app/library/version/detail?name=org.springframework.spring&version=3.2.1.RELEASE&searchType=librariesByName&searchQuery=spring
[3] http://ebr.springsource.com/repository/app/library/version/detail?name=org.springframework.spring&version=3.2.5.RELEASE&searchType=librariesByName&searchQuery=spring
Re: Problem with Spring NamespaceHandler [message #1716401 is a reply to message #1716379] Thu, 03 December 2015 13:55 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi Daniel,

Thank you for your suggestions. Will try this & get back to you with result.

Regards,
Setya
Re: Problem with Spring NamespaceHandler [message #1716490 is a reply to message #1716401] Fri, 04 December 2015 11:10 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi Daniel,

I've changed Spring version that comes with Virgo into 3.2.1 and the bundle got deployed successfully.

Thanks & Regards,
Setya
Re: Problem with Spring NamespaceHandler [message #1716645 is a reply to message #1716490] Mon, 07 December 2015 07:02 Go to previous message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi,

Just found out that if I deploy the same version of String in plugins and repository/ext, the error is back.

Thanks & Regards,

Setya
Previous Topic:Initial Bulk Hot Deploy
Next Topic:ServiceConfigurationError
Goto Forum:
  


Current Time: Tue Sep 25 19:16:02 GMT 2018

Powered by FUDForum. Page generated in 0.05558 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top