That looks fine. You should run locally with webapp-runner to see if you can reproduce the problem.

Run:

mvn package
java -jar target/dependency/webapp-runner.jar target/*.war

Let me know if you can reproduce this locally.

-James


On 08/17/2012 12:14 PM, Yuval Ron wrote:
Hi James, yes, I am trying to run it on Heroku using the webapp-runner
(it is the embedded Tomcat right?). I basically took the original
Java+Spring+Hibernate example, added some code and carefully modified
its pom.xml and web.xml, but something is not working there. My pom
looks like this:

... declarations ...

         <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>javax.servlet-api</artifactId>
             <version>3.0.1</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>com.github.jsimone</groupId>
             <artifactId>webapp-runner</artifactId>
             <version>7.0.22.3</version>
             <scope>provided</scope>
         </dependency>

... dependencies ...


     <build>
         <plugins>
             <plugin>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
                     <source>1.6</source>
                     <target>1.6</target>
                 </configuration>
             </plugin>
             <plugin>
                 <artifactId>maven-war-plugin</artifactId>
                 <version>2.2</version>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <version>2.4</version>
                 <executions>
                     <execution>
                         <phase>package</phase>
                         <goals>
                             <goal>copy</goal>
                         </goals>
                         <configuration>
                             <artifactItems>
                                 <artifactItem>
                                     <groupId>com.github.jsimone</groupId>
                                     <artifactId>webapp-runner</artifactId>
                                     <version>7.0.22.3</version>

<destFileName>webapp-runner.jar</destFileName>
                                 </artifactItem>
                             </artifactItems>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
         </plugins>
     </build>

So this should have worked.. any idea?

Yuval


On Fri, Aug 17, 2012 at 7:44 PM, James Ward <[email protected]
<mailto:[email protected]>> wrote:

    How are you running your app on Heroku?  Are you using
    webapp-runner? If so, what happens when you run locally with
    webapp-runner?

    -James



    On 08/17/2012 11:41 AM, yuvalr80 wrote:

        I use Java + Spring for my app. I am running on a local Tomcat 7
        and everything works fine.
        When I deploy my code to Git, the Maven build is completed
        successfully, but then I can not browse to the website - I get
        two errors on Firebug:

        "NetworkError: 404 Not Found - http://myapp.herokuapp.com/";
        "The character encoding of the plain text document was not
        declared. The document will render with garbled text in some
        browser configurations if the document contains characters from
        outside the US-ASCII range. The character encoding of the file
        needs to be declared in the transfer protocol or file needs to
        use a byte order mark as an encoding signature."

        I do not understand why it works on a my local server but not on
        my Heroku instance, and what does it have to do with character
        encoding?

        Heroku sample apps are running fine also after I change them so
        I guess it's not a Maven config issue.

        I do use a Spring CharacterEncodingFilter in my web.xml:

                 <filter>
                         <filter-name>encodingFilter</__filter-name>

        
<filter-class>org.__springframework.web.filter.__CharacterEncodingFilter</__filter-class>
                         <init-param>
                                 <param-name>encoding</param-__name>
                                 <param-value>UTF-8</param-__value>
                         </init-param>
                         <init-param>
                                 <param-name>forceEncoding</__param-name>
                                 <param-value>true</param-__value>
                         </init-param>
                 </filter>
                 <filter-mapping>
                         <filter-name>encodingFilter</__filter-name>
                         <url-pattern>/*</url-pattern>
                 </filter-mapping>

        But even if I remove it the problem persists.
        Did anyone ever encounter this issue?

        Thanks,
        Yuval

        --
        You received this message because you are subscribed to the Google
        Groups "Heroku" group.

        To unsubscribe from this group, send email to
        heroku+unsubscribe@__googlegroups.com
        <mailto:heroku%[email protected]>
        For more options, visit this group at
        http://groups.google.com/__group/heroku?hl=en_US?hl=en
        <http://groups.google.com/group/heroku?hl=en_US?hl=en>


    --
    You received this message because you are subscribed to the Google
    Groups "Heroku" group.

    To unsubscribe from this group, send email to
    heroku+unsubscribe@__googlegroups.com
    <mailto:heroku%[email protected]>
    For more options, visit this group at
    http://groups.google.com/__group/heroku?hl=en_US?hl=en
    <http://groups.google.com/group/heroku?hl=en_US?hl=en>




--
yuval.ron
ceo.iullui
[email protected] <mailto:[email protected]>
m: +49 (0)176 70781385
skp: yuval.iullui
<http://iullui.com/>

--
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

--
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

Reply via email to