战争未部署到Wildfly 10.1中

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了战争未部署到Wildfly 10.1中相关的知识,希望对你有一定的参考价值。

我的war应用程序未部署到WildFly 10.1中。

这是日志:

16:43:08,875 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "apontatouch.war" (runtime-name: "apontatouch.war")
16:43:09,315 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
16:43:09,932 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-1) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.4.Final
16:43:10,144 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 58) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
16:43:10,169 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 58) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
16:43:10,177 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.
16:43:10,179 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.
16:43:10,185 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.
16:43:10,186 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.
16:43:10,653 INFO  [org.jboss.as.protocol] (management task-10) WFLYPRT0057:  cancelled task by interrupting thread Thread[management-handler-thread - 1,5,management-handler-thread]
16:43:10,688 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
16:43:11,051 INFO  [org.jboss.ws.common.management] (MSC service thread 1-6) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6) 
16:43:18,215 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment apontatouch.war
16:43:18,432 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.2.4.Final
16:43:18,933 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0004: Deploying JDBC-compliant driver class com.microsoft.sqlserver.jdbc.SQLServerDriver (version 4.0)
16:43:18,996 INFO  [org.jboss.weld.Version] (MSC service thread 1-4) WELD-000900: 2.3.5 (Final)
16:43:19,068 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = apontatouch.war_com.microsoft.sqlserver.jdbc.SQLServerDriver_4_0
16:43:20,438 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 4) WELD-001125: Illegal bean type interface java.util.Map<java.lang.Class<?>,class java.lang.Object> ignored on [EnhancedAnnotatedTypeImpl] public @Named @ApplicationScoped class br.com.caelum.vraptor.view.LinkToHandler
16:43:20,544 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 4) WELD-001125: Illegal bean type com.google.common.collect.ForwardingMap<java.lang.Class<?>, java.lang.Object> ignored on [EnhancedAnnotatedTypeImpl] public @Named @ApplicationScoped class br.com.caelum.vraptor.view.LinkToHandler
16:43:21,762 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "apontatouch.war")]) - failure description: {
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.server.default-server.aponta"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [
        "jboss.undertow.deployment.default-server.aponta./.UndertowDeploymentInfoService is missing [jboss.undertow.server.default-server.aponta]",
        "jboss.undertow.deployment.default-server.aponta./ is missing [jboss.undertow.server.default-server.aponta]"
    ]
}
16:43:21,805 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "apontatouch.war" (runtime-name : "apontatouch.war")
16:43:21,847 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184:    New missing/unsatisfied dependencies:
      service jboss.undertow.server.default-server.aponta (missing) dependents: [service jboss.undertow.deployment.default-server.aponta./, service jboss.undertow.deployment.default-server.aponta./.UndertowDeploymentInfoService] 

16:43:22,087 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
16:43:22,088 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
16:43:22,088 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 23335ms - Started 807 of 1059 services (3 services failed or missing dependencies, 404 services are lazy, passive or on-demand)
16:43:22,156 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0019: Stopped Driver service with driver-name = apontatouch.war_com.microsoft.sqlserver.jdbc.SQLServerDriver_4_0
16:43:23,793 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0028: Stopped deployment apontatouch.war (runtime-name: apontatouch.war) in 1661ms
16:43:23,889 WARN  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0357: Notification of type deployment-undeployed is not described for the resource at the address []
16:43:23,919 INFO  [org.jboss.as.repository] (DeploymentScanner-threads - 1) WFLYDR0002: Content removed from location C:Usersluis.infotureDesktopwildfly-10.1.0.Finalwildfly-10.1.0.Finalstandalonedatacontentf38194460d90047fd70e65c404eef0bf7418570content
16:43:23,920 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "apontatouch.war" (runtime-name: "apontatouch.war")
16:43:23,937 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report

这是我的pom.xml

<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>br.com.schmersal.svm</groupId>
    <artifactId>apontatouch</artifactId>
    <version>2.0</version>
    <packaging>war</packaging>

    <description>SVM Apontatouch para android</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <weld.version>2.1.2.Final</weld.version>
    </properties>

    <dependencies>

        <!-- VRaptor -->

        <dependency>
            <groupId>br.com.caelum</groupId>
            <artifactId>vraptor</artifactId>
            <version>4.2.0-RC5</version>
        </dependency>

        <dependency>
            <groupId>com.thoughtworks.paranamer</groupId>
            <artifactId>paranamer</artifactId>
            <version>2.6.1</version>
        </dependency>

        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
            <version>2.2</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>br.com.caelum.vraptor</groupId>
            <artifactId>vraptor-jodatime</artifactId>
            <version>4.1.0-RC3</version>
        </dependency>

        <!-- fim VRaptor -->

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.7</version>
        </dependency>

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time-hibernate</artifactId>
            <version>1.4</version>
        </dependency>

        <dependency>
            <groupId>org.jadira.usertype</groupId>
            <artifactId>usertype.core</artifactId>
            <version>3.0.0.CR1</version>
        </dependency>

        <dependency>
            <groupId>javax.xml</groupId>
            <artifactId>jaxrpc-api</artifactId>
            <version>1.1</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator-cdi</artifactId>
            <version>5.1.1.Final</version>
        </dependency>

        <dependency>
            <groupId>org.apache.axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.4</version>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>commons-discovery</groupId>
            <artifactId>commons-discovery</artifactId>
            <version>0.4</version>
        </dependency>

        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>sqljdbc4</artifactId>
            <version>4.0</version>
        </dependency>

        <dependency>
            <groupId>net.sourceforge.jexcelapi</groupId>
            <artifactId>jxl</artifactId>
            <version>2.6</version>
        </dependency>

        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.7</version>
        </dependency>

        <!-- hibernate -->

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>4.3.10.Final</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-c3p0</artifactId>
            <version>4.3.10.Final</version>
        </dependency>


        <!-- fim hibernate -->
    </dependencies>



        <build>


        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <warSourceDirectory>WebContent</warSourceDirectory>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

有什么问题,我该如何解决?

答案

你需要默认主机吗?还是只有虚拟的?

做这样的事你应该没问题:

<server name="default-server" default-host="aponta">
                <http-listener name="default" socket-binding="http"/>
              <host name="aponta" alias="localhost" default-web-module="apontatouch.war">
                    <location name="/" handler="welcome-content" /> 
                </host>
</server>

或者如果您需要默认主机,那么您只需要添加主机不同的别名。

也许是aponta.local,然后在您的机器条目中添加您的主机文件

127.0.0.1 aponta.local(或者你决定调用自定义本地域的东西)

在linux上,这个文件位于c: windows system32 drivers etc hosts中windows上的/ etc / hosts中

以上是关于战争未部署到Wildfly 10.1中的主要内容,如果未能解决你的问题,请参考以下文章

Wildfly:应用程序已部署但未运行

在 Wildfly 的战争部署期间无法访问 jar 中的类

无法在 Wildfly 中部署 keyclock 快速入门示例战争

域模式下的 Wildfly 不部署我的战争文件

如何在 WildFly 10 中将爆炸战争部署为文件夹

Wildfly 10 通过 http 管理 api 列出所有部署的战争工件