RESTful Webservice using Spark, Sql20/JOOQ
* Code Generation for Database ( MySQL )
Now click "Run" button of Run As wizard to see below logs in console output.
Or
You can also use command line to execute above operation ..
java -classpath jooq-3.7.0.jar;jooq-meta-3.7.0.jar;jooq-codegen-3.7.0.jar;mysql-connector-java-5.1.18-bin.jar;.
org.jooq.util.GenerationTool config/torneo.xml
... or type this on a UNIX / Linux / Mac system (colons instead of semi-colons):
java -classpath jooq-3.7.0.jar:jooq-meta-3.7.0.jar:jooq-codegen-3.7.0.jar:mysql-connector-java-5.1.18-bin.jar:.
org.jooq.util.GenerationTool config/torneo.xml
*Console Logs ...
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spark 2.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ spark-core ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-java) @ spark-core ---
[INFO]
[INFO] --- jooq-codegen-maven:3.7.0:generate (default) @ spark-core ---
[INFO] License parameters
[INFO] ----------------------------------------------------------
[INFO] Thank you for using jOOQ and jOOQ's code generator
[INFO]
[INFO] Database parameters
[INFO] ----------------------------------------------------------
[INFO] dialect : MYSQL
[INFO] URL : jdbc:mysql://localhost:3306/torneo
[INFO] target dir : F:\Justinmind\spark-master\target/generated-sources/jooq
[INFO] target package : org.jooq.util.maven.example
[INFO] includes : [.*]
[INFO] excludes : []
[INFO] includeExcludeColumns : false
[INFO] ----------------------------------------------------------
[INFO]
[INFO] DefaultGenerator parameters
[INFO] ----------------------------------------------------------
[INFO] strategy : class org.jooq.util.DefaultGeneratorStrategy
[INFO] deprecated : true
[INFO] generated annotation : true
[INFO] JPA annotations : false
[INFO] validation annotations : false
[INFO] instance fields : true
[INFO] records : true
[INFO] pojos : false
[INFO] immutable pojos : false
[INFO] interfaces : false
[INFO] daos : false
[INFO] relations : true
[INFO] global references : true
[INFO] ----------------------------------------------------------
[INFO]
[INFO] Generation remarks
[INFO] ----------------------------------------------------------
[INFO] none
[INFO]
[INFO] ----------------------------------------------------------
[INFO]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@
@@@@@@@@@@@@@@@@ @@ @@ @@@@@@@@@@
@@@@@@@@@@ @@@@ @@ @@ @@@@@@@@@@
@@@@@@@@@@ @@ @@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@ @@ @@@@@@@@@@
@@@@@@@@@@ @@ @@ @@@@ @@@@@@@@@@
@@@@@@@@@@ @@ @@ @@@@ @@@@@@@@@@
@@@@@@@@@@ @@ @ @ @@@@@@@@@@
@@@@@@@@@@ @@ @@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Thank you for using jOOQ 3.7.0
[WARNING] No schemata were loaded : Please check your connection settings, and whether your database (and your database version!) is really supported by jOOQ. Also, check the case-sensitivity in your configured <inputSchema/> elements : [public]
[INFO] Generating schemata : Total: 0
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ spark-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\Justinmind\spark-master\src\main\resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ spark-core ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ spark-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ spark-core ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ spark-core ---
[INFO] Surefire report directory: F:\Justinmind\spark-master\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running spark.BodyAvailabilityTest
[Thread-1] INFO org.eclipse.jetty.util.log - Logging initialized @1063ms
[Thread-1] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
[Thread-1] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:4567
[Thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.2.v20150730
[Thread-1] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@181949de{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[Thread-1] INFO org.eclipse.jetty.server.Server - Started @1184ms
[main] INFO spark.BodyAvailabilityTest - the body content
[main] INFO spark.webserver.JettySparkServer - >>> Spark shutting down ...
[main] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConnector@181949de{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[main] INFO spark.webserver.JettySparkServer - done
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.08 sec - in spark.BodyAvailabilityTest
Running spark.BooksIntegrationTest
[Thread-0] INFO org.eclipse.jetty.util.log - Logging initialized @443ms
[Thread-0] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
[Thread-0] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:4567
[Thread-0] INFO org.eclipse.jetty.server.Server - jetty-9.3.2.v20150730
[Thread-0] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@73779b97{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[Thread-0] INFO org.eclipse.jetty.server.Server - Started @606ms
[main] INFO spark.webserver.JettySparkServer - >>> Spark shutting down ...
[main] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConnector@73779b97{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[main] INFO spark.webserver.JettySparkServer - done
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.569 sec - in spark.BooksIntegrationTest
Running spark.CookiesIntegrationTest
[Thread-0] INFO org.eclipse.jetty.util.log - Logging initialized @443ms
[Thread-0] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
[Thread-0] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:4567
[Thread-0] INFO org.eclipse.jetty.server.Server - jetty-9.3.2.v20150730
[Thread-0] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@7f7a2e5b{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[Thread-0] INFO org.eclipse.jetty.server.Server - Started @629ms
[main] INFO spark.webserver.JettySparkServer - >>> Spark shutting down ...
[main] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConnector@7f7a2e5b{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[main] INFO spark.webserver.JettySparkServer - done
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.056 sec - in spark.CookiesIntegrationTest
Running spark.GenericIntegrationTest
[main] INFO spark.staticfiles.StaticFiles - StaticResourceHandler configured with folder = /public
[main] INFO spark.staticfiles.StaticFiles - External StaticResourceHandler configured with folder = C:\Users\RTSUSE~1\AppData\Local\Temp\
[Thread-1] INFO org.eclipse.jetty.util.log - Logging initialized @1044ms
[Thread-1] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
[Thread-1] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:4567
[Thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.2.v20150730
[Thread-1] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@4df448ab{/,null,AVAILABLE}
[Thread-1] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@5f034f98{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[Thread-1] INFO org.eclipse.jetty.server.Server - Started @1267ms
[main] INFO spark.GenericIntegrationTest - Body was: Fo shizzy
[main] INFO spark.GenericIntegrationTest - Body was: Fo shizzy
Method Override Worked
[main] INFO spark.webserver.JettySparkServer - >>> Spark shutting down ...
[main] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConnector@5f034f98{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler@4df448ab{/,null,UNAVAILABLE}
[main] INFO spark.webserver.JettySparkServer - done
Tests run: 28, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.536 sec - in spark.GenericIntegrationTest
Running spark.GenericSecureIntegrationTest
[Thread-1] INFO org.eclipse.jetty.util.log - Logging initialized @971ms
[Thread-1] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
[Thread-1] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:4567
[Thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.2.v20150730
[Thread-1] INFO org.eclipse.jetty.util.ssl.SslContextFactory - x509={} wild={} alias=null for SslContextFactory@29a44421(file:///F:/Justinmind/spark-master/src/test/resources/keystore.jks,null)
[Thread-1] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@2b237eef{SSL,[ssl, http/1.1]}{0.0.0.0:4567}
[Thread-1] INFO org.eclipse.jetty.server.Server - Started @1311ms
[qtp482485690-20] INFO spark.webserver.MatcherFilter - The requested route [/no/resource] has not been mapped in Spark
[main] INFO spark.GenericSecureIntegrationTest - Body was: Fo shizzy
[main] INFO spark.GenericSecureIntegrationTest - Body was: Fo shizzy
[main] INFO spark.webserver.JettySparkServer - >>> Spark shutting down ...
[main] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConnector@2b237eef{SSL,[ssl, http/1.1]}{0.0.0.0:4567}
[main] INFO spark.webserver.JettySparkServer - done
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.39 sec - in spark.GenericSecureIntegrationTest
Running spark.QueryParamsMapTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec - in spark.QueryParamsMapTest
Running spark.RequestTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.034 sec - in spark.RequestTest
Running spark.servlet.ServletTest
[main] INFO org.eclipse.jetty.util.log - Logging initialized @946ms
[Thread-1] INFO spark.servlet.ServletTest - >>> STARTING EMBEDDED JETTY SERVER for jUnit testing of SparkFilter
[Thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.2.v20150730
[Thread-1] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /somepath, did not find org.eclipse.jetty.jsp.JettyJspServlet
[Thread-1] INFO spark.staticfiles.StaticFiles - External StaticResourceHandler configured with folder = C:\Users\RTSUSE~1\AppData\Local\Temp\
[Thread-1] INFO spark.staticfiles.StaticFiles - StaticResourceHandler configured with folder = /public
[Thread-1] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@6d0d1468{/somepath,file:///F:/Justinmind/spark-master/src/test/webapp/,AVAILABLE}{src/test/webapp}
[Thread-1] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@436ff249{HTTP/1.1,[http/1.1]}{0.0.0.0:9393}
[Thread-1] INFO org.eclipse.jetty.server.Server - Started @2447ms
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.49 sec - in spark.servlet.ServletTest
Running spark.StaticFilesTest
[main] INFO spark.staticfiles.StaticFiles - StaticResourceHandler configured with folder = /public
[main] INFO spark.staticfiles.StaticFiles - External StaticResourceHandler configured with folder = C:\Users\RTSUSE~1\AppData\Local\Temp\
[Thread-1] INFO org.eclipse.jetty.util.log - Logging initialized @992ms
[Thread-1] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
[Thread-1] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:4567
[Thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.2.v20150730
[Thread-1] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@2c8fcb58{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[Thread-1] INFO org.eclipse.jetty.server.Server - Started @1103ms
[main] INFO spark.webserver.JettySparkServer - >>> Spark shutting down ...
[main] INFO org.eclipse.jetty.server.ServerConnector - Stopped ServerConnector@2c8fcb58{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[main] INFO spark.webserver.JettySparkServer - done
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.14 sec - in spark.StaticFilesTest
Running spark.webserver.websocket.WebSocketCreatorFactoryTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.026 sec - in spark.webserver.websocket.WebSocketCreatorFactoryTest
Results :
Tests run: 81, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-bundle-plugin:2.5.3:bundle (default-bundle) @ spark-core ---
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ spark-core ---
[INFO] Installing F:\Justinmind\spark-master\target\spark-core-2.4-SNAPSHOT.jar to C:\Users\rts user\.m2\repository\com\sparkjava\spark-core\2.4-SNAPSHOT\spark-core-2.4-SNAPSHOT.jar
[INFO] Installing F:\Justinmind\spark-master\pom.xml to C:\Users\rts user\.m2\repository\com\sparkjava\spark-core\2.4-SNAPSHOT\spark-core-2.4-SNAPSHOT.pom
[INFO]
[INFO] --- maven-bundle-plugin:2.5.3:install (default-install) @ spark-core ---
[INFO] Installing com/sparkjava/spark-core/2.4-SNAPSHOT/spark-core-2.4-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.211 s
[INFO] Finished at: 2015-10-25T14:12:26-05:00
[INFO] Final Memory: 19M/295M
[INFO] ------------------------------------------------------------------------
Great article! It's really a pleasure to visit your site. I've been following your blogs for a while and I'm really impressed by your works. Keep sharing more such blogs.
ReplyDeleteSpark Training in Chennai
Spark Training Academy Chennai
Mobile Testing Training in Chennai
Mobile Testing Course in Chennai
Unix Training in Chennai
Unix Shell Scripting Training in Chennai
Spark Training in Velachery
Spark Training in Porur