>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
[EMAIL PROTECTED]
19:21:24,562 INFO  [ClassPathXmlApplicationContext] Unable to locate
ApplicationEventMulticaster with name 'applicationEventMulticaster': using
default
[EMAIL PROTECTED]
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.

Reply via email to