You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Ali Baharev <al...@gmail.com> on 2022/07/03 18:37:48 UTC

Jetty container not starting

Hello everyone,

I am following the Getting Started Guide on the website,
and up until 4.1.1. Running Web Application everything works.

When I try to run the web application, I don't get any error messages,
but it just does not start Jetty after successfully building the project.

The last few lines:

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @
tutorial ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< jetty-maven-plugin:9.4.8.v20171121:run (default-cli) <
test-compile @ tutorial <<<
[INFO]
[INFO]
[INFO] --- jetty-maven-plugin:9.4.8.v20171121:run (default-cli) @ tutorial
---
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time:  2.407 s
[INFO] Finished at: 2022-07-03T20:26:01+02:00
[INFO]
------------------------------------------------------------------------
Disconnected from the target VM, address: '127.0.0.1:59459', transport:
'socket'

I ran it with [DEBUG] printed, still now error messages, nothing.
The issue is quite similar to this:

https://github.com/eclipse/jetty.project/issues/1989

If I add <packaging>war</packaging> to the pom.xml
then Jetty does start but it cannot serve the web application.
I guess this project was not meant to be served as a war,
so I am not surprised. In any case, Jetty is also properly installed
as it at least starts (but cannot serve the project as war).

I don't see my mistake, and I don't get any error messages.

How can I fix this?

Any help is greatly appreciated.

Best wishes,

Ali

Re: Jetty container not starting

Posted by Andrus Adamchik <aa...@gmail.com>.
Hi Ali,

Thanks for sharing what you do with Cayenne. Yes, a pull request on GitHub would be appreciated.

Thanks,
Andrus

> On Jul 4, 2022, at 1:25 PM, Ali Baharev <al...@gmail.com> wrote:
> 
> Dear Andrus,
> 
>> I think that we simply need to
>> remove the "Converting to Web Application" section, which is indeed dated.
> 
> Please don't!
> 
> I am teaching Java for absolute beginners, and Apache Cayenne and this
> tutorial is exactly what I have been looking for.
> 
> I think just pinning down the version numbers to something that we
> know for sure works would solve the issues. And fixing the bugs in the
> text of the tutorial on the website... There were a few of those.
> 
> If there is any interest, I am willing to submit a "patch" and then
> the tutorial will be OK.
> 
> Thanks for this Getting Started Guide, it really helps me giving the
> Java course.
> 
> Best wishes,
> 
> Ali


Re: Jetty container not starting

Posted by Ali Baharev <al...@gmail.com>.
Dear Andrus,

> I think that we simply need to
> remove the "Converting to Web Application" section, which is indeed dated.

Please don't!

I am teaching Java for absolute beginners, and Apache Cayenne and this
tutorial is exactly what I have been looking for.

I think just pinning down the version numbers to something that we
know for sure works would solve the issues. And fixing the bugs in the
text of the tutorial on the website... There were a few of those.

If there is any interest, I am willing to submit a "patch" and then
the tutorial will be OK.

Thanks for this Getting Started Guide, it really helps me giving the
Java course.

Best wishes,

Ali

Re: Jetty container not starting

Posted by Andrus Adamchik <aa...@gmail.com>.
Glad that you were able to find the solution. Honestly, there's so many flavors of environments these days, that I think that we simply need to remove the "Converting to Web Application" section, which is indeed dated.

Andrus

> On Jul 4, 2022, at 9:57 AM, Ali Baharev <al...@gmail.com> wrote:
> 
> Adding:
> 
>    <packaging>war</packaging>
> 
> and
>            <plugin>
>                <groupId>org.eclipse.jetty</groupId>
>                <artifactId>jetty-maven-plugin</artifactId>
>                <version>9.4.25.v20191220</version>
>                <configuration>
>                   <supportedPackagings>war</supportedPackagings>
>               </configuration>
> 
> seems to solve the problem. I seriously think that the Getting Started
> Guide should be updated on the website. I was not having fun fixing
> this issue.
> 
> Ali


Re: Jetty container not starting

Posted by Ali Baharev <al...@gmail.com>.
Adding:

    <packaging>war</packaging>

and
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.4.25.v20191220</version>
                <configuration>
                   <supportedPackagings>war</supportedPackagings>
               </configuration>

seems to solve the problem. I seriously think that the Getting Started
Guide should be updated on the website. I was not having fun fixing
this issue.

Ali