Hello Team,
I am trying to run one webService SOAP based application using Apache CXF. I am trying to resolve the following errors, but I could not. On each restart it shows some different error. Please find all these details as below. Same application running fine with Tomcat server.
Liberty Server Userd: wlp-jakartaee10-23.0.0.8
Restart-1: [ERROR ] CWWKZ0002E: An exception occurred while starting the application Wsdl2Java. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.exceptions.DefinitionException: WELD-000071: Managed bean with a parameterized bean class must be @Dependent: class org.apache.cxf.jaxrs.provider.CachingMessageBodyReader
Restart-2: [ERROR ] CWWKZ0002E: An exception occurred while starting the application Wsdl2Java. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.exceptions.DefinitionException: WELD-000071: Managed bean with a parameterized bean class must be @Dependent: class org.apache.cxf.jaxrs.provider.XPathProvider
Restart-2: [ERROR ] CWWKZ0002E: An exception occurred while starting the application Wsdl2Java. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.exceptions.DefinitionException: WELD-000071: Managed bean with a parameterized bean class must be @Dependent: class org.apache.cxf.jaxrs.provider.SourceProvider
Restart-2: [ERROR ] CWWKZ0002E: An exception occurred while starting the application Wsdl2Java. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.exceptions.DefinitionException: WELD-000071: Managed bean with a parameterized bean class must be @Dependent: class org.apache.cxf.jaxrs.provider.DataBindingProvider
Restart-2: [ERROR ] CWWKZ0002E: An exception occurred while starting the application Wsdl2Java. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.exceptions.DefinitionException: WELD-000071: Managed bean with a parameterized bean class must be @Dependent: class org.apache.cxf.jaxrs.provider.CachingMessageBodyWriter
Restart-2: [ERROR ] CWWKZ0002E: An exception occurred while starting the application Wsdl2Java. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.exceptions.DefinitionException: WELD-000071: Managed bean with a parameterized bean class must be @Dependent: class org.apache.cxf.jaxrs.provider.FormEncodingProvider
Could you please help & put some light on these errors.
Dependencies used in application:
pom.xml
========================
<dependencies>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-web-api</artifactId>
<version>10.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>6.0.13</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>6.0.13</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>4.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>4.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>4.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-servlet-compatible</artifactId>
<version>3.5.7</version>
</dependency>
</dependencies>
Web.xml
===================================
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
<display-name>Archetype Created Web Application</display-name>
<servlet>
<servlet-name>cxf</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/services/op/*</url-pattern>
</servlet-mapping>
</web-app>
I'm sorry I cannot tell from the provided information what the problem would be, but Aha Ideas is for requesting new function rather than to request help. I don't know if this is a bug or just a usage issue from the provided information, but it would make sense to raise this through support. If you would prefer you could try using the Open Liberty mail list or raise a bug there, but there wouldn't be any guarantee of a timely response there.