You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by wazoo999 <wa...@mail.ru> on 2007/03/23 16:35:07 UTC

JBoss Integration Issues (TxNamespaceHandler does not implement the NamespaceHandler interface)

JBoss: 4.0.5 or 4.2.0
ServiceMix: 3.1
Deployer: 3.1-incubating SVN trunk

Followed the directions taken from
http://incubator.apache.org/servicemix/jboss-deployer.html.
After copying the libs from SERVICEMIX_HOME/lib to the appropriate jboss
directory and starting jboss started getting exceptions dealing with
jacc.PolicyConfigurationFactory, fixed this by adding the
"-Djavax.security.jacc.PolicyConfigurationFactory.provider=org.jboss.security.jacc.JBossPolicyConfigurationFactory"
line to the jboss run script (I guess this should be added to the wiki to
save time).

When it came to deploying the servicemix xbean configurations that's when
everything started to get interesting. Whatever I put into the
servicemix-sm.xml results in a long chain of exceptions.

The cause for the exceptions chain is the following exception:
java.lang.IllegalArgumentException: Class
[org.springframework.transaction.config.TxNamespaceHandler] does not
implement the NamespaceHandler interface.

Basically even very simple config. file results in such exceptions. 
Here's the example config:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
	     xmlns:foo="http://servicemix.org/demo/">
</beans>

Is there anything that can be done to fix this???

Here's the full stack-trace:
2007-03-23 17:10:32,750 ERROR [org.jboss.deployment.MainDeployer] Could not
create deployment:
file:/C:/java/jboss-4.0.5.GA/server/default/deploy/servicemix-sm.xml
org.jboss.deployment.DeploymentException: ServiceMix deployer unable to
deploy: org.jboss.deployment.DeploymentInfo@987fd14c {
url=file:/C:/java/jboss-4.0.5.GA/server/default/deploy/servicemix-sm.xml }
  deployer: org.servicemix.jboss.deployment.JBIDeployer@329572
  status: null
  state: CREATE_DEPLOYER
  watch:
file:/C:/java/jboss-4.0.5.GA/server/default/deploy/servicemix-sm.xml
  altDD: null
  lastDeployed: 1174662632140
  lastModified: 1174662632125
  mbeans:
; - nested throwable: (javax.management.RuntimeMBeanException)
	at org.servicemix.jboss.deployment.JBIDeployer.create(JBIDeployer.java:115)
	at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
	at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
	at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
	at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
	at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
	at $Proxy8.deploy(Unknown Source)
	at
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
	at
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
	at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
	at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
	at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: javax.management.RuntimeMBeanException
	at
org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:176)
	at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
	at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
	at org.servicemix.jboss.deployment.JBIDeployer.create(JBIDeployer.java:109)
	... 21 more
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Unexpected exception parsing XML document from URL
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/servicemix-sm.xml];
nested exception is java.lang.IllegalArgumentException: Class
[org.springframework.transaction.config.TxNamespaceHandler] does not
implement the NamespaceHandler interface
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:427)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
	at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
	at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
	at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:168)
	at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
	at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefinitions(ClassPathXmlApplicationContext.java:180)
	at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:292)
	at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
	at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
	at
org.servicemix.jboss.deployment.JBIService.installServiceMixXml(JBIService.java:160)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	... 26 more
Caused by: java.lang.IllegalArgumentException: Class
[org.springframework.transaction.config.TxNamespaceHandler] does not
implement the NamespaceHandler interface
	at
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings(DefaultNamespaceHandlerResolver.java:119)
	at
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:96)
	at
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:82)
	at
org.apache.xbean.spring.context.v2.XBeanNamespaceHandlerResolver.<init>(XBeanNamespaceHandlerResolver.java:26)
	at
org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.createDefaultNamespaceHandlerResolver(XBeanXmlBeanDefinitionReader.java:87)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createReaderContext(XmlBeanDefinitionReader.java:519)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:499)
	at
org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:407)
	... 43 more

-- 
View this message in context: http://www.nabble.com/JBoss-Integration-Issues-%28TxNamespaceHandler-does-not-implement-the-NamespaceHandler-interface%29-tf3454583s12049.html#a9637342
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: JBoss Integration Issues (TxNamespaceHandler does not implement the NamespaceHandler interface)

