Jboss Deploy Jdbc Driver Maven




What is it?

JBoss Data Grid uses a RESTful service, eliminating the need for tightly coupled client libraries and bindings. The REST API requires a REST client or custom code to understand and create REST calls. JBoss Data Grid's sole requirement is a HTTP client library. For Java, the Apache HTTP Commons Client is recommended. Alternatively, the java.net API can be used.

Version Repository Usages Date; 3.12.x. 3.12.17: Central: 0 Jan, 2021: 3.12.16: Central: 0 Dec, 2020. This question is here to give an answer to once i find a solution, I have found documentation on Postgresql and H2 databases from the jboss website and have seen how it is done manually through this website, however I cannot seem to find much information on how to deploy a mysql datasource using the jboss-as-maven-plugin. I've built a new Maven-based JSF/Spring web app, using Helios. I was using the plugged-in Tomcat server support to deploy through Eclipse, with hotsynch, etc working fine. This week I'm switching over to JBoss AS 6.0 (from Tomcat 6). I've installed all the eclipse JBoss Tools plugins, and have a JBoss server that I start/stop through Eclipse. It also declares a dependency on the javax.api and javax.transaction.api modules, since the JDBC driver depends on classes from these modules. Remember to make corrections to the JBDC driver resource path, if you are using a driver JAR with a different name. The JBoss EAP directory structure should now look like this. Oracle JDBC drivers and Universal Connection Pool (ucp.jar) are available in the Oracle Maven Repository. The following versions of the JDBC drivers and UCP are available: 19.3.0.0, 18.3.0.0, 12.2.0.1, 12.1.0.2, 12.1.0.1, and 11.2.0.4.

This quickstart demonstrates how to connect remotely to JBoss Data Grid (JDG) to store, retrieve, and remove data from cache using the HTTP Commons Client RESTful client APIs. This simple Football Manager console application allows you to add and remove teams, add players to or remove players from teams, or print a list of the current teams and players using the REST interface based connector.

System requirements

All you need to build this project is Java 6.0 (Java SDK 1.6) or better, Maven 3.0 or better.

The application this project produces is designed to be run on JBoss Data Grid 6.x

Configure Maven

If you have not yet done so, you must Configure Maven before testing the quickstarts.

Configure JDG

  1. Obtain JDG server distribution on Red Hat's Customer Portal at https://access.redhat.com/jbossnetwork/restricted/listSoftware.html

  2. Install a JDBC driver into JDG (since JDG includes H2 by default, this step may be skipped for the scope of this example). More information can be found in the DataSource Management chapter of the Administration and Configuration Guide for JBoss Enterprise Application Platform on the Customer Portal at https://access.redhat.com/site/documentation/JBoss_Enterprise_Application_Platform/ . NOTE: JDG does not support deploying applications so one cannot install it as a deployment.

  3. This Quickstart uses JDBC to store the cache. To permit this, it's necessary to alter JDG configuration file (JDG_HOME/standalone/configuration/standalone.xml) to contain the following definitions:

  • Datasource subsystem definition:

  • Infinispan subsystem definition:

  1. Disable REST endpoint security: by default the standalone.xml configuration protects the REST endpoint with BASIC authentication. Since this quickstart cannot perform authentication, the REST connector should be configured without it:

Start JDG

  1. Open a command line and navigate to the root of the JDG directory.
  2. The following shows the command line to start the server with the web profile:

Build and Run the Quickstart

NOTE: The following build command assumes you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line. See Build and Deploy the Quickstarts for complete instructions and additional options.

  1. Make sure you have started the JDG as described above.
  2. Open a command line and navigate to the root directory of this quickstart.
  3. Type this command to build and deploy the archive:

  4. This will create a file at target/rest-endpoint-quickstart.jar

  5. Run the example application in its directory:

Using the application

Basic usage scenarios can look like this (keyboard shortcuts will be shown to you upon start):

Type q one more time to exit the application.

Debug the Application

If you want to debug the source code or look at the Javadocs of any library in the project, run either of the following commands to pull them into your local repository. The IDE should then detect them.

