2016-11-01 3 views
1

jax-rsサービスをwildflyにデプロイすると、404が見つかりません。wildflyのjax rsサービスが届かないようですか?

マイWebServiceクラス:

package org.declercq.reportbuilderback.webservices; 

import java.util.List; 

import javax.enterprise.context.RequestScoped; 
import javax.ws.rs.Consumes; 
import javax.ws.rs.DELETE; 
import javax.ws.rs.GET; 
import javax.ws.rs.POST; 
import javax.ws.rs.PUT; 
import javax.ws.rs.Path; 
import javax.ws.rs.PathParam; 
import javax.ws.rs.Produces; 
import javax.ws.rs.QueryParam; 
import javax.ws.rs.core.Response; 
import javax.ws.rs.core.Response.Status; 
import javax.ws.rs.core.UriBuilder; 

import org.declercq.reportbuilderback.dao.UserDao; 
import org.declercq.reportbuilderback.models.User; 

@RequestScoped 
@Path("/users") 
@Produces("application/json") 
@Consumes("application/json") 
public class UserWebService { 

@GET 
    @Path("/all") 
    public List<User> listAll() { 
     //TODO: retrieve the users 
     System.out.println("Here"); 
     final List<User> users = new UserDao().getAllUsers(); 
     System.out.println("Here 2"); 
     return users; 
    } 
} 

マイApplicationクラス:

