|
|
|
Thanks guys, I will try to get a fix for this in CVS today.
parent contexts are now searched for beans.
sorry, that previous comment was for another issue. Anyway, I check for abstract beans now. Give it a whirl and let me know if you still have problems.
applicationContext.xml
<bean id="midasSOAPInterface" class="cz.marbes.daisy.sysmodules.jconnection.MergedMidas" abstract="true"> <property name="bliMidas"><ref bean="midas"/></property> <property name="bliCommon"><ref bean="common"/></property> <property name="bliKernel3"><ref bean="kernel3"/></property> </bean> sap-servlet.xml 2005-11-29 11:45:21,213 ERROR [org.springframework.web.servlet.DispatcherServlet] - <Context initialization failed> One more comment:
Abstract bean in applicationContext HAS annotations, Maybe this help. OK, this should be better now. If you could test that would be great! Looking to do a release tomorrow morning, so hopefully you're around before then...
Cant test.
When all working I simply update the last xfire-all-1.0-SNAPSHOT.jar. (I do not use commons-attributes bean in my beans definition.) 2005-12-02 09:24:56,768 DEBUG [org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping] - <Rejected bean 'xfire.messageServiceFactory' since it has no WebService annotation> Simply put getBean(name) in try - catch and skip it all. String[] names = applicationContext.getBeanDefinitionNames(); The getBean() is already in a try/catch. Are you sure you got the latest jar? Try the M6 release. I added a unit test for this and it works fine.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
<bean id="webAnnotations" class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations"/>
<bean id="handlerMapping" class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping">
<property name="typeMappingRegistry" ref="xfire.typeMappingRegistry"/>
<property name="xfire" ref="xfire"/>
<property name="webAnnotations" ref="webAnnotations"/>
<property name="urlPrefix" value="/ws/"/>
</bean>
and I'm getting the NullPointerException:
Rejected bean 'org.springframework.web.servlet.handler.SimpleUrlHandlerMapping' since it has no WebService annotation
Rejected bean 'multipartResolver' since it has no WebService annotation
Rejected bean 'authorizationInterceptor' since it has no WebService annotation
...
Error creating bean with name 'handlerMapping' defined in ServletContext resource [/WEB-INF/applicationContext-webServices.xml]: Initialization of bean failed; nested exception is java.lang.NullPointerException: null
java.lang.NullPointerException
at org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations.hasWebServiceAnnotation(Jsr181WebAnnotations.java:27)
at org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping.initApplicationContext(Jsr181HandlerMapping.java:64)
If we peek into the org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations.hasWebServiceAnnotation(...) at line 27
we will see the following:
return clazz.isAnnotationPresent(WebService.class);
I persume that the clazz instance for abstract beans is null.