I've had a chance to start digging into this error a little and so far have determined that the null reference is related to the JBIContainer "container" object in the ManagementContext class.
Have I missed some configuration where the ManagementContext needs to be instantiated/initialized explicitly? I chopped the exception below before it referenced the class I am using to instantiate the non-validating XmlBeanDefinitionReader. Perhaps I should be using a different class to read the configuration XML? It doesn't seem to work at all with the Extended Spring XML... Regards, Matthew -----Original Message----- From: Sami Dalouche [mailto:[EMAIL PROTECTED] Sent: 06 September 2005 14:34 To: [email protected]; Matthew Clark Cc: [email protected] Subject: Re: [servicemix-user] Example needed - instantiating ServiceMix Client Are you really, really sure (log the output to a file 2>error.txt) that the initial exception does not come from a standard spring bean, that refuses to load for some reason, and with the whole hiearchy of calls, ends up as a NullException in the JBI container ? My NullException problem was caused by that, really make sure it is not the problem. Regards, Sami Dalouche Selon Matthew Clark <[EMAIL PROTECTED]>: > Hi there - it would be really useful to have a full example/test showing > how to instantiate the ServiceMix client using the Spring XML - extended > or pure would be great. > > > > I have tried to get this working several different ways including > creating my own listener in order to turn off the validation for the > extended Spring XML using both the current release of Spring and the > development release included with service mix but always end up with the > exception below. I know the JBI Container has been instantiated because > I can get the "jbi" bean and list the component names etc. > > > > > > INFO - org.servicemix.jbi.container.JBIContainer - Activating component > for: > [container=defaultJBI,name=ID:redback-40370-1125972377587-0:18,id=ID:red > back-40370-1125972377587-0:18] with service: null component: > [EMAIL PROTECTED] > > > > ERROR - org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'client' defined in file > [/usr/local/jakarta-tomcat-5.0.28/webapps/NDServe/WEB-INF/applicationCon > text.xml]: Instantiation of bean failed; nested exception is > org.springframework.beans.FatalBeanException: Could not instantiate > class [org.servicemix.client.DefaultServiceMixClient]; constructor threw > exception; nested exception is java.lang.NullPointerException: null > > org.springframework.beans.FatalBeanException: Could not instantiate > class [org.servicemix.client.DefaultServiceMixClient]; constructor threw > exception; nested exception is java.lang.NullPointerException: null > > java.lang.NullPointerException > > at > org.servicemix.jbi.management.ManagementContext.getRelativeName(Manageme > ntContext.java:408) > > at > org.servicemix.jbi.management.ManagementContext.createObjectName(Managem > entContext.java:388) > > at > org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer > .java:875) > > at > org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer > .java:838) > > at > org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer > .java:800) > > at > org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer > .java:748) > > at > org.servicemix.client.DefaultServiceMixClient.<init>(DefaultServiceMixCl > ient.java:69) > > at > org.servicemix.client.DefaultServiceMixClient.<init>(DefaultServiceMixCl > ient.java:59) > > at > sun.reflect.GeneratedConstructorAccessor75.newInstance(Unknown Source) > > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons > tructorAccessorImpl.java:27) > > at > java.lang.reflect.Constructor.newInstance(Constructor.java:274) > > at > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) > > at > org.springframework.beans.factory.support.SimpleInstantiationStrategy.in > stantiate(SimpleInstantiationStrategy.java:75) > > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac > tory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:669) > > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac > tory.createBean(AbstractAutowireCapableBeanFactory.java:329) > > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab > stractBeanFactory.java:226) > > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab > stractBeanFactory.java:147) > > ..... chopped > > > > > > > > > > This message has been scanned for viruses. > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
