* axis2 Webservice 오류 모음집 *

 

1. Tomcat start 도중 오류

   a. 오류 : java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet

      발생시점 : tomcat start시점

      사유 : Server용 웹서비스는 tomcat10.0 일 경우 위와 같은 오류 발생

      해결 : tomcat 9 version을 사용

 

   b. 오류 : java.lang.ClassNotFoundException: javax.activation.DataSource

      발생시점 : tomcat start시점

      사유 : Server용 웹서비스는 axis2 1.8.0 version에서 위와 같은 오류 발생

      해결 : axis2 1.7.9 version을 사용

 

   c. 오류 : SEVERE: StandardWrapper.Throwable
                java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver.

      발생시점 : tomcat start시점

      사유 : project에 webservice 환경 구축 도중 xmlschema-core-2.2.1.jar 파일이 자동 복사 되지 않아 발생

      해결 : C:\axis2\axis2-1.7.9-bin\lib\xmlschema-core-2.2.1.jar  파일을 

                >> Project > /webapp/WEB-INF/lib  밑으로 복사 한다.

2. java소스를 이용해서 'Create Web Service' Wizard 수행중 오류 

   a. 오류 : Exception occurred while reading or writing file {0} The Axis2 facets cannot be installed since the Axis2 runtime location has not been set.

               Go to the Web Services preference page and set the Axis2 runtime location under Axis2 Preferences.

   b. 사유 : eclipse에 Axis2 rentime이 연결되어 있지 않아서 발생

   c. 해결 : eclipse

               -> Window > Preferences

               -> Web Services > Axis2 Preferences > Axis2 Runtime tab.

               -> Axis2 runtime location [ axis2 folder 연결  ] 

3. wsdl 파일을 이용해 stub 소스 생성 도중 오류

   a. 오류 : The Apache Axis2 Web service runtime in Tomcat v10.0 Server does not support the client project axis2Client.

       발생시점 : wsdl 파일을 이용해 Generate Client Wizard 수행 시

       해결 : Dynamic Web Module Version 으로  2.5 또는 2.4 로 변경한다. (3.0도 가능할 듯)

 

4. 자동생성된 stub.java 소스에서 compile 오류

   a. 오류1 : The package javax.xml.namespace is accessible from more than one module: <unnamed>, java.xml

      오류2 : The package javax.xml.stream is accessible from more than one module: <unnamed>, java.xml 

      발생시점 : wsdl 파일을 이용해 Generate Client Wizard 수행 시 후 생성된 stub.java 소스

      사유 : javax.xml....  class가  2개의 jar에서 존재

              (jdk에 존재 하는 jar)와,  (jaxrpc.jar,   geronimo-stax-api_1.0_spec-1.0.1.jar)

      해결 : jaxrpc.jar,   geronimo-stax-api_1.0_spec-1.0.1.jar   이 2개의 jar 삭제

 

5. client에서 Server 호출도중 오류

   a. 오류 : The ServiceClass object does not implement the required method in the following form: OMElement searchEmp(OMElement e)

       발생시점 : client에서 Server호출도중 오류

       사유 : server단 프로젝트 > .. > services.xml

                자동 생성된 services.xml 파일 내부 내용 중 경로가 잘 못 되어 있다.

        해결방법 : services.xml 중

 

 

 

6. Webg Service Client Wizard 수행 중

   a. 오류 : 아래 이미지처럼 - Service Name, Port Name, Custom package name 등이 공백으로 보여짐

      오류내용 : Exception occurred during code generation for WSDL  : null
    java.lang.NullPointerException: Cannot invoke "java.lang.Class.getConstructor(java.lang.Class[])" because "WSDL11ToAxisServiceBuilderClass" is null

      해결방법 : 1. Preferences > Axis2 Preferences > Axis2 runtime location [ ] 위치를 지운 후

                        eclipse restart

                     2. C:\axis2\axis2-1.7.9-bin\  하위 파일들을 삭제 후  [axis2-1.7.9-bin.zip] 다시 압축 해제

                        Preferences > Axis2 Preferences > Axis2 runtime location [ ] 위치를 지운 후

                        eclipse restart

        이유 : 특정한 환경에서 갑자기 eclipse가 이상작동함

Posted by 농부지기
,