0

I wanted to experiment with the WildFly AS. Created a very simple jax-ws example endpoint:

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 + " !";
    }
}

Tried to deploy it on server but got:

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>
Tristan
  • 3,530
  • 3
  • 30
  • 39
R. Gosz
  • 1
  • 1
  • I got similar behavior when deploying simple Rest endpoint too. – R. Gosz Feb 03 '16 at 19:17
  • I took your code, pom.xml, deployed the war to my wildfly 9.0.2 server (fresh install), launched it using standalone mode and it works fine. I can request the HelloService wsdl deployed to http://localhost:8080/test-1.0/HelloService/HelloService?wsdl. How do you deploy your application? How do you start your wildfly server? Could you provide more logs? Have you modified something in default wildfly configuration (by editing default standalone.xml file for example) – Rémi Bantos Feb 03 '16 at 23:17

1 Answers1

0

Rémi Bantos - thanks for your suggestion. You have pointed me in the right direction. I was starting the server using: /opt/wildfly/bin/standalone.sh instead of using service mode /etc/init.d/wildfly start where important configuration options are set. I was thinking these failures might have something to do with the unusual platform (Debian/ARM - Raspberry Pi 2) at first but it was 100% my mistake. After setting up the config in /etc/default/wildfly the server started and both SOAP and REST examples deployed and worked properly. Thanks again Rémi!

R. Gosz
  • 1
  • 1
  • great. I use to start it on my dev environment using standalone.sh on ubuntu, it works fine too. (I edit standalone.conf to configure options such as JAVA_HOME, jvm ones, ...) – Rémi Bantos Feb 04 '16 at 21:25
  • In my case standalone.sh loaded standalone.xml config but in service mode standalone-full.xml was used instead. This probably made the difference :) – R. Gosz Feb 13 '16 at 08:54