<?xml version="1.0" encoding="UTF-8"?> 

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 

    <groupId>org.declercq.reportbuilderback</groupId> 
    <artifactId>reportbuilderback</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <packaging>war</packaging> 

    <licenses> 
     <license> 
      <name>Apache License, Version 2.0</name> 
      <distribution>repo</distribution> 
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url> 
     </license> 
    </licenses> 

    <properties> 
     <!-- Explicitly declaring the source encoding eliminates the following 
      message: --> 
     <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
      resources, i.e. build is platform dependent! --> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 

     <!-- JBoss dependency versions --> 
     <version.wildfly.maven.plugin>1.0.2.Final</version.wildfly.maven.plugin> 

     <!-- Define the version of the JBoss BOMs we want to import to specify 
      tested stacks. --> 
     <version.jboss.bom>8.2.1.Final</version.jboss.bom> 

     <!-- other plugin versions --> 
     <version.compiler.plugin>3.1</version.compiler.plugin> 
     <version.surefire.plugin>2.16</version.surefire.plugin> 
     <version.war.plugin>2.5</version.war.plugin> 

     <!-- maven-compiler-plugin --> 
     <maven.compiler.target>1.7</maven.compiler.target> 
     <maven.compiler.source>1.7</maven.compiler.source> 
    </properties> 


    <dependencyManagement> 
     <dependencies> 
      <!-- JBoss distributes a complete set of Java EE 7 APIs including a Bill 
       of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection) 
       of artifacts. We use this here so that we always get the correct versions 
       of artifacts. Here we use the jboss-javaee-7.0-with-tools stack (you can 
       read this as the JBoss stack of the Java EE 7 APIs, with some extras tools 
       for your project, such as Arquillian for testing) and the jboss-javaee-7.0-with-hibernate 
       stack you can read this as the JBoss stack of the Java EE 7 APIs, with extras 
       from the Hibernate family of projects) --> 
      <dependency> 
       <groupId>org.wildfly.bom</groupId> 
       <artifactId>jboss-javaee-7.0-with-tools</artifactId> 
       <version>${version.jboss.bom}</version> 
       <type>pom</type> 
       <scope>import</scope> 
      </dependency> 
      <dependency> 
       <groupId>org.wildfly.bom</groupId> 
       <artifactId>jboss-javaee-7.0-with-hibernate</artifactId> 
       <version>${version.jboss.bom}</version> 
       <type>pom</type> 
       <scope>import</scope> 
      </dependency> 
      <dependency> 
       <groupId>org.wildfly.bom</groupId> 
       <artifactId>jboss-javaee-7.0-with-resteasy</artifactId> 
       <version>${version.jboss.bom}</version> 
       <type>pom</type> 
       <scope>import</scope> 
      </dependency> 
     </dependencies> 
    </dependencyManagement> 

    <dependencies> 

     <!-- First declare the APIs we depend on and need for compilation. All 
      of them are provided by JBoss WildFly --> 

     <!-- Import the CDI API, we use provided scope as the API is included in 
      JBoss WildFly --> 
     <dependency> 
      <groupId>javax.enterprise</groupId> 
      <artifactId>cdi-api</artifactId> 
      <scope>provided</scope> 
     </dependency> 

     <!-- Import the Common Annotations API (JSR-250), we use provided scope 
      as the API is included in JBoss WildFly --> 
     <dependency> 
      <groupId>org.jboss.spec.javax.annotation</groupId> 
      <artifactId>jboss-annotations-api_1.2_spec</artifactId> 
      <scope>provided</scope> 
     </dependency> 

     <!-- Import the JAX-RS API, we use provided scope as the API is included 
      in JBoss WildFly --> 
     <dependency> 
      <groupId>org.jboss.resteasy</groupId> 
      <artifactId>jaxrs-api</artifactId> 
      <scope>provided</scope> 
     </dependency> 

     <!-- Import the JPA API, we use provided scope as the API is included in 
      JBoss WildFly --> 
     <dependency> 
      <groupId>org.hibernate.javax.persistence</groupId> 
      <artifactId>hibernate-jpa-2.1-api</artifactId> 
      <scope>provided</scope> 
     </dependency> 

     <!-- Import the EJB API, we use provided scope as the API is included in 
      JBoss WildFly --> 
     <dependency> 
      <groupId>org.jboss.spec.javax.ejb</groupId> 
      <artifactId>jboss-ejb-api_3.2_spec</artifactId> 
      <scope>provided</scope> 
     </dependency> 

     <!-- JSR-303 (Bean Validation) Implementation --> 
     <!-- Provides portable constraints such as @Email --> 
     <!-- Hibernate Validator is shipped in JBoss WildFly --> 
     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-validator</artifactId> 
      <scope>provided</scope> 
      <exclusions> 
       <exclusion> 
        <groupId>org.slf4j</groupId> 
        <artifactId>slf4j-api</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 

     <!-- Import the JSF API, we use provided scope as the API is included in 
      JBoss WildFly --> 
     <dependency> 
      <groupId>org.jboss.spec.javax.faces</groupId> 
      <artifactId>jboss-jsf-api_2.2_spec</artifactId> 
      <scope>provided</scope> 
     </dependency> 

     <!-- Now we declare any tools needed --> 

     <!-- Annotation processor to generate the JPA 2.0 metamodel classes for 
      typesafe criteria queries --> 
     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-jpamodelgen</artifactId> 
      <scope>provided</scope> 
     </dependency> 

     <!-- Annotation processor that raising compilation errors whenever constraint 
      annotations are incorrectly used. --> 
     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-validator-annotation-processor</artifactId> 
      <scope>provided</scope> 
     </dependency> 

     <!-- Needed for running tests (you may also use TestNG) --> 
     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <scope>test</scope> 
     </dependency> 




     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-core</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.jboss.resteasy</groupId> 
      <artifactId>resteasy-jaxrs</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.jboss.resteasy</groupId> 
      <artifactId>resteasy-client</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.jboss.resteasy</groupId> 
      <artifactId>resteasy-multipart-provider</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.jboss.spec.javax.servlet</groupId> 
      <artifactId>jboss-servlet-api_3.1_spec</artifactId> 
      <scope>provided</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.jboss.resteasy</groupId> 
      <artifactId>resteasy-jaxb-provider</artifactId> 
      <scope>provided</scope> 
     </dependency> 
    </dependencies> 

    <build> 
     <!-- Maven will append the version to the finalName (which is the name 
      given to the generated war, and hence the context root) --> 
     <finalName>${project.artifactId}</finalName> 
     <plugins> 
      <plugin> 
       <artifactId>maven-war-plugin</artifactId> 
       <version>${version.war.plugin}</version> 
       <configuration> 
        <!-- Java EE 7 doesn't require web.xml, Maven needs to catch up! --> 
        <failOnMissingWebXml>false</failOnMissingWebXml> 
       </configuration> 
      </plugin> 
      <!-- The WildFly plugin deploys your war to a local WildFly container --> 
      <!-- To use, run: mvn package wildfly:deploy --> 
      <plugin> 
       <groupId>org.wildfly.plugins</groupId> 
       <artifactId>wildfly-maven-plugin</artifactId> 
       <version>${version.wildfly.maven.plugin}</version> 
      </plugin> 
     </plugins> 
    </build> 

    <profiles> 
     <profile> 
      <!-- The default profile skips all tests, though you can tune it to run 
       just unit tests based on a custom pattern --> 
      <!-- Seperate profiles are provided for running all tests, including Arquillian 
       tests that execute in the specified container --> 
      <id>default</id> 
      <activation> 
       <activeByDefault>true</activeByDefault> 
      </activation> 
      <build> 
       <plugins> 
        <plugin> 
         <artifactId>maven-surefire-plugin</artifactId> 
         <version>${version.surefire.plugin}</version> 
         <configuration> 
          <skip>true</skip> 
         </configuration> 
        </plugin> 
       </plugins> 
      </build> 
     </profile> 
    </profiles> 