Posted by Guillaume Nodet <gn...@gmail.com>.
You should use the JBI packaging to deploy things on to ServiceMix
container.
Using the xml configuration file only will always lead to classpath errors,
unless
you modify the SAR or jboss class loader to include the necessary libraries.

Another way would be to use the apache-servicemix-web distribution.

On 3/27/07, wazoo999 <wa...@mail.ru> wrote:
>
>
> >The servicemix-core, servicemix-jbi and servicemix-services libraries
> >don't need to be copied because they're bundled in the SAR file.
>
> If I don't copy them the core libraries then whenever I try to deploy a
> sample configuration jboss can't find the supporting component classes
> (such
> as PollingComponentSupport for the file-binding example). I've tested this
> in a fresh jboss installation and although these libraries are indeed
> located in the SAR file and are extracted into temp folder when deployer
> SAR
> is deployed, JBoss doesn't seem to notice them.
>
> >The error above is telling you that Spring was unable to convert the
> >string name 'outbox' defined in the directory property to a
> >java.io.File (i.e., a directory on the filesystem). Have you manually
> >created the directory named outbox that is required by the filebinding
> >configuration? And how about the inbox directory? Also, do you have a
> >a file that matches the pattern defined in the fileName property of
> >the DefaultFileMarshaler?
>
> Yes, I've created all folders and files and placed them where they are
> supposed to be and this generated the exception I've showed previously.
>
> ----
>
> I then took the following steps to see what can be wrong and created the
> following sample configuration files. Deploying the following
> configuration
> file resulted in the following infos and warnings. As I'm not familiar
> with
> what should be output on successful config deployments, here's the output
> as
> well.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
> xmlns:foo="http://servicemix.org/demo/">
>         <sm:container id="jbi" useMBeanServer="false"
> createMBeanServer="false">
>                 <sm:activationSpecs>
>                         <!-- Empty config to test -->
>                 </sm:activationSpecs>
>         </sm:container>
> </beans>
>
> 19:21:24,171 INFO  [JBIDeployer] Init ServiceMix JBI Component:
> file:/C:/java/jboss-4.0.5.GA/server/default/deploy/test-bind-sm.xml
> 19:21:24,171 INFO  [JBIDeployer] Init Watcher
> 19:21:24,171 INFO  [JBIDeployer] Init LoaderRepository
> 19:21:24,171 INFO  [JBIDeployer] ServiceMix deployer passing deployment to
> JBI container
> [file:/C:/java/jboss-4.0.5.GA/server/default/deploy/test-bind-sm.xml]
> 19:21:24,171 INFO  [JBIService] Creating ServiceMix JBI installer from XML
> [file:/C:/java/jboss-4.0.5.GA/server/default/deploy/test-bind-sm.xml]
> 19:21:24,312 INFO  [XBeanXmlBeanDefinitionReader] Loading XML bean
> definitions from URL
> [file:/C:/java/jboss-4.0.5.GA/server/default/deploy/test-bind-sm.xml]
> 19:21:24,562 INFO  [ClassPathXmlApplicationContext] Bean factory for
> application context
> [org.apache.xbean.spring.context.ClassPathXmlApplicationContext
> ;hashCode=4329028]:
> org.springframework.beans.factory.support.DefaultListableBeanFactory
> defining beans [jbi]; root of BeanFactory hierarchy
> 19:21:24,562 INFO  [ClassPathXmlApplicationContext] 1 beans defined in
> application context
> [org.apache.xbean.spring.context.ClassPathXmlApplicationContext
> ;hashCode=4329028]
> 19:21:24,562 INFO  [ClassPathXmlApplicationContext] Unable to locate
> MessageSource with name 'messageSource': using default
> [org.springframework.context.support.DelegatingMessageSource@7148e9]
> 19:21:24,562 INFO  [ClassPathXmlApplicationContext] Unable to locate
> ApplicationEventMulticaster with name 'applicationEventMulticaster': using
> default
> [
> org.springframework.context.event.SimpleApplicationEventMulticaster@169c9a2
> ]
> 19:21:24,562 INFO  [DefaultListableBeanFactory] Pre-instantiating
> singletons
> in factory
> [org.springframework.beans.factory.support.DefaultListableBeanFactory
> defining beans [jbi]; root of BeanFactory hierarchy]
> 19:21:24,578 INFO  [JBIContainer] ServiceMix 3.1-incubating JBI Container
> (ServiceMix) is starting
> 19:21:24,578 INFO  [JBIContainer] For help or more informations please
> see:
> http://incubator.apache.org/servicemix/
> 19:21:24,578 WARN  [ManagementContext] Failed to start rmi registry: Port
> already in use: 1099; nested exception is:        java.net.BindException:
> Address already in use: JVM_Bind
> 19:21:24,593 WARN  [ManagementContext] Failed to start jmx connector:
> Cannot
> bind to URL [rmi://localhost:1099/jmxrmi]:
> javax.naming.CommunicationException [Root exception is
> java.rmi.ConnectIOException: non-JRMP server at remote endpoint]
> 19:21:24,593 INFO  [ComponentMBeanImpl] Initializing component:
> #SubscriptionManager#
> 19:21:24,593 INFO  [DeploymentService] Restoring service assemblies
> 19:21:24,609 WARN  [ClientFactory] Cound not start ClientFactory:
> javax.naming.NameNotFoundException: env not bound
> 19:21:24,640 INFO  [JBIContainer] ServiceMix JBI Container (ServiceMix)
> started
>
> -----
>
> After that I added the file poller component into the configuration file,
> which resulted in a BeanCreationException exception.
> This exception replaces the one I had yesterday (String to File
> conversion)
> after I replaced the file.value property with an absolute url instead of
> the
> relative one.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
> xmlns:foo="http://servicemix.org/demo/">
>         <sm:container id="jbi" useMBeanServer="false"
> createMBeanServer="false">
>                 <sm:activationSpecs>
>                         <sm:activationSpec componentName="filePoller"
> service="foo:filePoller">
>                                 <sm:component>
>                                         <bean class="
> org.apache.servicemix.components.file.FilePoller">
>                                                 <property name="file"
> value="c:/java/test/inbox" />
>                                                 <property name="period"
> value="1000" />
>                                         </bean>
>                                 </sm:component>
>                         </sm:activationSpec>
>
>                 </sm:activationSpecs>
>         </sm:container>
> </beans>
>
>
> ...
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'jbi' defined in URL
> [file:/C:/java/jboss-4.0.5.GA/server/default/deploy/one-bind-sm.xml]:
> Invocation of init method failed; nested exception is
> java.lang.IllegalArgumentException: Component name: filePoller is bound to
> an object which is not a JBI component, it is of type:
> org.apache.servicemix.components.file.FilePoller
>         at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
> (AbstractAutowireCapableBeanFactory.java:1027)
>         at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
> (AbstractAutowireCapableBeanFactory.java:421)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
> AbstractBeanFactory.java:245)
>         at
>
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
> (DefaultSingletonBeanRegistry.java:140)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> AbstractBeanFactory.java:242)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> AbstractBeanFactory.java:156)
>         at
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
> (DefaultListableBeanFactory.java:273)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(
> AbstractApplicationContext.java:346)
>         at
> org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(
> ClassPathXmlApplicationContext.java:161)
>         at
> org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(
> ClassPathXmlApplicationContext.java:51)
>         at
> org.servicemix.jboss.deployment.JBIService.installServiceMixXml(
> JBIService.java:160)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(
> ReflectedDispatcher.java:155)
>         ... 26 more
> Caused by: java.lang.IllegalArgumentException: Component name: filePoller
> is
> bound to an object which is not a JBI component, it is of type:
> org.apache.servicemix.components.file.FilePoller
>         at
> org.apache.servicemix.jbi.container.JBIContainer.activateComponent(
> JBIContainer.java:1000)
>         at
> org.apache.servicemix.jbi.container.SpringJBIContainer.afterPropertiesSet(
> SpringJBIContainer.java:68)
>         at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
> (AbstractAutowireCapableBeanFactory.java:1057)
>         at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
> (AbstractAutowireCapableBeanFactory.java:1024)
>         ... 41 more
>
>
> --
> View this message in context:
> http://www.nabble.com/JBoss-Integration-Issues-%28TxNamespaceHandler-does-not-implement-the-NamespaceHandler-interface%29-tf3454583s12049.html#a9696409
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: JBoss Integration Issues (TxNamespaceHandler does not implement the NamespaceHandler interface)

