lundi 13 février 2017

heroku open JSF Web app after deployment fails to start process

I want to deploy a JSF Web App to Heroku but after I enter the command heroku open my website does not show up.

In heroku logs I can see this error: The specified path "target/*.war" does not exist.

Do I have to have the folder "target" somewhere in my project or am I missing any other files that needs to be set up?

    ~\Documents\GitHub\jsfproject [master ↑1]> heroku logs
    2017-02-13T21:10:04.496006+00:00 heroku[web.1]: State changed from starting to crashed
    2017-02-13T21:10:10.434513+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ninjaxmag
    axweb.herokuapp.com request_id=451b14fa-2258-4964-a229-e965f5a945a4 fwd="81.217.207.71" dyno= connect= service= status=5
    03 bytes=
    2017-02-13T21:10:10.987742+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" hos
    t=ninjaxmagaxweb.herokuapp.com request_id=6a100afd-0cec-45cb-a59f-441bf4b0292b fwd="81.217.207.71" dyno= connect= servic
    e= status=503 bytes=
    2017-02-13T21:18:31.620506+00:00 heroku[slug-compiler]: Slug compilation started
    2017-02-13T21:18:31.620512+00:00 heroku[slug-compiler]: Slug compilation finished
    2017-02-13T21:18:31.635038+00:00 heroku[web.1]: State changed from crashed to starting
    2017-02-13T21:18:31.350496+00:00 app[api]: Release v11 created by user email
    2017-02-13T21:18:31.350496+00:00 app[api]: Deploy b96902b by user email
    2017-02-13T21:18:31.545432+00:00 app[api]: Release v11 created by user email
    2017-02-13T21:18:34.327754+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -jar target/dependency/we
    bapp-runner.jar --port 4756 target/*.war`
    2017-02-13T21:18:35.966894+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will
     override them.
    2017-02-13T21:18:35.970218+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx350m -Xss512k -Dfile.encoding=UTF-8
    2017-02-13T21:18:36.167954+00:00 app[web.1]: The specified path "target/*.war" does not exist.
    2017-02-13T21:18:36.171679+00:00 app[web.1]: Usage: <main class> [options]
    2017-02-13T21:18:36.171681+00:00 app[web.1]:   Options:
    2017-02-13T21:18:36.171682+00:00 app[web.1]:         --basic-auth-pw                     Password to be used with basic
    auth.
    2017-02-13T21:18:36.171682+00:00 app[web.1]:                                             

...

     for
    2017-02-13T21:18:36.171736+00:00 app[web.1]:                                             the Connector.
    2017-02-13T21:18:36.171736+00:00 app[web.1]:         --use-body-encoding-for-uri         Set if the entity body encoding

    2017-02-13T21:18:36.171737+00:00 app[web.1]:                                             should be used for the URI.
    2017-02-13T21:18:36.171737+00:00 app[web.1]:                                             Default: false
    2017-02-13T21:18:36.171743+00:00 app[web.1]:
    2017-02-13T21:18:36.248955+00:00 heroku[web.1]: State changed from starting to crashed
    2017-02-13T21:18:36.233703+00:00 heroku[web.1]: Process exited with status 1
    2017-02-13T21:18:51.312879+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ninjaxmag
    axweb.herokuapp.com request_id=f87418e8-16ac-41e3-af6b-5c977a56b0d9 fwd="81.217.207.71" dyno= connect= service= status=5
    03 bytes=
    2017-02-13T21:18:51.911904+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" hos
    t=ninjaxmagaxweb.herokuapp.com request_id=a6bd6677-c456-451f-92f7-69b764b17e4d fwd="81.217.207.71" dyno= connect= servic
    e= status=503 bytes=

My pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://ift.tt/IH78KX" xmlns:xsi="http://ift.tt/ra1lAU" xsi:schemaLocation="http://ift.tt/IH78KX http://ift.tt/VE5zRx">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.component</groupId>
    <artifactId>mavenproject1</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <name>Maven Quick Start Archetype</name>
    <url>http://ift.tt/19pvvEY;

    <dependencies>
        <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.2</version>
        <scope>test</scope>
        </dependency>

        <dependency>
          <groupId>jboss.web</groupId>
          <artifactId>servlet-api</artifactId>
          <version>2.1.0.GA</version>
        </dependency>
    </dependencies>

        <build>
            <finalName>jsfproject</finalName>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.3</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals><goal>copy</goal></goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                 <groupId>com.github.jsimone</groupId>
                                <artifactId>webapp-runner</artifactId>
                                        <version>8.0.30.2</version>
                             <destFileName>webapp-runner.jar</destFileName>
                                    </artifactItem>
                                </artifactItems>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
</project>

Procfile:

web:    java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war

Aucun commentaire:

Enregistrer un commentaire