Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: XFire and Spring 2.0 problems

  1. #1
    Join Date
    Jan 2006
    Location
    Monterrey, MEXICO
    Posts
    34

    Default XFire and Spring 2.0 problems

    Have any of you guys used XFire 1.2.2 with Spring 2.0 (final release)?

    I had an application that worked fine with Spring 1.2.8, but as soon as I replaced the spring.jar with the 2.0 one it stopped working.

    When I deploy the app to BEA Weblogic 9.2 I get this:

    Code:
    <Oct 4, 2006 10:04:16 AM CDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application '_appsdir_luna_dir' due to error weblogic.application.ModuleException: .
    weblogic.application.ModuleException: 
    	at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:295)
    	at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
    	at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
    	at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
    	at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    	Truncated. see log file for complete stacktrace
    java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory
    	at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
    	at weblogic.servlet.internal.WebAppHelper.addListenerElements(WebAppHelper.java:244)
    	at weblogic.servlet.internal.WebAppHelper$IOHelperImpl.parseXML(WebAppHelper.java:224)
    	at weblogic.descriptor.DescriptorCache.parseXML(DescriptorCache.java:324)
    	at weblogic.servlet.internal.WebAppHelper.registerTagLibListeners(WebAppHelper.java:174)
    	Truncated. see log file for complete stacktrace
    And when I deploy it to Apache Tomcat 5.5 I get this:

    Code:
    04 Oct 2006 13:51:40 ERROR org.springframework.web.context.ContextLoader - Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Unable to create namespace handler for: v2b
    Caused by: 
    org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Unable to create namespace handler for: v2b
    Caused by: 
    java.lang.IllegalStateException: Unable to create namespace handler for: v2b
    	at org.apache.xbean.spring.context.v2.XBeanV2Helper.createNamespaceHandler(XBeanV2Helper.java:48)
    	at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.<init>(XBeanNamespaceHandler.java:41)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:82)
    	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:59)
    	at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings(DefaultNamespaceHandlerResolver.java:122)
    	at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:96)
    	at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:82)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createDefaultNamespaceHandlerResolver(XmlBeanDefinitionReader.java:530)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createReaderContext(XmlBeanDefinitionReader.java:519)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:499)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:407)
    	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.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:123)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:91)
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:294)
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
    	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
    	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
    	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    .
    .
    .
    .
    So, is this a problem with XFire? Spring? something else?

    Has anyone had any luck with XFire and Spring 2.0?

  2. #2
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    The two stacktraces are unrelated. The first one is due to the fact that XFire depends on Woodstox, and instead is offered the BEA StAX parser.

    The second seems a XBean issue. I don't know if XBean is compatible with Spring 2.0, you might want to ask there.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  3. #3
    Join Date
    Oct 2006
    Posts
    1

    Default Spring 2.0 XFire XBean Problem

    Try using xbean-spring-2.5.jar; 2.6 seems not to work.

  4. #4
    Join Date
    Jan 2006
    Location
    Monterrey, MEXICO
    Posts
    34

    Default

    I think I'm sure I used xbean-spring-2.5.jar, and I just dropped the new spring.jar.

    I can confirm that later today but I don't think that's the real reason why this error is happening... thanks though.

  5. #5
    Join Date
    Oct 2006
    Location
    Helsinki
    Posts
    2

    Default

    Hi there, I've had no issues running xfire and spring 2.0.

    One thing I noticed was that since I use Maven2 some of the xbean components had some transitive dependences on Spring 1.2.x even though I had not requested the 1.2.x, if you're using Maven as your build tool, make sure you only have Spring 2 jars in your classpath other wise you'll have some problems starting your app.

  6. #6
    Join Date
    Oct 2006
    Posts
    3

    Default similar exception on appfuse1.9.3 with Spring 2.0 jars

    I'm seeing a simliar problem on the Appfuse 1.9.3 framework with Spring2.0 jars added. On pages where the <form:form> tag is used.
    Using: Java 1.5 Tomcat 5.5.17

    java.lang.ClassCastException: org.springframework.web.context.support.XmlWebAppl icationContext
    at org.springframework.web.servlet.support.RequestCon textUtils.getWebApplicationContext(RequestContextU tils.java:76)
    at org.springframework.web.servlet.support.RequestCon text.initContext(RequestContext.java:210)
    at org.springframework.web.servlet.support.JspAwareRe questContext.initContext(JspAwareRequestContext.ja va:75)
    at org.springframework.web.servlet.support.JspAwareRe questContext.(JspAwareRequestContext.java:49)
    at org.springframework.web.servlet.tags.RequestContex tAwareTag.doStartTag(RequestContextAwareTag.java:7 4)
    at org.apache.jsp.WEB_002dINF.pages.ndaForm_jsp._jspx _meth_form_form_0(ndaForm_jsp.java:106)
    at org.apache.jsp.WEB_002dINF.pages.ndaForm_jsp._jspS ervice(ndaForm_jsp.java:78)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    .........
    Last edited by VinceB; Oct 12th, 2006 at 04:03 PM. Reason: cut down the stack trace

  7. #7
    Join Date
    Oct 2006
    Posts
    3

    Default

    [QUOTE=VinceB;81016]I'm seeing a simliar problem on the Appfuse 1.9.3 framework with Spring2.0 jars added. On pages where the <form:form> tag is used.
    Using: Java 1.5 Tomcat 5.5.17


    NEVERMIND: Turns out that I missed one location and it was still using the Spring1.2.8 jars (lib/lib.properties)

  8. #8
    Join Date
    Oct 2006
    Location
    Weissach, Germany
    Posts
    1

    Cool Same Problem here

    Hi!

    I can confirm this issue. The xfire BookService example application runs well with Spring 1.2.6, but as soon as i replace it with the spring.jar from 2.0 I get the same error as Eliseo.
    I use the Eclipse IDE to build this project - no maven, no ant. There is no chance for the old spring.jar to be still in the classpath. I use TomCat 5.5.20. Maybe I have missed some dependencies for Spring 2.0?

    Kind regards,
    Balr0g

  9. #9
    Join Date
    Nov 2006
    Posts
    4

    Angry The same problem

    I was able to build a webservice (BookService) on XFire 1.2.2 and spring 1.2.8 without any problem. However, it won't work when I switch the spring 1.2.8 to sping 2.0. It complaints during class-Load about the Class not found: ...\beans\factory\support\ConfigurableBeanFactoryU tils.java.

    In spring 2.0, this class is not there. Is anybody know why this is gone? and Does this mean that XFire need to be fixed for this compatibilty issue?

    Thanks
    Peter

  10. #10
    Join Date
    Jan 2006
    Location
    Monterrey, MEXICO
    Posts
    34

    Default

    Thanks for providing more info Peter, let's see if we can finally know what's the deal with this problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •