Announcement Announcement Module
Collapse
No announcement yet.
Weblogic porting issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weblogic porting issue

    Hi,
    Iam trying to port my service running fine in tomcat to weblogic. I read through the topics discussed and did the following. (My WLS version is 9.1)

    1) Introduced a weblogic.xml in WEB-INF/. with the below said description.

    Code:
              <!-- This is required for weblogic server -->
            <weblogic-web-app>
                <container-descriptor>
                <prefer-web-inf-classes>true</prefer-web-inf-classes>
                </container-descriptor>
            </weblogic-web-app>
    2) Downloaded Axis 2 to get access to the following resources.
    (Easiest way to get the dependent jars found inside the lib of axis 2)
    Code:
    <!-- To Make Weblogic work with the application-->
    
    		<dependency>
    			<groupId>xerces</groupId>
    			<artifactId>xerces</artifactId>
    			<version>2.8.1</version>
    		</dependency>
    		<dependency>
    			<groupId>xalan</groupId>
    			<artifactId>xalan</artifactId>
    			<version>2.7.0</version>
    		</dependency>
    		<dependency>
    			<groupId>xml-apis</groupId>
    			<artifactId>xml-apis</artifactId>
    			<version>1.3.03</version>
    		</dependency>
    		<dependency>
    			<groupId>stax-api</groupId>
    			<artifactId>stax-api</artifactId>
    			<version>1.0.1</version>
    		</dependency>
    3) After doing the above i added the line in my spring context/application xml

    Code:
    <bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory">
        	<property name="payloadCaching" value="true"/>
    	</bean>
    4) When i tried invoking the WSDL from the url it gave me CLASSDEFOUND for "SOAP11Factory". Hence included
    Code:
    <dependency>
    		<groupId>axiom-impl</groupId>
    			<artifactId>axiom-impl</artifactId>
    			<version>1.2.4</version>
    		</dependency>
    Which gave rise to CLASSDEFOUND "SOAPFactory" hence included
    Code:
    <dependency>
    		<groupId>axiom-api</groupId>
    			<artifactId>axiom-api</artifactId>
    			<version>1.2.4</version>
    		</dependency>
    Which gives me
    Code:
    java.lang.ClassCastException: weblogic.xml.stax.XMLStreamInputFactory
    Did i do the right steps ? If not please help me resolve this.

    Thanks and warm regards
    Vignesh

  • #2
    Full trace
    Code:
    [org.springframework.ws.soap.axiom.AxiomSoapMessageFactory]: Constructor threw exception; nested exception is java.lang.ClassCastException: weblogic.xml.stax.XMLStreamInputFactory
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:451)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
            Truncated. see log file for complete stacktrace
    org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.ws.soap.axiom.AxiomSoapMessageFactory]: Constructor threw exception; nested exception is java.lang.ClassCastException: weblogic.xml.stax.XMLStreamInputFactory
            at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
            at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:759)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:724)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:387)
            Truncated. see log file for complete stacktrace
    java.lang.ClassCastException: weblogic.xml.stax.XMLStreamInputFactory
            at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
            at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.<init>(AxiomSoapMessageFactory.java:97)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            Truncated. see log file for complete stacktrace

    Comment


    • #3
      With a little searching in the Spring-WS forum I found up this thread. I think it's related. More specifically, take a look at http://forums.bea.com/bea/message.js...05929&tstart=0

      Comment


      • #4
        Hi Arjen,
        I did those steps and still didnt help me.
        I can put the step by step process and the errors occurred.

        Finally landed here again.
        Code:
        Caused by: java.lang.ClassCastException: weblogic.xml.stax.XMLStreamInputFactory
        	at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
        	at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.(AxiomSoapMessageFactory.java:89)
        Thanks
        Vignesh

        Comment


        • #5
          Did you also add WoodStox as a dependency? I think Axis2 depends on it.

          Comment


          • #6
            Hi Arjen,
            I think iam completely confused.
            I ported the echo.war from spring-ws.1.0rc1 into weblogic 9.1
            I got the error as shown in http://static.springframework.org/sp...j-nosuchmethod

            Hence added the following as given in the site.

            Code:
            <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
                	<property name="messageFactory"  ref="sunMessageFactory"/>
            	</bean>  
                
                <bean id="sunMessageFactory"
            		class="com.sun.xml.messaging.saaj.soap.MessageFactoryImpl">
            	</bean>
            at the spring-ws-servlet.xml.

            Now I get

            Code:
            java.lang.NoSuchMethodError: javax.xml.soap.SOAPElement.getElementQName()Ljavax/xml/namespace/QName;
                    at org.springframework.ws.soap.saaj.Saaj13Implementation.getName(Saaj13Implementation.java:65)
            What steps to make the service work ?
            (The WSDL was generated properly)

            Thanks
            Vignesh

            Comment


            • #7
              Hi Arjen,
              I tried using the Axiom provider.

              Hence included
              Code:
              	<bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory">
                  	<property name="payloadCaching" value="true"/>
              	</bean>
              into the **-servlet.xml.

              And added the following in the POM.

              Code:
              <dependency>
              			<groupId>axiom-impl</groupId>
              			<artifactId>axiom-impl</artifactId>
              			<version>1.2.4</version>
              		</dependency>
              		
              		<dependency>
              			<groupId>axiom-api</groupId>
              			<artifactId>axiom-api</artifactId>
              			<version>1.2.4</version>
              		</dependency>
              When i invoke the service I get the following error.

              Here is the request sent from SOAP UI.

              Code:
              <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:echo="http://www.springframework.org/spring-ws/samples/echo">
                 <soapenv:Header/>
                 <soapenv:Body>
                    <echo:echoRequest>vignesh</echo:echoRequest>
                 </soapenv:Body>
              </soapenv:Envelope>
              Here is the response from the server.

              Code:
              <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
                 <soapenv:Body>
                    <soapenv:Fault>
                       <faultcode>soapenv:Server</faultcode>
                       <faultstring xmlns:lang="en">java.lang.IllegalArgumentException: Local name may not be null or empty</faultstring>
                    </soapenv:Fault>
                 </soapenv:Body>
              </soapenv:Envelope>

              Here is the server error trace.

              Code:
              2007-06-14 11:21:13,780 DEBUG [org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor] - Request: <echo:echoRequest xmlns:echo="http://www.springframework.org/spring-ws/samples/echo">vignesh</echo:echoRequest>
              2007-06-14 11:21:13,780 DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - Testing endpoint adapter [org.springframework.ws.server.endpoint.adapter.MessageEndpointAdapter@1843ea1]
              2007-06-14 11:21:13,780 DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - Testing endpoint adapter [org.springframework.ws.server.endpoint.adapter.PayloadEndpointAdapter@12bd56c]
              ERROR:  'Local name may not be null or empty'
              2007-06-14 11:21:13,782 DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - Testing endpoint exception resolver [org.springframework.ws.soap.server.endpoint.SimpleSoapExceptionResolver@c8d74b]
              2007-06-14 11:21:13,782 WARN [org.springframework.ws.soap.server.SoapMessageDispatcher] - Endpoint invocation resulted in exception - responding with SOAP Fault
              javax.xml.transform.TransformerException: java.lang.IllegalArgumentException: Local name may not be null or empty
                      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:647)
                      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
                      at org.springframework.ws.server.endpoint.adapter.PayloadEndpointAdapter.invoke(PayloadEndpointAdapter.java:48)
                      at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:198)
                      at ****
                      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:426)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
                      at ***
                      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
                      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
                      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
                      at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
              Caused by: java.lang.IllegalArgumentException: Local name may not be null or empty
                      at org.apache.axiom.om.impl.llom.OMAttributeImpl.<init>(OMAttributeImpl.java:49)
                      at org.apache.axiom.om.impl.llom.OMElementImpl.addAttribute(OMElementImpl.java:526)
                      ... 23 more
              ---------
              java.lang.IllegalArgumentException: Local name may not be null or empty
                      at org.apache.axiom.om.impl.llom.OMAttributeImpl.<init>(OMAttributeImpl.java:49)
                      at 
                      at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:145)
                      at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:84)
                      at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:56)
                      at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:123)
                      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:461)
                      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:426)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
                      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
                      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
                      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
                      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
                      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
                      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
                      at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
              2007-06-14 11:21:13,784 DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - MessageDispatcher with name 'spring-ws' sends response [org.springframework.ws.soap.axiom.AxiomSoapMessage@131cfec] for request [org.springframework.ws.soap.axiom.AxiomSoapMessage@1f543bb]
              2007-06-14 11:21:13,785 DEBUG [org.springframework.ws.transport.http.MessageDispatcherServlet] - Successfully completed request
              Any help to solve this would be appreciated.

              Thanks
              Vignesh

              Comment


              • #8
                Originally posted by [email protected] View Post
                Now I get

                Code:
                java.lang.NoSuchMethodError: javax.xml.soap.SOAPElement.getElementQName()Ljavax/xml/namespace/QName;
                        at org.springframework.ws.soap.saaj.Saaj13Implementation.getName(Saaj13Implementation.java:65)
                What steps to make the service work ?
                Can you please be a bit more specific as to what you're using, it's starting to get a bit confusing with so many different questions

                First the SAAJ problem: I think you're still bundling the SAAJ 1.3 jar with your application. javax.xml.soap.SOAPElement.getElementQName() is part of SAAJ 1.3. Weblogic 9 doesn't support SAAJ 1.3, it supports SAAJ 1.1. So you need to drop saaj-api-1.3.jar and saaj-impl-1.3.jar and use the ones provided by BEA. There should be a line in you log, saying something like: "Creating SAAJ 1.1 MessageFactory". Don't try to use WebLogic 9 with SAAJ 1.3 (as you did by specifying a different message factory), I don't think that will work.

                Next, the AXIOM problem: that looks like an AXIOM problem, and it could be due to outdated libraries in WebLogic. Consider using WoodStox, StAX API 1.0.1, and a recent javax.xml.namespace.QName. Besides these suggestions, I have no solution for you.

                Comment


                • #10
                  I've tried to get past this error, but haven't had any luck. Here's the error.

                  Code:
                  Error 500--Internal Server Error 
                  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageFactory' defined in ServletContext resource [/WEB-INF/wcrf-ws-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.ws.soap.axiom.AxiomSoapMessageFactory]: Constructor threw exception; nested exception is javax.xml.stream.FactoryConfigurationError: Provider com.ctc.wstx.stax.WstxInputFactory not found
                  Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.ws.soap.axiom.AxiomSoapMessageFactory]: Constructor threw exception; nested exception is javax.xml.stream.FactoryConfigurationError: Provider com.ctc.wstx.stax.WstxInputFactory not found
                  Caused by: javax.xml.stream.FactoryConfigurationError: Provider com.ctc.wstx.stax.WstxInputFactory not found
                  	at javax.xml.stream.FactoryFinder.newInstance(Ljava.lang.String;Ljava.lang.ClassLoader;)Ljava.lang.Object;(FactoryFinder.java:72)
                  	at javax.xml.stream.FactoryFinder.find(Ljava.lang.String;Ljava.lang.String;Ljava.lang.ClassLoader;)Ljava.lang.Object;(FactoryFinder.java:165)
                  	at javax.xml.stream.FactoryFinder.find(Ljava.lang.String;Ljava.lang.String;)Ljava.lang.Object;(FactoryFinder.java:92)
                  	at javax.xml.stream.XMLInputFactory.newInstance()Ljavax.xml.stream.XMLInputFactory;(XMLInputFactory.java:136)
                  	at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.()V(AxiomSoapMessageFactory.java:89)
                  	at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
                  	at jrockit.reflect.EmptyConstructorInvoker.newInstance([Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
                  	at java.lang.reflect.Constructor.newInstance([Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
                  	at org.springframework.beans.BeanUtils.instantiateClass(Ljava.lang.reflect.Constructor;[Ljava.lang.Object;)Ljava.lang.Object;(BeanUtils.java:85)
                  	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(Lorg.springframework.beans.factory.support.RootBeanDefinition;Ljava.lang.String;Lorg.springframework.beans.factory.BeanFactory;)Ljava.lang.Object;(SimpleInstantiationStrategy.java:61)
                  	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(Ljava.lang.String;Lorg.springframework.beans.factory.support.RootBeanDefinition;)Lorg.springframework.beans.BeanWrapper;(AbstractAutowireCapableBeanFactory.java:759)
                  	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(Ljava.lang.String;Lorg.springframework.beans.factory.support.RootBeanDefinition;[Ljava.lang.Object;)Lorg.springframework.beans.BeanWrapper;(AbstractAutowireCapableBeanFactory.java:724)
                  	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(Ljava.lang.String;Lorg.springframework.beans.factory.support.RootBeanDefinition;[Ljava.lang.Object;)Ljava.lang.Object;(AbstractAutowireCapableBeanFactory.java:387)
                  	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject()Ljava.lang.Object;(AbstractBeanFactory.java:251)
                  	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(Ljava.lang.String;Lorg.springframework.beans.factory.ObjectFactory;)Ljava.lang.Object;(DefaultSingletonBeanRegistry.java:156)
                  	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ljava.lang.String;Ljava.lang.Class;[Ljava.lang.Object;)Ljava.lang.Object;(AbstractBeanFactory.java:248)
                  	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ljava.lang.String;)Ljava.lang.Object;(AbstractBeanFactory.java:160)
                  	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons()V(DefaultListableBeanFactory.java:287)
                  	at org.springframework.context.support.AbstractApplicationContext.refresh()V(AbstractApplicationContext.java:352)
                  	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(Lorg.springframework.web.context.WebApplicationContext;)Lorg.springframework.web.context.WebApplicationContext;(FrameworkServlet.java:330)
                  	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext()Lorg.springframework.web.context.WebApplicationContext;(FrameworkServlet.java:266)
                  	at org.springframework.web.servlet.FrameworkServlet.initServletBean()V(FrameworkServlet.java:236)
                  	at org.springframework.web.servlet.HttpServletBean.init()V(HttpServletBean.java:126)
                  	at javax.servlet.GenericServlet.init(Ljavax.servlet.ServletConfig;)V(GenericServlet.java:258)
                  	at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run()Ljava.lang.Object;(ServletStubImpl.java:1018)
                  	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321)
                  	at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:118)
                  	at weblogic.servlet.internal.ServletStubImpl.createServlet()Ljavax.servlet.Servlet;(ServletStubImpl.java:894)
                  	at weblogic.servlet.internal.ServletStubImpl.createInstances()V(ServletStubImpl.java:873)
                  	at weblogic.servlet.internal.ServletStubImpl.prepareServlet(Lweblogic.servlet.internal.RequestCallback;)V(ServletStubImpl.java:812)
                  	at weblogic.servlet.internal.ServletStubImpl.getServlet(Lweblogic.servlet.internal.RequestCallback;)Ljavax.servlet.Servlet;(ServletStubImpl.java:535)
                  	at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:373)
                  I have the following in my *-servlet.xml. I added some properities hoping that may help, but didn't seem to work.

                  Code:
                  	<bean id="messageFactory"
                  		class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory">
                  		<property name="payloadCaching" value="true" />
                  		<property name="javax.xml.stream.XMLInputFactory" value="com.ctc.wstx.stax.WstxInputFactory" />
                    	    <property name="javax.xml.stream.XMLOutputFactory" value="com.ctc.wstx.stax.WstxOutputFactory" />
                  		<property name="javax.xml.stream.XMLEventFactory" value="com.ctc.wstx.stax.evt.WstxEventFactory" />		
                  	</bean>

                  Here's all the jar's in my lib directory

                  Code:
                  07/01/2007  05:36 PM             4,467 aopalliance-1.0.jar
                  07/01/2007  08:58 PM           140,003 axiom-api-1.2.4.jar
                  07/01/2007  08:58 PM           146,438 axiom-dom-1.2.4.jar
                  07/01/2007  08:58 PM           117,755 axiom-impl-1.2.4.jar
                  07/01/2007  05:36 PM            52,915 commons-logging-1.1.jar
                  07/01/2007  10:19 PM             2,173 jax-1_1-fr-qname-class.jar
                  07/01/2007  05:36 PM           358,085 log4j-1.2.12.jar
                  07/01/2007  05:36 PM           303,344 spring-aop-2.0.5.jar
                  07/01/2007  05:36 PM           388,627 spring-beans-2.0.5.jar
                  07/01/2007  05:36 PM           159,838 spring-context-2.0.5.jar
                  07/01/2007  05:36 PM           180,362 spring-core-2.0.5.jar
                  07/01/2007  05:36 PM            52,140 spring-oxm-1.0-rc2.jar
                  07/01/2007  05:36 PM           151,714 spring-web-2.0.5.jar
                  07/01/2007  05:36 PM           283,090 spring-webmvc-2.0.5.jar
                  07/01/2007  05:36 PM           285,491 spring-ws-core-1.0-rc2.jar
                  07/01/2007  05:36 PM            67,669 spring-xml-1.0-rc2.jar
                  07/01/2007  05:36 PM            26,514 stax-api-1.0.1.jar
                  07/01/2007  05:36 PM           148,522 wsdl4j-1.6.1.jar
                  07/01/2007  09:30 PM           480,763 wstx-asl-3.2.1.jar
                  06/30/2007  08:03 PM         3,078,601 xalan.jar
                  06/30/2007  08:03 PM         1,223,877 xercesImpl.jar
                  06/30/2007  08:03 PM           194,354 xml-apis.jar
                  I'm using weblogic 8.1 SP3 and this can not be changed. Thanks.

                  Comment


                  • #11
                    Weblogic is probably still using its built-in STAX parsers, and not Woodstox. Make sure that you are using Woodstox, by setting the system properties defined in this document: https://svn.codehaus.org/woodstox/ws...se-notes/USAGE, i.e.:

                    Code:
                    System.setProperty("javax.xml.stream.XMLInputFactory",
                      "com.ctc.wstx.stax.WstxInputFactory");
                    System.setProperty("javax.xml.stream.XMLOutputFactory",
                      "com.ctc.wstx.stax.WstxOutputFactory");
                    System.setProperty("javax.xml.stream.XMLEventFactory",
                      "com.ctc.wstx.stax.WstxEventFactory");
                    or alternatively set it up in Weblogic.

                    Comment


                    • #12
                      I'm revisting this after implementing using SAAJ. I'd really like to use axiom, but I'm missing something.

                      I'm in a shared environment, so I have to change the system properties for my application only. How do I change these properties so AxiomSoapMessageFactory can find them?

                      Comment


                      • #13
                        I set the properties by extending the AxiomSoapMessageFactory. If someone knows a better way, please share.

                        Code:
                        import org.springframework.ws.soap.axiom.AxiomSoapMessageFactory;
                        
                        public class TestAxiomSoapMessageFactory extends AxiomSoapMessageFactory {
                        
                        	static {
                        		System.setProperty("javax.xml.stream.XMLInputFactory",
                        		  "com.ctc.wstx.stax.WstxInputFactory");
                        		System.setProperty("javax.xml.stream.XMLOutputFactory",
                        		  "com.ctc.wstx.stax.WstxOutputFactory");
                        		System.setProperty("javax.xml.stream.XMLEventFactory",
                        		  "com.ctc.wstx.stax.WstxEventFactory");
                        	}
                        
                        	public TestAxiomSoapMessageFactory() {
                        		super();
                        	}
                        }
                        Now i'm getting the following error when payloadCaching is false

                        Code:
                        	<bean id="messageFactory" class="com.testing.ws.TestAxiomSoapMessageFactory">
                            	<property name="payloadCaching" value="false"/>
                        	</bean>
                        Code:
                        java.lang.NullPointerException
                                at org.springframework.xml.stream.AbstractStaxXmlReader.parse()V(Abstrac
                        tStaxXmlReader.java:69)
                                at org.springframework.xml.stream.AbstractStaxXmlReader.parse(Lorg.xml.s
                        ax.InputSource;)V(AbstractStaxXmlReader.java:49)
                                at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.validate(Ljava
                        x.xml.transform.Source;Ljavax.xml.transform.Result;)V(Unknown Source)
                                at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Ljavax.xml.t
                        ransform.Source;Ljavax.xml.transform.Result;)V(Unknown Source)
                                at javax.xml.validation.Validator.validate(Ljavax.xml.transform.Source;)
                        V(Unknown Source)
                                at org.springframework.xml.validation.Jaxp13ValidatorFactory$Jaxp13Valid
                        ator.validate(Ljavax.xml.transform.Source;)[Lorg.xml.sax.SAXParseException;(Jaxp
                        13ValidatorFactory.java:60)
                                at org.springframework.ws.server.endpoint.interceptor.AbstractValidating
                        Interceptor.handleRequest(Lorg.springframework.ws.context.MessageContext;Ljava.l
                        ang.Object;)Z(AbstractValidatingInterceptor.java:142)
                                at org.springframework.ws.server.MessageDispatcher.dispatch(Lorg.springf
                        ramework.ws.context.MessageContext;)V(MessageDispatcher.java:202)
                                at org.springframework.ws.server.MessageDispatcher.receive(Lorg.springfr
                        amework.ws.context.MessageContext;)V(MessageDispatcher.java:157)
                                at org.springframework.ws.transport.support.WebServiceMessageReceiverObj
                        ectSupport.handleConnection(Lorg.springframework.ws.transport.WebServiceConnecti
                        on;Lorg.springframework.ws.transport.WebServiceMessageReceiver;)V(WebServiceMess
                        ageReceiverObjectSupport.java:86)
                                at org.springframework.ws.transport.http.WebServiceMessageReceiverHandle
                        rAdapter.handle(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpS
                        ervletResponse;Ljava.lang.Object;)Lorg.springframework.web.servlet.ModelAndView;
                        (WebServiceMessageReceiverHandlerAdapter.java:56)
                                at org.springframework.ws.transport.http.MessageDispatcherServlet.doServ
                        ice(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletRespon
                        se;)V(MessageDispatcherServlet.java:157)
                                at org.springframework.web.servlet.FrameworkServlet.processRequest(Ljava
                        x.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(Fra
                        meworkServlet.java:475)
                                at org.springframework.web.servlet.FrameworkServlet.doPost(Ljavax.servle
                        t.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(FrameworkSe
                        rvlet.java:440)
                                at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServle
                        tRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:760)
                                at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;
                        Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
                                at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
                        ()Ljava.lang.Object;(ServletStubImpl.java:996)
                                at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servle
                        t.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.Filte
                        rChainImpl;)V(ServletStubImpl.java:419)
                                at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servle
                        t.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
                                at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
                        n.run()Ljava.lang.Object;(WebAppServletContext.java:6452)
                                at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.se
                        curity.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Objec
                        t;(AuthenticatedSubject.java:321)
                                at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.ac
                        l.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSub
                        ject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:11
                        8)
                                at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogi
                        c.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponse
                        Impl;)V(WebAppServletContext.java:3661)
                                at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel
                        .ExecuteThread;)V(ServletRequestImpl.java:2630)
                                at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest
                        ;)V(ExecuteThread.java:219)
                                at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
                                at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Sourc
                        e)

                        Comment


                        • #14
                          I'm also getting an error when payloadCaching is true

                          Code:
                          java.lang.IllegalArgumentException: Local name may not be null or empty
                                  at org.apache.axiom.om.impl.llom.OMAttributeImpl.<init>(Ljava.lang.Strin
                          g;Lorg.apache.axiom.om.OMNamespace;Ljava.lang.String;Lorg.apache.axiom.om.OMFact
                          ory;)V(OMAttributeImpl.java:49)
                                  at org.apache.axiom.om.impl.llom.OMElementImpl.addAttribute(Ljava.lang.S
                          tring;Ljava.lang.String;Lorg.apache.axiom.om.OMNamespace;)Lorg.apache.axiom.om.O
                          MAttribute;(OMElementImpl.java:526)
                                  at org.apache.axiom.om.impl.builder.SAXOMBuilder.startElement(Ljava.lang
                          .String;Ljava.lang.String;Ljava.lang.String;Lorg.xml.sax.Attributes;)V(SAXOMBuil
                          der.java:108)
                                  at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Lja
                          va.lang.String;Ljava.lang.String;Ljava.lang.String;Lorg.xml.sax.Attributes;)V(Tr
                          ansformerIdentityImpl.java:1072)
                                  at org.jdom.output.SAXOutputter.startElement(Lorg.jdom.Element;Lorg.xml.
                          sax.Attributes;)V(SAXOutputter.java:1025)
                                  at org.jdom.output.SAXOutputter.element(Lorg.jdom.Element;Lorg.jdom.outp
                          ut.NamespaceStack;)V(SAXOutputter.java:894)
                                  at org.jdom.output.SAXOutputter.elementContent(Lorg.jdom.Content;Lorg.jd
                          om.output.NamespaceStack;)V(SAXOutputter.java:1093)
                                  at org.jdom.output.SAXOutputter.elementContent(Ljava.util.List;Lorg.jdom
                          .output.NamespaceStack;)V(SAXOutputter.java:1067)
                                  at org.jdom.output.SAXOutputter.output(Ljava.util.List;)V(SAXOutputter.j
                          ava:666)
                                  at org.jdom.transform.JDOMSource$DocumentReader.parse(Lorg.xml.sax.Input
                          Source;)V(JDOMSource.java:479)
                                  at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Ljavax
                          .xml.transform.Source;Ljavax.xml.transform.Result;)V(TransformerIdentityImpl.jav
                          a:484)
                                  at org.springframework.xml.transform.TransformerObjectSupport.transform(
                          Ljavax.xml.transform.Source;Ljavax.xml.transform.Result;)V(TransformerObjectSupp
                          ort.java:75)
                                  at org.springframework.ws.server.endpoint.adapter.PayloadEndpointAdapter
                          .invoke(Lorg.springframework.ws.context.MessageContext;Ljava.lang.Object;)V(Payl
                          oadEndpointAdapter.java:50)
                                  at org.springframework.ws.server.MessageDispatcher.dispatch(Lorg.springf
                          ramework.ws.context.MessageContext;)V(MessageDispatcher.java:210)
                                  at org.springframework.ws.server.MessageDispatcher.receive(Lorg.springfr
                          amework.ws.context.MessageContext;)V(MessageDispatcher.java:157)
                                  at org.springframework.ws.transport.support.WebServiceMessageReceiverObj
                          ectSupport.handleConnection(Lorg.springframework.ws.transport.WebServiceConnecti
                          on;Lorg.springframework.ws.transport.WebServiceMessageReceiver;)V(WebServiceMess
                          ageReceiverObjectSupport.java:86)
                                  at org.springframework.ws.transport.http.WebServiceMessageReceiverHandle
                          rAdapter.handle(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpS
                          ervletResponse;Ljava.lang.Object;)Lorg.springframework.web.servlet.ModelAndView;
                          (WebServiceMessageReceiverHandlerAdapter.java:56)
                                  at org.springframework.ws.transport.http.MessageDispatcherServlet.doServ
                          ice(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletRespon
                          se;)V(MessageDispatcherServlet.java:157)
                                  at org.springframework.web.servlet.FrameworkServlet.processRequest(Ljava
                          x.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(Fra
                          meworkServlet.java:475)
                                  at org.springframework.web.servlet.FrameworkServlet.doPost(Ljavax.servle
                          t.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(FrameworkSe
                          rvlet.java:440)
                                  at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServle
                          tRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:760)
                                  at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;
                          Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
                                  at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
                          ()Ljava.lang.Object;(ServletStubImpl.java:996)
                                  at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servle
                          t.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.Filte
                          rChainImpl;)V(ServletStubImpl.java:419)
                                  at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servle
                          t.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
                                  at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
                          n.run()Ljava.lang.Object;(WebAppServletContext.java:6452)
                                  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.se
                          curity.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Objec
                          t;(AuthenticatedSubject.java:321)
                                  at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.ac
                          l.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSub
                          ject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:11
                          8)
                                  at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogi
                          c.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponse
                          Impl;)V(WebAppServletContext.java:3661)
                                  at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel
                          .ExecuteThread;)V(ServletRequestImpl.java:2630)
                                  at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest
                          ;)V(ExecuteThread.java:219)
                                  at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)

                          Any thoughts on what I'm missing?

                          Comment


                          • #15
                            Hello all,

                            Have you found a solution to this? I am stuck on the exact same errors but couldn't find my way through.

                            Thanks for any help,
                            James

                            Comment

                            Working...
                            X