Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » deploy and run jetty OUTSIDE ECLIPSE for a war which consist of an angular-Java application (I cannot deploy a war representing a java-angular application on jetty)
deploy and run jetty OUTSIDE ECLIPSE for a war which consist of an angular-Java application [message #1800347] Tue, 25 December 2018 11:19 Go to next message
Xavier Flamant is currently offline Xavier FlamantFriend
Messages: 8
Registered: February 2014
Junior Member
As Jetty is supported by the Eclipse foundation, I post my question on this forum.
Firstly I want to do the following outside Eclipse :
I have a war that I want to deploy and run on Jetty. It is an angular-Java project that I built on Eclipse-Maven
(see image1.png attached)
index.php/fa/34561/0/

I have also downloaded Jetty 9 on my mac and here is a print screen of the hierarchy
(see image2.png attached)
index.php/fa/34562/0/

As you can see, according to a post that I found on internet (and that I didn't keep a trace of), I put my war file under webapps directory and I created a webapps.demo directory with a tourism-services.xml file, which is the following
(see image3.png attached)
index.php/fa/34563/0/

According to that post (https://stackoverflow.com/questions/3623412/jetty-run-war-using-only-command-line#answer-4744119), I run the following command
MBP-de-Admin:.m2 admin$ cd /Users/admin/Application-Marwen/Jetty/jetty-distribution-9.4.12.v20180830 
    MBP-de-Admin:jetty-distribution-9.4.12.v20180830 admin$ java -jar start.jar -Dwar.location=./webapps/tourism-services.war -DcontextPath=/tourism-services ./etc/jetty-http.xml


As you can see, I use jetty-http.xml following the instruction of that page : https://www.eclipse.org/jetty/documentation/9.4.x/quick-start-configure.html

The logs shows no error :
MBP-de-Admin:.m2 admin$ cd /Users/admin/Application-Marwen/Jetty/jetty-distribution-9.4.12.v20180830 
MBP-de-Admin:jetty-distribution-9.4.12.v20180830 admin$ java -jar start.jar -Dwar.location=./webapps/tourism-services.war -DcontextPath=/tourism-services ./etc/jetty-http.xml
WARN  : System properties and/or JVM args set.  Consider using --dry-run or --exec
2018-12-19 19:31:21.730:INFO::main: Logging initialized @956ms to org.eclipse.jetty.util.log.StdErrLog
2018-12-19 19:31:22.065:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended.  See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html
2018-12-19 19:31:22.148:INFO:oejs.Server:main: jetty-9.4.12.v20180830; built: 2018-08-30T13:59:14.071Z; git: 27208684755d94a92186989f695db2d7b21ebc51; jvm 1.8.0_131-b11
2018-12-19 19:31:22.180:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///Users/admin/Application-Marwen/Jetty/jetty-distribution-9.4.12.v20180830/webapps/] at interval 1
2018-12-19 19:31:25.029:WARN:oeja.AnnotationParser:main: Unknown asm implementation version, assuming version 393216
2018-12-19 19:31:25.757:WARN:oeja.AnnotationParser:qtp705265961-15: org.terracotta.context.AbstractTreeNode scanned from multiple locations: jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-3.5.2.jar!/org/terracotta/context/AbstractTreeNode.class, jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-2.10.3.jar!/org/terracotta/context/AbstractTreeNode.class
2018-12-19 19:31:25.758:WARN:oeja.AnnotationParser:qtp705265961-15: org.terracotta.context.ContextCreationListener scanned from multiple locations: jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-3.5.2.jar!/org/terracotta/context/ContextCreationListener.class, jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-2.10.3.jar!/org/terracotta/context/ContextCreationListener.class
2018-12-19 19:31:25.758:WARN:oeja.AnnotationParser:qtp705265961-15: org.terracotta.context.ContextElement scanned from multiple locations: jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-3.5.2.jar!/org/terracotta/context/ContextElement.class, jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-2.10.3.jar!/org/terracotta/context/ContextElement.class
................
.................
................
[main] DEBUG org.jboss.resteasy.cdi.i18n - RESTEASY010575: No CDI beans found for class org.jboss.resteasy.plugins.providers.multipart.MimeMultipartProvider. Using default ConstructorInjector.
19:31:30.199 [main] DEBUG org.jboss.resteasy.cdi.i18n - RESTEASY010575: No CDI beans found for class org.jboss.resteasy.plugins.providers.multipart.XopWithMultipartRelatedReader. Using default ConstructorInjector.
19:31:30.200 [main] DEBUG org.jboss.resteasy.cdi.i18n - RESTEASY010575: No CDI beans found for class org.jboss.resteasy.plugins.providers.multipart.XopWithMultipartRelatedWriter. Using default ConstructorInjector.
19:31:30.212 [main] INFO org.jboss.weld.environment.servletWeldServlet - WELD-ENV-001009: org.jboss.weld.environment.servlet.Listener used for ServletRequest and HttpSession notifications
2018-12-19 19:31:30.291:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@2758fe70{Archetype Created Web Application,/tourism-services,file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/,AVAILABLE}{/tourism-services.war}
2018-12-19 19:31:30.323:INFO:oejs.AbstractConnector:main: Started ServerConnector@e18d7ad{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2018-12-19 19:31:30.323:INFO:oejs.Server:main: Started @9550ms


To get the exploded war, I created a work directory under JETTY_HOME and run again the java command, and I obtain the exploded war in the work directory
(see image4.png attached)
index.php/fa/34564/0/

But when I look at http://localhost:8080/tourism-services or http://localhost:8080/tourism-services/index.html address in my browser, there is the following error displaying in my console :
javax.ws.rs.NotFoundException: RESTEASY003210: Could not find resource for full path: http://localhost:8080/tourism-services/[index.html]


What I want to obtain : deploy and run the most simply the java + angular application in

1) development

2) in production
  • Attachment: image1.png
    (Size: 44.45KB, Downloaded 346 times)
  • Attachment: image2.png
    (Size: 46.44KB, Downloaded 323 times)
  • Attachment: image3.png
    (Size: 56.70KB, Downloaded 300 times)
  • Attachment: image4.png
    (Size: 106.66KB, Downloaded 317 times)

[Updated on: Wed, 26 December 2018 17:44]

Report message to a moderator

Re: deploy and run jetty OUTSIDE ECLIPSE for a war which consist of an angular-Java application [message #1800352 is a reply to message #1800347] Tue, 25 December 2018 15:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
The Eclipse Foundation is a management organization. It supports projects only by virtue of development processes and hosting infrastructure. And the JDT forum is not the right place to ask about Jetty. The Jetty home page has a link to their mailing lists:

https://www.eclipse.org/jetty/mailinglists.html

Apparently the Jetty developers prefer to handle user questions about Jetty via email using the jetty-users@eclipse.org mailing list.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: deploy and run jetty OUTSIDE ECLIPSE for a war which consist of an angular-Java application [message #1800399 is a reply to message #1800352] Wed, 26 December 2018 17:57 Go to previous message
Xavier Flamant is currently offline Xavier FlamantFriend
Messages: 8
Registered: February 2014
Junior Member
Thank you for the recommandation Ed
Previous Topic:The calling class org.jboss.resteasy.cdi.CdiInjectorFactory is placed in multiple bean archives
Next Topic:What is a text, a video series or a website or a blog or any source that helps to learn Eclipse
Goto Forum:
  


Current Time: Thu Mar 28 14:14:46 GMT 2024

Powered by FUDForum. Page generated in 0.02626 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top