</project> 

出力私のサーバーから:すべての依存関係を持つ

package org.declercq.reportbuilderback.webservices; 

import javax.ws.rs.ApplicationPath; 
import javax.ws.rs.core.Application; 

@ApplicationPath("/rest") 
public class RestApplication extends Application { 

} 

私のpom.xml

17:15:02,644 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final 
17:15:04,564 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final 
17:15:05,038 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting 
17:15:13,537 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found reportbuilderback.war in deployment directory. To trigger deployment create a file called reportbuilderback.war.dodeploy 
17:15:13,571 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http) 
17:15:13,697 INFO [org.xnio] (MSC service thread 1-8) XNIO version 3.4.0.Final 
17:15:13,734 INFO [org.xnio.nio] (MSC service thread 1-8) XNIO NIO Implementation Version 3.4.0.Final 
17:15:13,853 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 38) WFLYCLINF0001: Activating Infinispan subsystem. 
17:15:13,862 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique. 
17:15:13,871 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 46) WFLYNAM0001: Activating Naming Subsystem 
17:15:13,873 INFO [org.jboss.as.security] (ServerService Thread Pool -- 53) WFLYSEC0002: Activating Security Subsystem 
17:15:13,876 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 56) WFLYWS0002: Activating WebServices Extension 
17:15:13,908 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 37) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors 
17:15:13,923 INFO [org.jboss.as.security] (MSC service thread 1-7) WFLYSEC0001: Current PicketBox version=4.9.6.Final 
17:15:13,947 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 44) WFLYJSF0007: Activated the following JSF Implementations: [main] 
17:15:14,063 INFO [org.jboss.as.connector] (MSC service thread 1-3) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.4.Final) 
17:15:14,768 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0003: Undertow 1.4.0.Final starting 
17:15:14,949 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.4) 
17:15:14,957 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0018: Started Driver service with driver-name = postgres 
17:15:15,075 INFO [org.jboss.as.naming] (MSC service thread 1-3) WFLYNAM0003: Starting Naming Service 
17:15:15,076 INFO [org.jboss.as.mail.extension] (MSC service thread 1-3) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default] 
17:15:15,353 INFO [org.jboss.remoting] (MSC service thread 1-8) JBoss Remoting version 4.0.21.Final 
17:15:15,643 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path '/home/wouter/wildfly-10.1.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]'] 
17:15:15,769 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0012: Started server default-server. 
17:15:15,774 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0018: Host default-host starting 
17:15:15,889 INFO [org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 64 (per class), which is derived from thread worker pool sizing. 
17:15:15,889 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 16 (per class), which is derived from the number of CPUs on this host. 
17:15:16,205 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080 
17:15:16,367 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) WFLYJCA0001: Bound data source [java:/PostGreDS] 
17:15:16,951 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-2) WFLYDM0111: Keystore /home/wouter/wildfly-10.1.0.Final/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost 
17:15:17,016 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-8) WFLYDS0013: Started FileSystemDeploymentService for directory /home/wouter/wildfly-10.1.0.Final/standalone/deployments 
17:15:17,089 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "reportbuilderback.war" (runtime-name: "reportbuilderback.war") 
17:15:17,771 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-4) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.4.Final 
17:15:17,866 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443 
17:15:17,879 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 60) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
17:15:17,884 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 61) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
17:15:17,886 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 59) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
17:15:17,894 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 61) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
17:15:17,895 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 60) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
17:15:17,900 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 59) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
17:15:18,673 INFO [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6) 
17:15:19,924 INFO [org.jboss.as.jpa] (MSC service thread 1-1) WFLYJPA0002: Read persistence.xml for primary 
17:15:20,345 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 59) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'reportbuilderback.war#primary' 
17:15:20,530 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 59) HHH000204: Processing PersistenceUnitInfo [ 
    name: primary 
    ...] 
17:15:20,662 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003: Processing weld deployment reportbuilderback.war 
17:15:21,231 INFO [org.hibernate.Version] (ServerService Thread Pool -- 59) HHH000412: Hibernate Core {5.0.10.Final} 
17:15:21,232 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-8) HV000001: Hibernate Validator 5.2.4.Final 
17:15:21,235 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 59) HHH000206: hibernate.properties not found 
17:15:21,238 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 59) HHH000021: Bytecode provider name : javassist 
17:15:21,407 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 59) HCANN000001: Hibernate Commons Annotations {5.0.1.Final} 
17:15:22,103 INFO [org.jboss.weld.Version] (MSC service thread 1-6) WELD-000900: 2.3.5 (Final) 
17:15:22,669 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 59) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'reportbuilderback.war#primary' 
17:15:22,848 WARN [org.hibernate.orm.connections] (ServerService Thread Pool -- 59) HHH10001002: Using Hibernate built-in connection pool (not for production use!) 
17:15:22,850 INFO [org.hibernate.orm.connections] (ServerService Thread Pool -- 59) HHH10001005: using driver [org.postgresql.Driver] at URL [jdbc:postgresql://127.0.0.1:5432/reportbuilderwebservices] 
17:15:22,851 INFO [org.hibernate.orm.connections] (ServerService Thread Pool -- 59) HHH10001001: Connection properties: {user=reportbuilderwebservices, password=****} 
17:15:22,852 INFO [org.hibernate.orm.connections] (ServerService Thread Pool -- 59) HHH10001003: Autocommit mode: false 
17:15:22,855 INFO [org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (ServerService Thread Pool -- 59) HHH000115: Hibernate connection pool size: 20 (min=1) 
17:15:23,194 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 59) HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect 
17:15:23,662 INFO [org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl] (ServerService Thread Pool -- 59) HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException 
17:15:23,666 INFO [org.hibernate.type.BasicTypeRegistry] (ServerService Thread Pool -- 59) HHH000270: Type registration [java.util.UUID] overrides previous : [email protected] 
17:15:23,691 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 59) Envers integration enabled? : true 
17:15:24,626 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 59) HHH000228: Running hbm2ddl schema update 
17:15:26,165 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 63) Initializing Mojarra 2.2.13.SP1 20160303-1204 for context '/reportbuilderback' 
17:15:26,993 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 63) WFLYUT0021: Registered web context: /reportbuilderback 
17:15:27,087 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "reportbuilderback.war" (runtime-name : "reportbuilderback.war") 
17:15:27,420 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management 
17:15:27,422 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990 
17:15:27,422 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 27185ms - Started 422 of 670 services (404 services are lazy, passive or on-demand) 

