Announcement Announcement Module
Collapse
No announcement yet.
spring-ws + Websphere Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring-ws + Websphere

    Hello,

    I implemented spring-ws in the web service deployed under Websphere.
    Release:
    spring-ws : 1.5.0
    was 6.1.0.3

    I met an exception when the interceptor bean is instantiated:

    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'compartValidatingInterceptor' defined in ServletContext resource [/WEB-INF/converter-servlet.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1302)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:463)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:404)
    at java.security.AccessController.doPrivileged(Access Controller.java:193)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:375)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 63)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:170)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:260 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:184)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:163)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:269)
    ... 44 more
    Caused by: java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
    at javax.xml.validation.SchemaFactory.newInstance(Unk nown Source)
    at org.springframework.xml.validation.SchemaLoaderUti ls.loadSchema(SchemaLoaderUtils.java:76)
    at org.springframework.xml.validation.Jaxp13Validator Factory.createValidator(Jaxp13ValidatorFactory.jav a:40)
    at org.springframework.xml.validation.XmlValidatorFac tory.createValidator(XmlValidatorFactory.java:91)
    at org.springframework.ws.server.endpoint.interceptor .AbstractValidatingInterceptor.afterPropertiesSet( AbstractValidatingInterceptor.java:151)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1333)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1299)



    When I comment the interceptor bean, it works fine.

    Any Idea to solve this problem?
    Thanks in advance.
    P. SIMON.

  • #2
    This is running on the IBM JDK 1.5, I suppose?

    Comment


    • #3
      Originally posted by Arjen Poutsma View Post
      This is running on the IBM JDK 1.5, I suppose?
      Yes, right.

      Comment


      • #4
        Same problem occurs when I use the release 1.5.1 of spring-ws (release 2.5.4 of spring core)

        Pascal

        Comment


        • #5
          Try adding this to your environment

          Code:
          -Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl

          Comment


          • #6
            Unfortunately, same error.

            Pascal.

            Comment


            • #7
              The problem is now solved by replacing the dependency of xerces-impl release 2.8.1 instead of 2.6.2 initially.

              Thanks all.
              Pascal.

              Comment


              • #8
                So, does it work for you if you include xerces 2.8.1 into WAR; doesn't it generate IncompatibleClassChangeError if you set PARENT_LAST? I was only able to run my webservices by removing xerces from WAR and using XML4J 4.4.11 provided by WebSphere 6.1.0.13. I lack WSDL generator though (Arjen explained about that somewhere), but the rest seems to be working.

                The only issue is whether Spring-WS 1.5.1 and Spring 2.5.4 libraries compatible with IBM's stuff?...

                Comment


                • #9
                  The web service runs in Websphere 6.1.0.3 with AXIOM as message factory and PARENT_LAST as requested is set.

                  The used dependencies are:
                  <dependency>
                  <groupId>org.springframework.ws</groupId>
                  <artifactId>spring-ws-core</artifactId>
                  <version>1.5.1</version>
                  </dependency>

                  <dependency>
                  <groupId>org.springframework.ws</groupId>
                  <artifactId>spring-oxm</artifactId>
                  <version>1.5.1</version>
                  </dependency>

                  <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-beans</artifactId>
                  <version>2.5.2</version>
                  </dependency>

                  <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-aop</artifactId>
                  <version>2.5.2</version>
                  </dependency>

                  <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-context</artifactId>
                  <version>2.5.2</version>
                  </dependency>

                  <dependency>
                  <groupId>javax.xml.bind</groupId>
                  <artifactId>jaxb-api</artifactId>
                  <version>1.0.1</version>
                  </dependency>

                  <dependency>
                  <groupId>com.sun.xml.bind</groupId>
                  <artifactId>jaxb-impl</artifactId>
                  <version>1.0.6</version>
                  </dependency>

                  <dependency>
                  <groupId>com.sun.xml.bind</groupId>
                  <artifactId>jaxb-libs</artifactId>
                  <version>1.0.6</version>
                  </dependency>
                  <!-- Ajout AXIOM au lieu de SAAJ -->
                  <dependency>
                  <artifactId>axiom-impl</artifactId>
                  <groupId>org.apache.ws.commons.axiom</groupId>
                  <version>1.2.5</version>
                  </dependency>

                  <dependency>
                  <groupId>org.codehaus.woodstox</groupId>
                  <artifactId>wstx-asl</artifactId>
                  <version>3.2.5</version>
                  </dependency>

                  <dependency>
                  <artifactId>xalan</artifactId>
                  <groupId>xalan</groupId>
                  <version>2.7.0</version>
                  </dependency>

                  <dependency>
                  <groupId>xml-apis</groupId>
                  <artifactId>xml-apis</artifactId>
                  <version>1.3.04</version>
                  </dependency>

                  <dependency>
                  <groupId>xerces</groupId>
                  <artifactId>xercesImpl</artifactId>
                  <version>2.8.1</version>
                  </dependency>

                  The web service is ok.

                  Comment

                  Working...
                  X