Posted by wazoo999 <wa...@mail.ru>.
>The servicemix-core, servicemix-jbi and servicemix-services libraries
>don't need to be copied because they're bundled in the SAR file.

If I don't copy them the core libraries then whenever I try to deploy a
sample configuration jboss can't find the supporting component classes (such
as PollingComponentSupport for the file-binding example). I've tested this
in a fresh jboss installation and although these libraries are indeed
located in the SAR file and are extracted into temp folder when deployer SAR
is deployed, JBoss doesn't seem to notice them.

>The error above is telling you that Spring was unable to convert the
>string name 'outbox' defined in the directory property to a
>java.io.File (i.e., a directory on the filesystem). Have you manually
>created the directory named outbox that is required by the filebinding
>configuration? And how about the inbox directory? Also, do you have a
>a file that matches the pattern defined in the fileName property of
>the DefaultFileMarshaler?

Yes, I've created all folders and files and placed them where they are
supposed to be and this generated the exception I've showed previously.

----

I then took the following steps to see what can be wrong and created the
following sample configuration files. Deploying the following configuration
file resulted in the following infos and warnings. As I'm not familiar with
what should be output on successful config deployments, here's the output as
well.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
xmlns:foo="http://servicemix.org/demo/">
	<sm:container id="jbi" useMBeanServer="false" createMBeanServer="false">
		<sm:activationSpecs>
			<!-- Empty config to test -->
		</sm:activationSpecs>
	</sm:container>
