Hibernate Project + maven 3 + Jetty 9.3 Web Server – My study Notes

  1. Create Simple Project – using eclipse IDE.
  2. At Command Prompt , run the maven script to create example Dynamic Web Project:
  • mvn archetype:generate -DgroupId=com.fndong -DartifactId=JettyHibernate -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false


3. Then, import project to your Eclipse IDE , using “Existing Maven Projects” .Setting up and fix if its have an errors.

4. add the jetty Maven Plugin add inside pom.xml , so i can use jetty web server for running my simple application.

<!– https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-maven-plugin –>

4.2. And also servlet

<!– Servlet Library –>

5. pom.xml

<project xmlns=”http://maven.apache.org/POM/4.0.0&#8243; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
  xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd”&gt;
  <name>HibernateJetty Maven Webapp</name>
    <!– https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-maven-plugin –>
            <!– http://mvnrepository.com/artifact/org.eclipse.jetty/jetty-maven-plugin –>

6. Run Configurations… at eclipse IDE.


7. Add New Maven Build for Jetty running program.


  • Apply and Run


8. Errors after running the command:

Exception in thread “main” java.util.ServiceConfigurationError: org.apache.juli.logging.Log: Provider org.eclipse.jetty.apache.jsp.JuliLog not a subtype
    at java.util.ServiceLoader.fail(ServiceLoader.java:239)

9. If you guys read that error, can you guys help me to solve it. why jetty command in run configuration Eclipse IDE does not run.

10. I’ll continue using command prompt to run it.

  • Run command jetty : mvn package jetty:run


 11. Output my web in browser – http://localhost:8080/JettyHibernate/:


12. Maybe my eclipse setting have problem, my command prompt work fine.

13. I’ll Ignore with jetty run on eclipse , I just using directly run on command prompt – mvn package jetty:run.

14. Continue integrate with Facade Design Pattern + Hibernate ORM + mysql