Recent Changelog

  • Jan 7, 2016(Martin Gencur):Fix readme to allow for smooth start of the server
  • Dec 3, 2015(Jiri Holusa):BZ1288098 JBQA 12055 Migrate quickstarts to uberjars
  • Nov 3, 2015(Martin Gencur):Change links in readme file to use absolute path
  • Nov 3, 2014(Jiri Holusa):Updated subsystem versions in README files
  • Sep 22, 2014(Jiri Holusa):ISPN 4747 Update README files in quickstarts
  • Jul 31, 2014(Martin Gencur):BZ919423 Remove eviction configuration from Carmart quickstart
  • Jun 24, 2014(Martin Gencur):BZ1112394 Incorrect or confusing descriptions on Quick Starts
  • Oct 30, 2013(Martin Gencur):ISPN 3553 Remove references to AS 7.1 in the JDG quickstarts
  • Oct 8, 2013(Jiri Holusa):Added quickstart tests
  • Sep 18, 2013(Martin Gencur):Upgrade quickstarts to ISPN 6.0.0.CR1
Please enable JavaScript to view the comments powered by Disqus.
Your Rating:

I am trying to deploy a simple HelloWorld servlet using JBoss EAP 6.2 and jboss-as-maven-plugin.

Here are the files :

pom.xml

web.xml

HelloWorld.java

The console messages of the server are the following :

stavross-mbp:Tmt-Project2 Administrator$ mvn clean install

[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 Tmt-Project2 1.0-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ Tmt-Project2 ---

[INFO] Deleting /Users/Administrator/IdeaProjects/Tmt-Project2/target

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Tmt-Project2 ---

[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 0 resource

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Tmt-Project2 ---

[INFO] Changes detected - recompiling the module!

[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

[INFO] Compiling 1 source file to /Users/Administrator/IdeaProjects/Tmt-Project2/target/classes

[INFO]

Oracle

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Tmt-Project2 ---

[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory /Users/Administrator/IdeaProjects/Tmt-Project2/src/test/resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Tmt-Project2 ---

[INFO] Nothing to compile - all classes are up to date

[INFO]

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ Tmt-Project2 ---

[INFO] No tests to run.

[INFO]

[INFO] --- maven-war-plugin:2.4:war (default-war) @ Tmt-Project2 ---

[INFO] Packaging webapp

[INFO] Assembling webapp [Tmt-Project2] in [/Users/Administrator/IdeaProjects/Tmt-Project2/target/Tmt-Project2-1.0-SNAPSHOT]

[INFO] Processing war project

[INFO] Copying webapp resources [/Users/Administrator/IdeaProjects/Tmt-Project2/src/main/webapp]

[INFO] Webapp assembled in [40 msecs]

[INFO] Building war: /Users/Administrator/IdeaProjects/Tmt-Project2/target/Tmt-Project2-1.0-SNAPSHOT.war

[INFO]

[INFO] >>> jboss-as-maven-plugin:7.5.Final:run (running) @ Tmt-Project2 >>>

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Tmt-Project2 ---

[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] Copying 0 resource

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Tmt-Project2 ---

[INFO] Nothing to compile - all classes are up to date

[INFO]

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Tmt-Project2 ---

[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory /Users/Administrator/IdeaProjects/Tmt-Project2/src/test/resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Tmt-Project2 ---

[INFO] Nothing to compile - all classes are up to date

[INFO]

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ Tmt-Project2 ---

[INFO] No tests to run.

[INFO] Skipping execution of surefire because it has already been run for this configuration

[INFO]

[INFO] --- maven-war-plugin:2.4:war (default-war) @ Tmt-Project2 ---

[INFO] Packaging webapp

[INFO] Assembling webapp [Tmt-Project2] in [/Users/Administrator/IdeaProjects/Tmt-Project2/target/Tmt-Project2-1.0-SNAPSHOT]

[INFO] Processing war project

[INFO] Copying webapp resources [/Users/Administrator/IdeaProjects/Tmt-Project2/src/main/webapp]

[INFO] Webapp assembled in [4 msecs]

[INFO] Building war: /Users/Administrator/IdeaProjects/Tmt-Project2/target/Tmt-Project2-1.0-SNAPSHOT.war

[INFO]

[INFO] <<< jboss-as-maven-plugin:7.5.Final:run (running) @ Tmt-Project2 <<<

[INFO]

[INFO] --- jboss-as-maven-plugin:7.5.Final:run (running) @ Tmt-Project2 ---

[INFO] JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre

[INFO] JBOSS_HOME=/Users/Administrator/Servers/jboss-eap-6.2

[INFO] Server is starting up. Press CTRL + C to stop the server.

Jul 21, 2014 3:07:49 PM org.xnio.Xnio <clinit>

Oracle Jdbc Driver Maven

INFO: XNIO Version 3.0.7.GA

Jul 21, 2014 3:07:49 PM org.xnio.nio.NioXnio <clinit>

INFO: XNIO NIO Implementation Version 3.0.7.GA

Jul 21, 2014 3:07:49 PM org.jboss.remoting3.EndpointImpl <clinit>

INFO: JBoss Remoting version 3.2.12.GA

15:07:50,279 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.0.Final-redhat-2

15:07:50,465 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA-redhat-1

15:07:50,541 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) starting

15:07:51,201 INFO [org.xnio] (MSC service thread 1-10) XNIO Version 3.0.7.GA-redhat-1

15:07:51,202 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)

15:07:51,206 INFO [org.xnio.nio] (MSC service thread 1-10) XNIO NIO Implementation Version 3.0.7.GA-redhat-1

15:07:51,211 INFO [org.jboss.remoting] (MSC service thread 1-10) JBoss Remoting version 3.2.18.GA-redhat-1

15:07:51,239 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) JBAS010280: Activating Infinispan subsystem.

Jboss Deploy Jdbc Driver Maven

15:07:51,239 INFO [org.jboss.as.security] (ServerService Thread Pool -- 42) JBAS013171: Activating Security Subsystem

15:07:51,243 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 37) JBAS011800: Activating Naming Subsystem

15:07:51,246 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 35) JBAS012605: Activated the following JSF Implementations: [main, 1.2]

