I Can´t start jetty from command line, it want´s a Main-Class manifest attribute

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

I Can´t start jetty from command line, it want´s a Main-Class manifest attribute

ambartsumian
Hi Guys, i´m new around here, so i will try to ask in the right way ;)

I´m doing an app on facebook, and i´m using jetty, here is the guide that i´m using : Heroku jetty deploy guide

In this guide, the way to start jetty it´s this:
java -jar jetty-runner.jar application.war

and this is exactly the same way recomended for the jetty howto guide:
java -jar jetty-runner.jar my.war

So i believe that until here, i´m doing everything fine. The war it´s an application that i´m developing, and the jetty runner jar i obtained through maven, here the tags of my pom.xml, extracted from the heroku guide:
                <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>org.mortbay.jetty</groupId>
                                                                        <artifactId>jetty-runner</artifactId>
                                                                        <version>8.1.12.v20130726</version>
                                                                        <destFileName>jetty-runner.jar</destFileName>
                                                                </artifactItem>
                                                        </artifactItems>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
                </plugins>

So, the reason that i´m asking here, it´s that i can´t start jetty from command line neither in a remote way (through a deploy on heroku). The error i get, when i execute (with master admin privileges in windows 7) java -jar jetty-runner.jar my.war  is the following:
Failed to load Main-Class manifest attribute from jetty-runner.jar

And i don´t understand this, i´m using the jar downloaded through maven, it´s supose to work in the right way, right?

I open the manifest of the jetty-runer.jar and it doesnt have a Main-class attribute, so? what should i do?
Reply | Threaded
Open this post in threaded view
|

Re: I Can´t start jetty from command line, it want´s a Main-Class manifest attribute

ambartsumian
Solved.

The problem was that in the version 8.1.12.v20130726, the jar doesn´t has a main-class attribute in the manifest (i don´t know why, and it´s very confusing). I used the 8.1.14.v20131031 version and it works from command line, and in a remote way, as expected.

Thanxs and happy new year!
Reply | Threaded
Open this post in threaded view
|

Re: I Can´t start jetty from command line, it want´s a Main-Class manifest attribute

Joakim Erdfelt-9
Confirmed ...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 5106k  100 5106k    0     0  1961k      0  0:00:02  0:00:02 --:--:-- 2028k

$ sha1sum jetty-runner-8.1.12.v20130726.jar 
f0824f38c4b6416b3c6da2eedd5f6fac09c3d4dd  jetty-runner-8.1.12.v20130726.jar

$ jar -tvf jetty-runner-8.1.12.v20130726.jar | grep -i manifest
   237 Fri Jul 26 14:57:38 MST 2013 META-INF/MANIFEST.MF
  2891 Fri Sep 09 14:33:52 MST 2011 org/eclipse/jdt/internal/compiler/util/ManifestAnalyzer.class

$ jar -xvf jetty-runner-8.1.12.v20130726.jar META-INF/MANIFEST.MF
 inflated: META-INF/MANIFEST.MF

$ cat META-INF/MANIFEST.MF 
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: jesse
Build-Jdk: 1.7.0_25
Implementation-Vendor: MortBay - Jetty
Implementation-Version: 8.1.12.v20130726

Not present.


--
Joakim Erdfelt <[hidden email]>
Expert advice, services and support from from the Jetty & CometD experts


On Wed, Jan 1, 2014 at 9:34 AM, ambartsumian <[hidden email]> wrote:
Solved.

The problem was that in the version 8.1.12.v20130726, the jar doesn´t has a
main-class attribute in the manifest (i don´t know why, and it´s very
confusing). I used the 8.1.14.v20131031 version and it works from command
line, and in a remote way, as expected.

Thanxs and happy new year!



--
View this message in context: http://jetty.4.x6.nabble.com/I-Can-t-start-jetty-from-command-line-it-want-s-a-Main-Class-manifest-attribute-tp4961837p4961838.html
Sent from the Jetty Support mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email