</beans>

19:21:24,171 INFO  [JBIDeployer] Init ServiceMix JBI Component:
file:/C:/java/jboss-4.0.5.GA/server/default/deploy/test-bind-sm.xml
19:21:24,171 INFO  [JBIDeployer] Init Watcher
19:21:24,171 INFO  [JBIDeployer] Init LoaderRepository
19:21:24,171 INFO  [JBIDeployer] ServiceMix deployer passing deployment to
JBI container
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/test-bind-sm.xml]
19:21:24,171 INFO  [JBIService] Creating ServiceMix JBI installer from XML
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/test-bind-sm.xml]
19:21:24,312 INFO  [XBeanXmlBeanDefinitionReader] Loading XML bean
definitions from URL
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/test-bind-sm.xml]
19:21:24,562 INFO  [ClassPathXmlApplicationContext] Bean factory for
application context
[org.apache.xbean.spring.context.ClassPathXmlApplicationContext;hashCode=4329028]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [jbi]; root of BeanFactory hierarchy
19:21:24,562 INFO  [ClassPathXmlApplicationContext] 1 beans defined in
application context
[org.apache.xbean.spring.context.ClassPathXmlApplicationContext;hashCode=4329028]
19:21:24,562 INFO  [ClassPathXmlApplicationContext] Unable to locate
MessageSource with name 'messageSource': using default
[org.springframework.context.support.DelegatingMessageSource@7148e9]
19:21:24,562 INFO  [ClassPathXmlApplicationContext] Unable to locate
ApplicationEventMulticaster with name 'applicationEventMulticaster': using
default
[org.springframework.context.event.SimpleApplicationEventMulticaster@169c9a2]
19:21:24,562 INFO  [DefaultListableBeanFactory] Pre-instantiating singletons
in factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [jbi]; root of BeanFactory hierarchy]
19:21:24,578 INFO  [JBIContainer] ServiceMix 3.1-incubating JBI Container
(ServiceMix) is starting
19:21:24,578 INFO  [JBIContainer] For help or more informations please see:
http://incubator.apache.org/servicemix/
19:21:24,578 WARN  [ManagementContext] Failed to start rmi registry: Port
already in use: 1099; nested exception is:        java.net.BindException:
Address already in use: JVM_Bind
19:21:24,593 WARN  [ManagementContext] Failed to start jmx connector: Cannot
bind to URL [rmi://localhost:1099/jmxrmi]:
javax.naming.CommunicationException [Root exception is
java.rmi.ConnectIOException: non-JRMP server at remote endpoint]
19:21:24,593 INFO  [ComponentMBeanImpl] Initializing component:
#SubscriptionManager#
19:21:24,593 INFO  [DeploymentService] Restoring service assemblies
19:21:24,609 WARN  [ClientFactory] Cound not start ClientFactory:
javax.naming.NameNotFoundException: env not bound
19:21:24,640 INFO  [JBIContainer] ServiceMix JBI Container (ServiceMix)
started

-----

After that I added the file poller component into the configuration file,
which resulted in a BeanCreationException exception.
This exception replaces the one I had yesterday (String to File conversion)
after I replaced the file.value property with an absolute url instead of the
relative one.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
xmlns:foo="http://servicemix.org/demo/">
	<sm:container id="jbi" useMBeanServer="false" createMBeanServer="false">
		<sm:activationSpecs>
			<sm:activationSpec componentName="filePoller" service="foo:filePoller">
				<sm:component>
					<bean class="org.apache.servicemix.components.file.FilePoller">
						<property name="file" value="c:/java/test/inbox" />
						<property name="period" value="1000" />
					</bean>
				</sm:component>
			</sm:activationSpec>

		</sm:activationSpecs>
	</sm:container>
</beans>


...
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'jbi' defined in URL
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/one-bind-sm.xml]:
Invocation of init method failed; nested exception is
java.lang.IllegalArgumentException: Component name: filePoller is bound to
an object which is not a JBI component, it is of type:
org.apache.servicemix.components.file.FilePoller
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1027)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
        at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
        at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
        at