Mysql Jdbc Driver Maven

15:07:51,248 INFO [org.jboss.as.security] (MSC service thread 1-3) JBAS013170: Current PicketBox version=4.0.19.SP2-redhat-1

15:07:51,269 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 46) JBAS015537: Activating WebServices Extension

15:07:51,285 INFO [org.jboss.as.connector.logging] (MSC service thread 1-13) JBAS010408: Starting JCA Subsystem (IronJacamar 1.0.23.Final-redhat-1)

15:07:51,294 INFO [org.jboss.as.naming] (MSC service thread 1-14) JBAS011802: Starting Naming Service

15:07:51,297 INFO [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]

15:07:51,327 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

15:07:51,513 INFO [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8090

15:07:51,519 INFO [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8090

15:07:51,603 INFO [org.jboss.ws.common.management] (MSC service thread 1-7) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.3.Final-redhat-1

15:07:51,622 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-11) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

15:07:51,656 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) JBAS015012: Started FileSystemDeploymentService for directory /Users/Administrator/Servers/jboss-eap-6.2/standalone/deployments

15:07:51,661 INFO [org.jboss.as.server.deployment] (MSC service thread 1-13) JBAS015876: Starting deployment of 'Tmt-Project2-1.0-SNAPSHOT.war' (runtime-name: 'Tmt-Project2-1.0-SNAPSHOT.war')

15:07:51,669 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on 127.0.0.1:10009

15:07:51,669 INFO [org.jboss.as.remoting] (MSC service thread 1-12) JBAS017100: Listening on 127.0.0.1:4457

15:07:51,858 INFO [org.jboss.web] (ServerService Thread Pool -- 50) JBAS018210: Register web context: /Tmt-Project2-1.0-SNAPSHOT

15:07:52,134 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed 'Tmt-Project2-1.0-SNAPSHOT.war' (runtime-name : 'Tmt-Project2-1.0-SNAPSHOT.war')

15:07:52,139 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:10000/management

15:07:52,140 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:10000

15:07:52,140 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) started in 2157ms - Started 174 of 234 services (59 services are passive or on-demand)

Oracle jdbc maven

Now if I go to http://localhost:8090/Tmt-Project2-1.0-SNAPSHOT/ I get the following errors :

JBWEB000309: type JBWEB000067: Status report

JBWEB000068: message/Tmt-Project2-1.0-SNAPSHOT/

JBWEB000069: descriptionJBWEB000124: The requested resource is not available.

JBoss Web/7.2.2.Final-redhat-1