0 Replies Latest reply on Nov 8, 2018 3:32 AM by rajmani7

    Jboss Data Grid Testing - Troubleshooting

    rajmani7

      Hi 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

      -------------------------

      1. 1. Set up your Dev Environment

       

      5 minutes

       

      1. Install the Java SE Development Kit (JDK) 1.8. We recommend using the OpenJDK or the Oracle JDK.
        1. For Windows/Mac Development Hosts:
          1. 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).
        2. For Red Hat Enterprise Linux Hosts:
          1. Install OpenJDK by executing the following command:

      $ yum install java-1.8.0-openjdk-devel

      1. Follow the on-screen instructions to continue the installation process.
      2. 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
      3. Unzip JBoss Data Grid into your preferred destination folder; we will refer to this location as $JDG_HOME.
        1. In Windows or Mac, you can extract the contents of the ZIP archive by double clicking on the ZIP file.
        2. 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

      1. Download Red Hat JBoss EAP 7.0.0
      2. Extract JBoss EAP into your preferred destination folder; we will refer to this location as $JBOSS_HOME.
        1. In Windows or Mac, you can extract the contents of the ZIP archive by double clicking on the ZIP file.
        2. 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

      1. Download the latest version of Maven. The latest at the time of this writing is Maven 3.5.0 Choose the ZIP distribution.
      2. 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.

      1. 2. Install, Configure, and Verify

       

      10 minutes

       

      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:

      1. 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:
      2. $ mvn --version
      3. Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
      4. Maven home: /Applications/opt/apache/apache-maven-3.5.0
      5. Java version: 1.8.0_131, vendor: Oracle Corporation
      6. Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
      7. Default locale: en_US, platform encoding: UTF-8

      OS name: "linux", version: "4.5.7-202.fc23.x86_64", arch: "amd64", family: "unix"

      1. 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

      1. 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

      1. In a third terminal window, download the quickstarts:

      Red Hat JBoss Data Grid 7 Quickstarts

      1. Extract the quickstarts ZIP as we’ve done before, or using unzip

      $ unzip jboss-datagrid-7.1.0-quickstarts.zip

      1. Move into the quickstarts directory

      $ cd jboss-datagrid-7.1.0-quickstarts

      1. Build the helloworld-jdg quickstart web application and deploy it into the first instance of JBoss EAP by executing:
      2. $ cd helloworld-jdg

      $ mvn clean package wildfly:deploy -s ../settings.xml

      1. 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:

      JBoss Enterprise Application Instance 1

      Instance 2:

      JBoss Enterprise Application Instance 2

      You can test replication of entries in the following way:

      1. Access first server at http://localhost:8080/jboss-helloworld-jdg and insert key "foo" with value "bar"
      2. Access second server at http://localhost:8180/jboss-helloworld-jdg and do the following:
        1. Click on Get Some
        2. Get the value for key "foo"
        3. Click Put Some More
        4. Insert key "mykey" with value "myvalue"
      3. Access the first server at http://localhost:8080/jboss-helloworld-jdg and do the following:
        1. Click on Get Some
        2. Get all mappings by clicking on Get All
      4. 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)

      1. Make sure you have started JBoss EAP as described above.
      2. Open a command line and navigate to the root directory of this quickstart.
      3. When you are finished testing, type the following commands to undeploy the archive from both running servers:
      4. $ mvn wildfly:undeploy -s ../settings.xml

      $ mvn wildfly:undeploy -s ../settings.xml -Dwildfly.port=10090

      1. 3. Build your first JBoss Data Grid application

       

      20 minutes

       

      Follow the below series to build your first application. You will build some simple examples.

      Step 1: Learn more about getting started

      JBoss Data Grid Getting Started Guide

       

      ----------------------------------------------------

       

      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