首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Maven GlassFish插件: asadmin CreateProcess error=193

Maven GlassFish插件: asadmin CreateProcess error=193
EN

Stack Overflow用户
提问于 2011-06-30 03:15:55
回答 2查看 7.6K关注 0票数 9

通常我只会去java.net网站查找我得到的错误代码,但他们的网站目前处于离线状态。基本上,我遵循的是这个指南:

http://pookey.co.uk/wordpress/archives/95-getting-started-with-glassfish-using-maven

尝试在我的GlassFish应用服务器上部署一个示例maven web应用程序。我的POM文件如下:

代码语言:javascript
复制
<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.cellnet.test</groupId>
  <artifactId>hello-world</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>hello-world Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <pluginRepositories>
    <pluginRepository>
        <id>maven.java.net</id>
        <name>Java.net Maven2 Repository</name>
        <url>http://download.java.net/maven/2</url>
    </pluginRepository>
  </pluginRepositories> 
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <finalName>hello-world</finalName>
    <plugins>
        <plugin>
            <groupId>org.glassfish.maven.plugin</groupId>
            <artifactId>maven-glassfish-plugin</artifactId>
            <version>2.1</version>
            <configuration>
                <user>admin</user>
                <adminPassword>password</adminPassword>
                <glassfishDirectory>C:\glassfish3</glassfishDirectory>
                <components>
                    <component>
                        <name>${project.artifactId}</name>
                        <artifact>${project.build.directory}/${project.build.finalName}.war</artifact>
                    </component>
                </components>
                <domain>
                    <name>domain1</name>
                    <adminPort>4848</adminPort>
                    <httpPort>8080</httpPort>
                    <httpsPort>8443</httpsPort>
                </domain>
            </configuration>
        </plugin>
    </plugins>
  </build>
</project>

我的GlassFish应用程序服务器已经启动并运行,但在执行以下命令时收到以下错误消息

代码语言:javascript
复制
mvn war:war glassfish:deploy

Failed to execute goal org.glassfish.maven.plugin:maven-glassfish-plugin:2.1:
deploy (default-cli) on project hello-world: Deployment of myPathToMavenProject.war 
has failed. IOException: Cannot run program "myPathToGlassfishFolder\bin\asadmin": 
CreateProcess error=193, %1 is not a valid Win32 application -> [Help 1]
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-07-15 02:13:44

here所述,这是Windows下的一个问题。在修复asadmin (不带扩展名)文件之前,删除它应该会有所帮助。

票数 30
EN

Stack Overflow用户

发布于 2015-05-12 02:32:03

使用Glassfish4时,我遇到了这个错误,重命名\删除文件是不够的。我发现了this article,并且需要从as-install-parent/binas-install/bin中删除asadmin

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6525979

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档