1

我想在编译后将我的 war 文件部署到 JBoss 7.1.1。但它在输出中出现以下行失败(将 maven 调试输出设置为 -X 并且 -e 不会创建更详细的输出)。

我用来调用它的 Maven 命令是:clean install -Pintegration jboss-as:deploy

[INFO] --- jboss-as-maven-plugin:7.1.1.Final:deploy (default-cli) @ webapp ---
Aug 28, 2013 11:58:26 AM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
Aug 28, 2013 11:58:26 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Aug 28, 2013 11:58:26 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA
mojoFailed org.jboss.as.plugins:jboss-as-maven-plugin:7.1.1.Final(default-cli)
projectFailed com.foo:webapp:0.0.1-SNAPSHOT
[HUDSON] Archiving C:\Users\Administrator\.hudson\jobs\CCMS\workspace\pom.xml to C:\Users\Administrator\.hudson\jobs\CCMS\modules\com.foo$webapp\builds\2013-08-28_11-57-43\archive\com.foo\webapp\0.0.1-SNAPSHOT\pom.xml
[HUDSON] Archiving C:\Users\Administrator\.hudson\jobs\CCMS\workspace\target\webapp.war to C:\Users\Administrator\.hudson\jobs\CCMS\modules\com.foo$webapp\builds\2013-08-28_11-57-43\archive\com.foo\webapp\0.0.1-SNAPSHOT\webapp.war
sessionEnded
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 57.908s
[INFO] Finished at: Wed Aug 28 11:58:49 CEST 2013
[INFO] Final Memory: 21M/250M
[INFO] ------------------------------------------------------------------------
maven builder waiting
mavenExecutionResult exceptions not empty
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.1.Final:deploy (default-cli) on project webapp: Deployment failed and was rolled back.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
    at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:146)
    at hudson.maven.Maven3Builder.call(Maven3Builder.java:124)
    at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
    at hudson.remoting.UserRequest.perform(UserRequest.java:107)
    at hudson.remoting.UserRequest.perform(UserRequest.java:41)
    at hudson.remoting.Request$2.run(Request.java:276)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.maven.plugin.MojoExecutionException: Deployment failed and was rolled back.
    at org.jboss.as.plugin.deployment.standalone.StandaloneDeployment.execute(StandaloneDeployment.java:147)
    at org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDeployment.java:138)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 27 more

在此之前,我将带有批处理文件的 mgmtuser 添加到 jboss 管理领域。配置文件 pom.xml 配置为:

<profile>
            <!-- The profile to build in the integration environment -->
            <id>integration</id>
            <build>
                <plugins>
                    <!-- Use this plugin to cleanly deploy the application -->
                    <plugin>
                        <groupId>org.jboss.as.plugins</groupId>
                        <artifactId>jboss-as-maven-plugin</artifactId>
                        <version>7.1.1.Final</version>
                        <configuration>
                            <hostname>localhost</hostname>
                            <username>mgmtuser</username>
                            <password>pwd</password>
                            <force>true</force>
                        </configuration>
                    </plugin>
                </plugins>
            </build>                
        </profile>

如何检索有关错误的详细信息?

4

1 回答 1

2

我查看了 server.log 并发现了Can't find a persistence unit named foo in deployment.

尽管它在 Eclipse 的本地开发中工作,但它在集成方面失败了。原因:persistence.xml 未包含在类路径中。在war文件中即:/WEB-INF/classes/META-INF/persistence.xml

任何其他地方都会导致错误。

于 2013-08-28T11:28:48.463 回答