http://localhost:8080/reportbuilderback/rest/users/allを使用してWebサービスにアクセスしますが、毎回404が見つかりません。 私のwebservice関数を調べてすべてのユーザーをリストアップすると、そこにSystem.out.printlnを配置します。しかし、このURLにアクセスすると、決してコンソールには印刷されないので、サービスは決して連絡されないようです。

http://localhost:8080/reportbuilderback/index.jsfのWebページもあります。これは完全にアクセスできます。純粋に残りのWebサービスが見つかりません...

ここに何か不足していますか?

UPDATE: また、明示的にアプリケーション・サブクラスにクラスを追加してみました。まだ動作していない

package org.declercq.reportbuilderback.webservices; 

import java.util.HashSet; 
import java.util.Set; 

import javax.ws.rs.ApplicationPath; 
import javax.ws.rs.core.Application; 

import org.declercq.reportbuilderback.models.User; 

@ApplicationPath("/rest") 
public class RestApplication extends Application { 
    @Override 
    public Set<Class<?>> getClasses() { 

     Set<Class<?>> s = new HashSet<Class<?>>(); 
     s.add(org.declercq.reportbuilderback.models.User.class); 
     return s; 
    } 


} 

、コンソールに出力「が見つかりません」、何を得ていません。

アップデート2: もまだ同じ私のWEB-INFフォルダに空のweb.xmlを追加してくださいするには、次の残りのWebサービスが動作しない、JSFページの作品...

Update3と: は何かに気づきました他の調査でもそうです:私が間違ったURLを入力すると、Wildflyから "404 not found"というメッセージが表示されます。しかし、私がWebサービスにアクセスしようとすると、404コードなしで画面上に「見つからない」というメッセージが表示されます。

UPDATE4:wildfly管理コンソールからのアプリケーションのコンテキストパスのための 情報:

reportbuilderback.war 

    Deployment is enabled 

Details 

    Last enabled at 2016-11-02 08:34:05,097 CET 
    The deployment was never disabled 
    Runtime name: reportbuilderback.war 

Content: {"archive" => false,"path" => "deployments/reportbuilderback.war","relative-to" => "jboss.server.base.dir"} 

Disabled time:  

Disabled timestamp:  

Enabled: true 

Enabled time: 1478072045097 

Enabled timestamp: 2016-11-02 08:34:05,097 CET 

Name:  reportbuilderback.war 

Owner: ("subsystem" => "deployment-scanner") ("scanner" => "default") 

Persistent: false 

Runtime name: reportbuilderback.war 

Status: OK 
+0

アプリケーションのコンテキストパスが異なる場合があります。私は/ rest/users/allが正しいと思います。ただし、reportbuilderback部分はそうでないかもしれません。この部分は、.war接尾辞を除いたアーティファクト(戦争)の名前でなければなりません。 wildfly管理コンソールに移動し、デプロイメントのセクションで展開されたアプリケーションが利用可能なコンテキストパスを確認できます。 –

+0

@ThePaulありがとう、管理コンソールからの情報で私の最初の投稿を更新しました。アプリケーションコンテキストのパスは/ reportbuilderback/と思われますか?私の記事で述べたように、http:// localhost:8080/reportbuilderback/index.jsfは機能します。何らかの理由で私が手に入れることのできないWebサービスです... – aquilares

+0

Als、@ ThePaulは、私が上に挙げた展開の私のサーバの出力が気づいたばかりです: 17:15:26,993 INFO [org.wildfly.extension.undertow ](ServerServiceスレッドプール - 63)WFLYUT0021:登録されたWebコンテキスト:/ reportbuilderback 17:15:27,087情報[org。jboss.as.server](ServerServiceスレッドプール - 34)WFLYSRV0010:デプロイされた "reportbuilderback.war"(ランタイム名: "reportbuilderback.war") – aquilares

答えて

0

だけで何が起こったのか全く分からないが、私はちょうど私の全体のdevのマシンを再起動し、今、突然、それは何も変更せずに、動作します。..

関連する問題