You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by chsekhar <ch...@gmail.com> on 2012/08/28 23:25:24 UTC

Servicemix 3.4 isolated classloading

http://servicemix.396122.n5.nabble.com/file/n5714284/cxf-wsdl-first.zip
cxf-wsdl-first.zip Hi,

We have multiple service assemblies deployed on one service mix 3.4
instance. What we are trying to accomplish is to separate log files per
assembly. I am thinking it would be possible if can make come configuration
to have isolated classloader for each service assembly. I went thru the link
below and tried a few things.

http://servicemix.apache.org/classloaders.html

I tried setting <classpath inverse="true"/> in service engine xbean.xml.
First thing I 
http://servicemix.396122.n5.nabble.com/file/n5714284/cxf-wsdl-first.zip
cxf-wsdl-first.zip notice is I couldnt figure out which scema this element
belongs to. I included the changed and deployed the assembly anyways and
after I deployed I got the following exception. (I am using the
"cxf-wsdl-first" which is in the examples folder to experiment. I had
uploaded the file anyways) At this point, I was wondering if I would be able
to achieve separated log files for each assembly. (For me, upgrading service
mix to 4.0 is not an option). 



ERROR - DefaultComponent               - Configuration problem: Bean class
[org.apache.servicemix.samples.wsdl_first.PersonImpl] not found
Offending resource: file
[/Users/chan5120/Documents/servicemix/apache-servicemix-3.4.0/data/smx/service-assemblies/wsdl-first-cxf-sa/version_6/sus/servicemix-cxf-se/wsdl-first-cxfse-su/xbean.xml]
Bean ''; nested exception is java.lang.ClassNotFoundException:
org.apache.servicemix.samples.wsdl_first.PersonImpl in classloader
org.apache.xbean.spring.context.FileSystemXmlApplicationContext@3f9ab1bf - 
WARN  - FileSystemXmlApplicationContext - Exception thrown from
ApplicationListener handling ContextClosedEvent - 
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized
- call 'refresh' before multicasting events via the context:
org.apache.xbean.spring.context.FileSystemXmlApplicationContext@3f9ab1bf:
startup date [Tue Aug 28 15:27:58 CDT 2012]; root of context hierarchy
	at
org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:316)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
	at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1007)
	at
org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
	at
org.springframework.context.support.AbstractApplicationContext.destroy(AbstractApplicationContext.java:958)
	at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:105)
	at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:86)
	at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
	at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:543)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:345)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:255)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:648)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:63)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:612)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
WARN  - FileSystemXmlApplicationContext - Exception thrown from
LifecycleProcessor on context close - 
java.lang.IllegalStateException: LifecycleProcessor not initialized - call
'refresh' before invoking lifecycle methods via the context:
org.apache.xbean.spring.context.FileSystemXmlApplicationContext@3f9ab1bf:
startup date [Tue Aug 28 15:27:58 CDT 2012]; root of context hierarchy
	at
org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:329)
	at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1015)
	at
org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
	at
org.springframework.context.support.AbstractApplicationContext.destroy(AbstractApplicationContext.java:958)
	at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:105)
	at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:86)
	at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
	at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:543)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:345)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:255)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:648)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:63)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:612)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
ERROR - DefaultComponent               - BeanFactory not initialized or
already closed - call 'refresh' before accessing beans via the
ApplicationContext - 
INFO  - ServerImpl                     - Setting the server's publish
address to be http://localhost:8092/PersonService/ - 
INFO  - DeploymentService              - UnDeployed ServiceUnit
wsdl-first-cxfbc-su from Component: servicemix-cxf-bc - 
ERROR - AutoDeploymentService          - Failed to update Service Assembly:
wsdl-first-cxf-sa - 
java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
version="1.0">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message">
	<component-name>servicemix-cxf-se</component-name>
	<component-task-result-details>
		<task-result-details>
			<task-id>deploy</task-id>
			<task-result>FAILED</task-result>
			<message-type>ERROR</message-type>
			<task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Could not deploy xbean service unit</loc-message>
</msg-loc-info>
</task-status-msg>
			<exception-info>
				<nesting-level>1</nesting-level>
				<msg-loc-info>
					<loc-token/>
					<loc-message>Configuration problem: Bean class
[org.apache.servicemix.samples.wsdl_first.PersonImpl] not found
Offending resource: file
[/Users/chan5120/Documents/servicemix/apache-servicemix-3.4.0/data/smx/service-assemblies/wsdl-first-cxf-sa/version_6/sus/servicemix-cxf-se/wsdl-first-cxfse-su/xbean.xml]
Bean ''; nested exception is java.lang.ClassNotFoundException:
org.apache.servicemix.samples.wsdl_first.PersonImpl in classloader
org.apache.xbean.spring.context.FileSystemXmlApplicationContext@3f9ab1bf</loc-message>



--
View this message in context: http://servicemix.396122.n5.nabble.com/Servicemix-3-4-isolated-classloading-tp5714284.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.