2011-06-29 11 views
9

通常、私はjava.netサイトに行き、私が取得しているエラーコードを調べますが、そのWebサイトは現在オフラインです。基本的に私はこのガイドを、次の午前:Maven GlassFishプラグイン:asadmin CreateProcess error = 193

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

は私のGlassFishアプリケーションサーバーにデプロイ例のMavenのWebアプリケーションを試してみて、取得します。次のように私のPOMファイルには、次のとおりです。

<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アプリケーションサーバーが稼働しているが、私はhereを説明したように、これはWindowsで問題です

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] 

答えて

28

を実行すると、私は、次のエラーメッセージが表示されます。 asadmin(拡張子なし)ファイルを削除すると、修正されるまで役立ちます。

+9

ファイル名を '.sh'拡張子で変更してください。 – Snekse

1

Glassfish4を使用していますが、このエラーが発生し、ファイルの名前を変更するとファイルを削除できませんでした。 this articleが見つかり、両方からasadminを削除する必要がありますas-install-parent/binas-install/bin

+1

効果的には、 'glassfish4/bin/asadmin'と' glassfish4/glassfishbin/asadmin'の名前を変更/削除する必要があります –

関連する問題