我想尝试使用WildFly AS。创建了一个非常简单的jax-ws示例端点:
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.ejb.Stateless;
@WebService(serviceName = "HelloService")
@Stateless()
public class HelloService {
@WebMethod(operationName = "hello")
public String hello(@WebParam(name = "name") String txt) {
return "Hello " + txt + " !";
}
}
尝试将其部署在服务器上,但得到了:
Cannot upload deployment: {"WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available." => {"Services that were unable to start:" => ["jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".component.HelloService.CREATE","jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".component.HelloService.START","jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".component.HelloService.VIEW.\"com.mycompany.soaptest.HelloService\".SERVICE_ENDPOINT","jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".deploymentCompleteService","jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".moduleDeploymentRuntimeInformation","jboss.deployment.unit.\"SoapTest-1.0-SNAPSHOT.war\".moduleDeploymentRuntimeInformationStart","jboss.undertow.deployment.default-server.default-host.\"/SoapTest-1.0-SNAPSHOT\"","jboss.undertow.deployment.default-server.default-host.\"/SoapTest-1.0-SNAPSHOT\".UndertowDeploymentInfoService"],"Services that may be the cause:" => ["jboss.clustering.registry.ejb.default"]}}
Does WildFly need any special treatment to run such a simple code ?
I have deployed the same code on WebLogic 12.1.3 (with javaee 6 target) and the deployment run without any issues. Here is my project pom:
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>SoapTest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>SoapTest</name>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
答案 0 :(得分:0)
RémiBantos - 感谢您的建议。你指出了我正确的方向。我使用/opt/wildfly/bin/standalone.sh
启动服务器,而不是使用服务模式/etc/init.d/wildfly start
,其中设置了重要的配置选项。我一开始认为这些失败可能与这个不寻常的平台(Debian / ARM - Raspberry Pi 2)有关,但这是100%我的错误。在/etc/default/wildfly
中设置配置后,服务器已启动,并且SOAP和REST示例均已部署并正常运行。再次感谢雷米!