Topic
  • 5 replies
  • Latest Post - ‏2013-07-26T02:25:20Z by Ivan_Xu
Guest@Blore
Guest@Blore
6 Posts

Pinned topic ClassNotFoundException

‏2013-07-24T23:39:47Z |

Hi,

 

I am new to Liberty Profile. I am able to deploy my webservice in server. But when I am trying to access the wsdl getting the below exception.

I have verified inside the war file corresponding jar files are there. But I am not getting where its trying to pick these classes.

 

ERROR   ] SRVE0293E: [Servlet Error]-[Failed to load listener: org.springframework.web.util.Log4jConfigListener]: java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener
[ERROR   ] SRVE0279E: Error occured while processing global listeners for the application {0}: {1}
[ERROR   ] SRVE8052E: Logging ClassNotFoundException
[ERROR   ] SRVE0276E: Error while initializing Servlet [CXFServlet]: javax.servlet.UnavailableException: SRVE0200E: Servlet [org.apache.cxf.transport.servlet.CXFServlet]: Could not find required class - org.apache.cxf.transport.servlet.CXFServlet
[ERROR   ] CWWKS3005E: A configuration exception has occurred. No UserRegistry implementation service is available.
 

I have also used <classloader delegation="parentLast"/>

 

Thanks.

 

  • VB3C_Wendy_Raschke
    VB3C_Wendy_Raschke
    14 Posts

    Re: ClassNotFoundException

    ‏2013-07-25T14:15:36Z  

    >> I have verified inside the war file corresponding jar files are there.

    Hi. By the above, do you mean that you are packaging a JAX-WS engine inside of your application? Or are you just enabling the jaxws-2.2 feature?

    And how are you accessing the WSDL? Are you invoking <webservice_endpoint>?wsdl in your browser?

  • Guest@Blore
    Guest@Blore
    6 Posts

    Re: ClassNotFoundException

    ‏2013-07-25T17:34:42Z  

    >> I have verified inside the war file corresponding jar files are there.

    Hi. By the above, do you mean that you are packaging a JAX-WS engine inside of your application? Or are you just enabling the jaxws-2.2 feature?

    And how are you accessing the WSDL? Are you invoking <webservice_endpoint>?wsdl in your browser?

    I have enabled the  jaxws-2.2 feature under  featureManager. I am trying to access the wsdl through browser.

    As jars were not getting picked I added placed the jars in my local drive and gave the below entry in server.xml

     

    <library apiTypeVisibility="spec,third-party,ibm-api,api" id="global1">
          <fileset dir="D:/Jars" includes="*"/>
       </library>

    This solves the problem. But without this also it should be working.

     

    Any idea why its not able to find the classes.

     

    Thanks.

  • VB3C_Wendy_Raschke
    VB3C_Wendy_Raschke
    14 Posts

    Re: ClassNotFoundException

    ‏2013-07-25T20:23:17Z  

    I have enabled the  jaxws-2.2 feature under  featureManager. I am trying to access the wsdl through browser.

    As jars were not getting picked I added placed the jars in my local drive and gave the below entry in server.xml

     

    <library apiTypeVisibility="spec,third-party,ibm-api,api" id="global1">
          <fileset dir="D:/Jars" includes="*"/>
       </library>

    This solves the problem. But without this also it should be working.

     

    Any idea why its not able to find the classes.

     

    Thanks.

    Your app's web.xml file is referencing that class like this, correct?

        <servlet>
            <servlet-name>cxf</servlet-name>
            <display-name>cxf</display-name>
            <description>Apache CXF Endpoint</description>
            <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>

     

    Which JAR files are you needing to put into your shared library definition (i.e., what's in D:/Jars)?

  • Guest@Blore
    Guest@Blore
    6 Posts

    Re: ClassNotFoundException

    ‏2013-07-25T23:16:50Z  

    Your app's web.xml file is referencing that class like this, correct?

        <servlet>
            <servlet-name>cxf</servlet-name>
            <display-name>cxf</display-name>
            <description>Apache CXF Endpoint</description>
            <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>

     

    Which JAR files are you needing to put into your shared library definition (i.e., what's in D:/Jars)?

    Yah correct.The entry is there. Actually the same war file I am able to deploy in WebSphere. As we are planning to migrate to Liberty Profile I am trying this.

    <servlet>
    <servlet-name>CXFServlet</servlet-name>
    <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>

     

    For the time being I have placed all jars which were there inside war's lib folder.

  • Ivan_Xu
    Ivan_Xu
    8 Posts

    Re: ClassNotFoundException

    ‏2013-07-26T02:25:20Z  

    Yah correct.The entry is there. Actually the same war file I am able to deploy in WebSphere. As we are planning to migrate to Liberty Profile I am trying this.

    <servlet>
    <servlet-name>CXFServlet</servlet-name>
    <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>

     

    For the time being I have placed all jars which were there inside war's lib folder.

    Hi,

    In Liberty profile, we provide jaxws-2.2 feature to provide EE JaxWs programming support. Once it is enabled, the engine will automatically scan your applications, discover all the endpoints (annotated with WebService and WebServiceProvider) and publish them into web container. So, there is no need to add the CXFServlet in the web.xml, the server will add them on the fly.

    Another solution is that (the same with what you do in WebSphere full profile), you do not want to use the Web Services engine from server side, so do not enable jaxws-2.2 feature and ship all the required libraries in your web application. In this way, Liberty server will treat it is a pure web applications, all the scan/discover/publish work will be done by CXF libraries shipped in the web application, mostly a cxf-servlet.xml is used for maintaining the endpoints.