org.servicemix.jboss.deployment.JBIService.installServiceMixXml(JBIService.java:160)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        ... 26 more
Caused by: java.lang.IllegalArgumentException: Component name: filePoller is
bound to an object which is not a JBI component, it is of type:
org.apache.servicemix.components.file.FilePoller
        at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1000)
        at
org.apache.servicemix.jbi.container.SpringJBIContainer.afterPropertiesSet(SpringJBIContainer.java:68)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1057)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1024)
        ... 41 more


-- 
View this message in context: http://www.nabble.com/JBoss-Integration-Issues-%28TxNamespaceHandler-does-not-implement-the-NamespaceHandler-interface%29-tf3454583s12049.html#a9696409
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: JBoss Integration Issues (TxNamespaceHandler does not implement the NamespaceHandler interface)

Posted by Bruce Snyder <br...@gmail.com>.
On 3/26/07, wazoo999 <wa...@mail.ru> wrote:
>
> >Try the steps above that I noted to create a clean installation of
> >ServiceMix and let's see what results you see before pursuing these
> >exceptions.
>
> I followed your advice and deployed the
> servicemix-jboss-deployer-3.1-incubating.sar into the fresh jboss
> installation. Then I copied a handful of libraries into the shared lib
> folder. These are the libs I copied:
>
> servicemix-audit-3.1-incubating.jar
> servicemix-beanflow-3.1-incubating.jar
> servicemix-components-3.1-incubating.jar
> servicemix-core-3.1-incubating.jar
> servicemix-jbi-3.1-incubating.jar
> servicemix-services-3.1-incubating.jar

The servicemix-core, servicemix-jbi and servicemix-services libraries
don't need to be copied because they're bundled in the SAR file.

> Then I copied the following components into the deploy directory, so far so
> good.
> servicemix-shared-3.1-incubating-installer.zip
> servicemix-file-3.1-incubating-installer.zip
>
> To test how everything works I copied the file-binding example configuration
> file (modifying it as told in the faq). As a result I got the following
> exception (although a completely different then before):
>
> Jboss's 'Failed to deploy exception message' ....
...
> Error setting property values; nested exception is
> org.springframework.beans.PropertyBatchUpdateException; nested
> PropertyAccessExceptions (2) are:
> PropertyAccessException 1: org.springframework.beans.TypeMismatchException:
> Failed to convert property value of type [java.lang.String] to required type
> [java.io.File] for property 'directory'; nested exception is
> java.lang.IllegalArgumentException: Could not retrieve File for class path
> resource [outbox]: class path resource [outbox] cannot be resolved to URL
> because it does not exist
> PropertyAccessException 2: org.springframework.beans.TypeMismatchException:
> Failed to convert property value of type
> [org.apache.servicemix.components.util.DefaultFileMarshaler] to required
> type [org.apache.servicemix.components.util.FileMarshaler] for property
> 'marshaler'; nested exception is java.lang.IllegalArgumentException: No
> matching editors or conversion strategy found

