Jboss Data Grid Testing - Troubleshooting
rajmani7 Nov 8, 2018 3:32 AMHi All,
I am new to Jboss Data Grid. I want to setup for one of my project.
I have just followed below steps to setup JBOSS EAP 7.0 server, and JDG Server
-------------------------
- Install the Java SE Development Kit (JDK) 1.8. We recommend using the OpenJDK or the Oracle JDK.
- For Windows/Mac Development Hosts:
- Red Hat Developer Program typically downloads from Oracle’s link: site. (Make sure you get the Java Development Kit and not just the Java Runtime Environment).
- For Red Hat Enterprise Linux Hosts:
- Install OpenJDK by executing the following command:
- For Windows/Mac Development Hosts:
$ yum install java-1.8.0-openjdk-devel
- Follow the on-screen instructions to continue the installation process.
- Download the latest version of Red Hat JBoss Data Grid. The latest version at the time of writing is Red Hat JBoss Data Grid 7.1.0 Server
- Unzip JBoss Data Grid into your preferred destination folder; we will refer to this location as $JDG_HOME.
- In Windows or Mac, you can extract the contents of the ZIP archive by double clicking on the ZIP file.
- In Red Hat Enterprise Linux, open a terminal window in the target machine and navigate to where the ZIP file was downloaded. Extract the ZIP file by executing the following command:
$ unzip jboss-datagrid-7.1.0-server.zip
- Download Red Hat JBoss EAP 7.0.0
- Extract JBoss EAP into your preferred destination folder; we will refer to this location as $JBOSS_HOME.
- In Windows or Mac, you can extract the contents of the ZIP archive by double clicking on the ZIP file.
- In Red Hat Enterprise Linux, open a terminal window in the target machine and navigate to where the ZIP file was downloaded. Extract the ZIP file by executing the following command:
$ unzip jboss-eap-7.0.0.zip
- Download the latest version of Maven. The latest at the time of this writing is Maven 3.5.0 Choose the ZIP distribution.
- Unzip into the folder of your choice as we’ve done above for JBoss Data Grid; we’ll refer to this location as $MAVEN_HOME.
Note: You may want to add $MAVEN_HOME/bin to your system $PATH in order to access its executable directly from the command-line, no matter your current working directory.
To verify that JBoss Data Grid and JBoss EAP is working correctly, deploy and execute the helloworld-jdg quickstart application in an EAP server you will now create and configure:
- Test that your Maven and Java installations are working correctly by executing $MAVEN_HOME/bin/mvn --version and $JAVA_HOME/bin/java -version . For instance:
- $ mvn --version
- Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
- Maven home: /Applications/opt/apache/apache-maven-3.5.0
- Java version: 1.8.0_131, vendor: Oracle Corporation
- Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
- Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.5.7-202.fc23.x86_64", arch: "amd64", family: "unix"
- In one terminal window, start an instance of JBoss EAP by executing $JBOSS_HOME/bin/standalone.sh (Linux and Mac) or %JBOSS_HOME%\bin\standalone.bat (Windows)
$ $JBOSS_HOME/bin/standalone.sh
- In a second window, start another instance of JBoss EAP by passing the system property jboss.socket.binding.port-offset to the standalone script, ie:
$ $JBOSS_HOME/bin/standalone.sh -Djboss.socket.binding.port-offset=100
- In a third terminal window, download the quickstarts:
Red Hat JBoss Data Grid 7 Quickstarts
- Extract the quickstarts ZIP as we’ve done before, or using unzip
$ unzip jboss-datagrid-7.1.0-quickstarts.zip
- Move into the quickstarts directory
$ cd jboss-datagrid-7.1.0-quickstarts
- Build the helloworld-jdg quickstart web application and deploy it into the first instance of JBoss EAP by executing:
- $ cd helloworld-jdg
$ mvn clean package wildfly:deploy -s ../settings.xml
- Deploy the quickstart web application into the second instance of JBoss EAP by executing:
$ mvn wildfly:deploy -s ../settings.xml -Dwildfly.port=10090
The application will be running at the following URLs:
Instance 1: | |
Instance 2: |
You can test replication of entries in the following way:
- Access first server at http://localhost:8080/jboss-helloworld-jdg and insert key "foo" with value "bar"
- Access second server at http://localhost:8180/jboss-helloworld-jdg and do the following:
- Click on Get Some
- Get the value for key "foo"
- Click Put Some More
- Insert key "mykey" with value "myvalue"
- Access the first server at http://localhost:8080/jboss-helloworld-jdg and do the following:
- Click on Get Some
- Get all mappings by clicking on Get All
- All data entered on each server was replicated to the other server
Note: Entries expire and simply disappear after 60 seconds from last update. To access predefined servlets and directly store/retrieve a key in the cache, access the following URLs: http://localhost:8080/jboss-helloworld-jdg/TestServletPut http://localhost:8180/jboss-helloworld-jdg/TestServletGet (note the different port 8180)
- Make sure you have started JBoss EAP as described above.
- Open a command line and navigate to the root directory of this quickstart.
- When you are finished testing, type the following commands to undeploy the archive from both running servers:
- $ mvn wildfly:undeploy -s ../settings.xml
$ mvn wildfly:undeploy -s ../settings.xml -Dwildfly.port=10090
Follow the below series to build your first application. You will build some simple examples.
Step 1: Learn more about getting started |
----------------------------------------------------
while deploying the war I am getting below errors
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.204 s
[INFO] Finished at: 2018-11-08T02:09:50-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:2.0.0.Final:deploy (default-cli) on project jboss-helloworld-jdg: Failed to execute goal deploy: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"jboss-helloworld-jdg.war\".WeldStartService" => "Failed to start service
[ERROR] Caused by: org.jboss.weld.exceptions.DeploymentException: tried to access class org.jboss.logging.Log4j2Logger from class org.jboss.logging.Log4j2Logger$1
[ERROR] Caused by: java.lang.IllegalAccessError: tried to access class org.jboss.logging.Log4j2Logger from class org.jboss.logging.Log4j2Logger$1"}}}}
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Please help