Announcement Announcement Module
Collapse
No announcement yet.
XFire and Spring 2.0 problems Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      Spring 2.0 XFire XBean Problem

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

      Comment


      • #4
        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.

        Comment


        • #5
          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.

          Comment


          • #6
            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, 05:03 PM. Reason: cut down the stack trace

            Comment


            • #7
              [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)

              Comment


              • #8
                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

                Comment


                • #9
                  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

                  Comment


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

                    Comment


                    • #11
                      Problem is gone!

                      Today, I have switched back from sping 1.2.8 to sping 2.0 and somehow, the problem is gone and it works. I think it may be caused by unstable Tomcat 5.5.20, which I have used as my server or my unstable eclipse3.2 since I deploy and run Tomcat inside my eclipse.

                      So far, I have used following jar files:
                      xfire-all-1.2.2.jar; xbean-spring-2.7.jar; xbean-2.1.0.jar ... etc.

                      Comment


                      • #12
                        Originally posted by peter2liu View Post
                        So far, I have used following jar files:
                        xfire-all-1.2.2.jar; xbean-spring-2.7.jar; xbean-2.1.0.jar ... etc.
                        Where did you find xbean-spring-2.7.jar? I can't seem to find it in neither Spring 2.0 nor XFire 1.2.2

                        Comment


                        • #13
                          You could find the related xbean2.7-spring.jar and xbean2.7-spring-common.jar at location: http://goopen.org/confluence/display...0/21/XBean+2.7

                          or

                          http://people.apache.org/repo/m2-ibi.../apache/xbean/

                          Cheers!

                          Comment


                          • #14
                            Thanks Peter, I tried with the new versions you kindly provided but I'm still getting that same error when deploying to Weblogic 9.2

                            java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory
                            at javax.xml.stream.XMLInputFactory.newInstance(XMLIn putFactory.java:136)

                            Also the development forums in BEA Support aren't specially helpful , anyway, I'll let you guys know what happens.

                            Comment


                            • #15
                              I recommend to all the people that have problems with XFire and Weblogic 9.2 to post their experiences in the BEA forums:

                              http://forums.bea.com/bea/forum.jspa?forumID=2055

                              I already posted my own topic, let's see how that goes:

                              http://forums.bea.com/bea/thread.jsp...6867#600046867

                              Comment

                              Working...
                              X