The error above is telling you that Spring was unable to convert the
string name 'outbox' defined in the directory property to a
java.io.File (i.e., a directory on the filesystem). Have you manually
created the directory named outbox that is required by the filebinding
configuration? And how about the inbox directory? Also, do you have a
a file that matches the pattern defined in the fileName property of
the DefaultFileMarshaler?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/

Re: JBoss Integration Issues (TxNamespaceHandler does not implement the NamespaceHandler interface)

Posted by wazoo999 <wa...@mail.ru>.
>Try the steps above that I noted to create a clean installation of
>ServiceMix and let's see what results you see before pursuing these
>exceptions.

I followed your advice and deployed the
servicemix-jboss-deployer-3.1-incubating.sar into the fresh jboss
installation. Then I copied a handful of libraries into the shared lib
folder. These are the libs I copied:

servicemix-audit-3.1-incubating.jar
servicemix-beanflow-3.1-incubating.jar
servicemix-components-3.1-incubating.jar
servicemix-core-3.1-incubating.jar
servicemix-jbi-3.1-incubating.jar
servicemix-services-3.1-incubating.jar

Then I copied the following components into the deploy directory, so far so
good.
servicemix-shared-3.1-incubating-installer.zip
servicemix-file-3.1-incubating-installer.zip

To test how everything works I copied the file-binding example configuration
file (modifying it as told in the faq). As a result I got the following
exception (although a completely different then before):

Jboss's 'Failed to deploy exception message' ....

Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'jbi' defined in URL
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/servicemix-sm.xml]:
Cannot create inner bean '(inner bean)' while setting bean property
'activationSpecs' with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)' defined in URL
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/servicemix-sm.xml]:
Cannot create inner bean 'org.apache.servicemix.components.file.FileWriter'
while setting constructor argument with index 0; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.servicemix.components.file.FileWriter' defined in URL
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/servicemix-sm.xml]:
Error setting property values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type [java.lang.String] to required type
[java.io.File] for property 'directory'; nested exception is
java.lang.IllegalArgumentException: Could not retrieve File for class path
resource [outbox]: class path resource [outbox] cannot be resolved to URL
because it does not exist
PropertyAccessException 2: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type
[org.apache.servicemix.components.util.DefaultFileMarshaler] to required
type [org.apache.servicemix.components.util.FileMarshaler] for property
'marshaler'; nested exception is java.lang.IllegalArgumentException: No
matching editors or conversion strategy found
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:207)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:116)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:268)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:132)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
	at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
	at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
	at
org.servicemix.jboss.deployment.JBIService.installServiceMixXml(JBIService.java:160)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	... 72 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name '(inner bean)' defined in URL
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/servicemix-sm.xml]:
Cannot create inner bean 'org.apache.servicemix.components.file.FileWriter'
while setting constructor argument with index 0; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.servicemix.components.file.FileWriter' defined in URL
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/servicemix-sm.xml]:
Error setting property values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type [java.lang.String] to required type
[java.io.File] for property 'directory'; nested exception is
java.lang.IllegalArgumentException: Could not retrieve File for class path
resource [outbox]: class path resource [outbox] cannot be resolved to URL
because it does not exist
PropertyAccessException 2: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type
[org.apache.servicemix.components.util.DefaultFileMarshaler] to required
type [org.apache.servicemix.components.util.FileMarshaler] for property
'marshaler'; nested exception is java.lang.IllegalArgumentException: No
matching editors or conversion strategy found
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:207)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:111)
	at
org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:321)
	at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:97)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:684)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:622)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:381)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:200)
	... 92 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.servicemix.components.file.FileWriter'
defined in URL
[file:/C:/java/jboss-4.0.5.GA/server/default/deploy/servicemix-sm.xml]:
Error setting property values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type [java.lang.String] to required type
[java.io.File] for property 'directory'; nested exception is
java.lang.IllegalArgumentException: Could not retrieve File for class path
resource [outbox]: class path resource [outbox] cannot be resolved to URL
because it does not exist
PropertyAccessException 2: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type
[org.apache.servicemix.components.util.DefaultFileMarshaler] to required
type [org.apache.servicemix.components.util.FileMarshaler] for property
'marshaler'; nested exception is java.lang.IllegalArgumentException: No
matching editors or conversion strategy found
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:970)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:417)
	at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:200)
	... 99 more
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type [java.lang.String] to required type
[java.io.File] for property 'directory'; nested exception is
java.lang.IllegalArgumentException: Could not retrieve File for class path
resource [outbox]: class path resource [outbox] cannot be resolved to URL
because it does not exist
PropertyAccessException 2: org.springframework.beans.TypeMismatchException:
Failed to convert property value of type
[org.apache.servicemix.components.util.DefaultFileMarshaler] to required
type [org.apache.servicemix.components.util.FileMarshaler] for property
'marshaler'; nested exception is java.lang.IllegalArgumentException: No
matching editors or conversion strategy found
	at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:97)
	at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:965)


I guess I haven't copied some supporting library, but which one is a mystery
to me.
-- 
View this message in context: http://www.nabble.com/JBoss-Integration-Issues-%28TxNamespaceHandler-does-not-implement-the-NamespaceHandler-interface%29-tf3454583s12049.html#a9670045
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: JBoss Integration Issues (TxNamespaceHandler does not implement the NamespaceHandler interface)

Posted by Bruce Snyder <br...@gmail.com>.
On 3/23/07, wazoo999 <wa...@mail.ru> wrote:
>
> JBoss: 4.0.5 or 4.2.0
> ServiceMix: 3.1
> Deployer: 3.1-incubating SVN trunk
>
> Followed the directions taken from
> http://incubator.apache.org/servicemix/jboss-deployer.html.
> After copying the libs from SERVICEMIX_HOME/lib to the appropriate jboss
> directory and starting jboss started getting exceptions dealing with
> jacc.PolicyConfigurationFactory, fixed this by adding the
> "-Djavax.security.jacc.PolicyConfigurationFactory.provider=org.jboss.security.jacc.JBossPolicyConfigurationFactory"
> line to the jboss run script (I guess this should be added to the wiki to
> save time).

I'm not sure why you'd need to set the
PolicyConfigurationFactory.provider above. Probably because too many
libraries were copied from the ServiceMix lib and lib/optional
directories.

I just deployed the servicemix-jboss-deployer-3.1-incubating.sar by
copying it into the JBoss 4.0.5 deploy directory and it started up
right away. Then I deployed some JBI components from the ServiceMix
3.1 JBI components directory by copying them to the JBoss deploy
directory as well. Finally I copied a few JBI service assemblies (SAs)
that I have created that utilize the JBI components I copied. All
three of these operations took place without incident.

The directions on the ServiceMix JBoss Deployer page need to be
clarified a bit more. The only libraries that you need to copy are:

1) JBI components from ServiceMix that you'd like to use. These are
found in the ServiceMix components directory, e.g.,
servicemix-jms-3.1-incubating-installer.zip,
servicemix-saxon-3.1-incubating-installer.zip, etc.

2) Any libraries in support of the JBI components you are deploying.

There is no need to copy contents of the entire ServiceMix lib
directory and lib/optional directory.

> When it came to deploying the servicemix xbean configurations that's when
> everything started to get interesting. Whatever I put into the
> servicemix-sm.xml results in a long chain of exceptions.
>
> The cause for the exceptions chain is the following exception:
> java.lang.IllegalArgumentException: Class
> [org.springframework.transaction.config.TxNamespaceHandler] does not
> implement the NamespaceHandler interface.

Try the steps above that I noted to create a clean installation of
ServiceMix and let's see what results you see before pursuing these
exceptions.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/