You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by UBorba <cl...@gmail.com> on 2006/08/10 18:44:29 UTC

Re: error msg: INFO: Loading XML bean definitions from class path resour


bsnyder wrote:
> 
> On 8/10/06, UBorba <cl...@gmail.com> wrote:
> 
> 
> The key to the error above is the FileNotFoundException which states
> that the servicemix.xml file cannot be found. How are you starting
> ServiceMix?
> 
> 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://incubator.apache.org/activemq/
> Apache ServiceMix - http://incubator.apache.org/servicemix/
> Castor - http://castor.org/
> 
> 
I'm doint it via command line:
<prompt> C:\jbi\servicemix\3.0-M2\apache-servicemix-3.0-M2-incubating\bin 
servicemix.bat

and to send message with the client:
[code]
public class MyClient {
    public static void main(String[] args) throws Exception {
        BeanFactory context = new
ClassPathXmlApplicationContext("servicemix.xml");
        ServiceMixClient client = (ServiceMixClient)
context.getBean("client");
        MessageExchange msgExchange = client.createInOutExchange();

        NormalizedMessage inMessage = msgExchange.getMessage("in");
        inMessage.setProperty("action", "update");
        inMessage.setProperty("entity", "user.role");
        client.sendSync(msgExchange);
        NormalizedMessage outMessage = msgExchange.getMessage("out");
        StringSource src = (StringSource) outMessage.getContent();
        src.getText();
    }

}
[/code]

Thanks for any help.
-- 
View this message in context: http://www.nabble.com/error-msg%3A-INFO%3A-Loading-XML-bean-definitions-from-class-path-resource---tf2084999.html#a5748067
Sent from the ServiceMix - User forum at Nabble.com.


Re: error msg: INFO: Loading XML bean definitions from class path resour

Posted by UBorba <cl...@gmail.com>.
Thanks people, this helped me to solve some errors.
But now I'm working in another error, the stacktrace:

10/08/2006 17:16:33 org.springframework.core.CollectionFactory <clinit>
INFO: JDK 1.4+ collections available
10/08/2006 17:16:33 org.springframework.core.CollectionFactory <clinit>
INFO: Commons Collections 3.x available
10/08/2006 17:16:33
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [servicemix.xml]
10/08/2006 17:16:34
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver
initHandlerMappings
INFO: Ignoring handler
[org.apache.xbean.spring.context.v2.XBeanNamespaceHandler]: class not found
Exception in thread "main"
org.springframework.beans.factory.BeanDefinitionStoreException: Error
'Unable to locate NamespaceHandler for namespace
[http://servicemix.org/config/1.0].' in resource 'class path resource
[servicemix.xml]' at:
null
	at
org.springframework.beans.factory.xml.FailFastProblemReporter.error(FailFastProblemReporter.java:46)
	at
org.springframework.beans.factory.support.ReaderContext.error(ReaderContext.java:69)
	at
org.springframework.beans.factory.support.ReaderContext.error(ReaderContext.java:60)
	at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1083)
	at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
	at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:544)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:339)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:314)
	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.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
	at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:278)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
	at jm.jbi.MyClient.main(MyClient.java:13)



Thanks for any help.
-- 
View this message in context: http://www.nabble.com/error-msg%3A-INFO%3A-Loading-XML-bean-definitions-from-class-path-resource---tf2084999.html#a5752137
Sent from the ServiceMix - User forum at Nabble.com.


Re: error msg: INFO: Loading XML bean definitions from class path resour

Posted by Guillaume Nodet <gn...@gmail.com>.
I think the problem is in the way you launch your client.
The client does not have the required classpath to find
the servicemix.xml configuration file.

On 8/10/06, UBorba <cl...@gmail.com> wrote:
>
>
>
> bsnyder wrote:
> >
> > On 8/10/06, UBorba <cl...@gmail.com> wrote:
> >
> >
> > The key to the error above is the FileNotFoundException which states
> > that the servicemix.xml file cannot be found. How are you starting
> > ServiceMix?
> >
> > 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://incubator.apache.org/activemq/
> > Apache ServiceMix - http://incubator.apache.org/servicemix/
> > Castor - http://castor.org/
> >
> >
> I'm doint it via command line:
> <prompt> C:\jbi\servicemix\3.0-M2\apache-servicemix-3.0-M2-incubating\bin
> servicemix.bat
>
> and to send message with the client:
> [code]
> public class MyClient {
>     public static void main(String[] args) throws Exception {
>         BeanFactory context = new
> ClassPathXmlApplicationContext("servicemix.xml");
>         ServiceMixClient client = (ServiceMixClient)
> context.getBean("client");
>         MessageExchange msgExchange = client.createInOutExchange();
>
>         NormalizedMessage inMessage = msgExchange.getMessage("in");
>         inMessage.setProperty("action", "update");
>         inMessage.setProperty("entity", "user.role");
>         client.sendSync(msgExchange);
>         NormalizedMessage outMessage = msgExchange.getMessage("out");
>         StringSource src = (StringSource) outMessage.getContent();
>         src.getText();
>     }
>
> }
> [/code]
>
> Thanks for any help.
> --
> View this message in context:
> http://www.nabble.com/error-msg%3A-INFO%3A-Loading-XML-bean-definitions-from-class-path-resource---tf2084999.html#a5748067
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet