0

I am modifying a WebApp provided by I-Jetty (Console) and wish to deploy it from I-Jetty. The WebApp used to work but now when accessed from my browser, I receive:

HTTP ERROR: 503

Problem accessing /console. Reason:

Service Unavailable
Powered by Jetty://

Note: I get no build errors and the WebApp is installed fine to I-Jetty. I am using jdk1.6.0_45 and have Maven3.0.5 installed

My POM.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<project
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.mortbay.ijetty</groupId>
  <artifactId>console-parent</artifactId>
  <packaging>pom</packaging>
  <version>3.2-SNAPSHOT</version>
  <name>I-Jetty :: Console Parent</name>
  <description>Parent project for console</description>
  <modules>
    <module>webapp</module>
    <module>apk</module>
  </modules>
  <properties>
     <android.version>4.1.1.4</android.version>
     <jetty.version>8.1.11.v20130520</jetty.version>
     <servlet.version>3.0.20100224</servlet.version>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.4</version>
      </plugin>
    </plugins>
  </build>
</project>

Can you please help me understand why this is happening and suggest a fix?

Edit: I figured out the problem. Still don't have a solution.

The classes.zip file was not being created during the webapp installation onto I-Jetty. When I copy the classes manually into the jetty/webapps/console/web-inf/classes folder created when installing the webapp, the access from a browser works... I'm not sure why the zip file is not being created though.

Artail3
  • 272
  • 3
  • 6
  • For some reason it is now working and instead of getting the HTTP503error, my Webapp is being loaded as intended. I wish I understood what the real issue was... For now, if anyone is faced with this issue, try changing your **jetty** target version in your main pom as it is the only thing I changed in between tests. – Artail3 Jul 21 '13 at 17:44

1 Answers1

0

I ended up answering my own question in this question: How to compile a .war file to i-jetty (android web server)? , and am posting it here for anyone else who has run into the same error:

So basically as the official i-jetty website says, you need to include the 3 things in your pom.xml listen in the site https://code.google.com/p/i-jetty/wiki/DownloadableWebapps. Now the problem you will face by only including those three is that on newer Android releases (the android-maven-plugin), you will face issues with the part. So you need to add the Following to enable correct execution (add it AFTER closing the plugins element, and BEFORE closing the build element ( <./plugin> ADD IT HERE <./build> , without the dots):

<pluginManagement>
  <plugins>
    <plugin>
      <groupId>org.eclipse.m2e</groupId>
      <artifactId>lifecycle-mapping</artifactId>
      <version>1.0.0</version>
      <configuration>
        <lifecycleMappingMetadata>
          <pluginExecutions>
            <pluginExecution>
              <pluginExecutionFilter>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <versionRange>[2.0,)</versionRange>
                <goals>
                  <goal>copy-dependencies</goal>
                </goals>
              </pluginExecutionFilter>
              <action>
                <execute />
              </action>
            </pluginExecution>
          </pluginExecutions>
        </lifecycleMappingMetadata>
      </configuration>
    </plugin>
  </plugins>
</pluginManagement>

Now when you run the maven build, you will generate the your_webapp.war file you need in the your_application/target/res-overlay/raw folder. Copy the your_webapp.war file into the your_application/res/raw folder. Now run the maven build again. There you have it!! The webapp can be built correctly now :) And you will no longer get the error 503 message.

Community
  • 1
  • 1
Artail3
  • 272
  • 3
  • 6