Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 894081

Summary: Quickstart problems/improvements
Product: [JBoss] JBoss Data Grid 6 Reporter: Jakub Markos <jmarkos>
Component: unspecifiedAssignee: Tristan Tarrant <ttarrant>
Status: CLOSED UPSTREAM QA Contact: Martin Gencur <mgencur>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: jdg-bugs
Target Milestone: CR1   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A Maven shade plug-in, which handles creating a resulting jar file for hotrod-endpoint quickstart, is not able to process required dependencies and fails. As a result, the hotrod-endpoint example cannot be built. As a workaround, configure maven-assembly-plugin so that it creates the resulting jar file with all required dependencies. The hotrod-endpoint example can now be built and started.
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:27:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Markos 2013-01-10 16:20:33 UTC
Current problems/possible improvements with quickstarts (tested on ER7) - apart from the missing dependencies:

 helloworld-jdg
     - it builds OK, but doesn't work - the entries are not distributed
         - It works after adding bind_addr="${jgroups.bind_addr:127.0.0.1}" to the UDP section in src/main/resources/jgroups-udp.xml
         - according to https://community.jboss.org/wiki/SystemProps, if not set, JGroups will pick the first non-loopback NIC - in my case it picked wrong...
         
 Regarding *-endpoint
     - the link to JDBC driver installation is outdated, I think this is the new, correct one: https://access.redhat.com/knowledge/docs/en-US/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/chap-Datasource_Management.html
     - maybe add a note that you don't actually have to install anything if you want to use h2, as jdg comes with h2 driver?
     - there is a comment ending tag with 3 hyphens "--->" in the configuration to be copied - this causes an error during jdg start
     - urn:jboss:domain:infinispan:1.3 should probably be updated to urn:jboss:datagrid:infinispan:6.1
     
 hotrod-endpoint
     - fails with: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:1.5:shade (default) on project hotrod-endpoint-quickstart: Error creating shaded jar: Some problems were encountered while processing the POMs:
[ERROR] [ERROR] Non-resolvable import POM: Could not find artifact com.jboss.datagrid:jboss-javaee-6.0-with-infinispan:pom:1.0.2.Final-redhat-1 in central (http://repo.maven.apache.org/maven2) @ line 57, column 19
     - I solved this by adding the repository definition in the pom directly - maven shade plugin can't find artifacts in repositories defined in settings.xml (?) http://jira.codehaus.org/browse/MSHADE-103
    
 
 rest-endpoint
     - fails with:
     java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/teams/teams
        at org.jboss.as.quickstarts.datagrid.rest.RESTCache.doOperation(RestCache.java:81)
        at org.jboss.as.quickstarts.datagrid.rest.RESTCache.get(RestCache.java:126)
        at org.jboss.as.quickstarts.datagrid.rest.FootballManager.<init>(FootballManager.java:58)
        at org.jboss.as.quickstarts.datagrid.rest.FootballManager.main(FootballManager.java:139)
        ... 6 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/teams/teams
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1615)
        at org.jboss.as.quickstarts.datagrid.rest.RESTCache.doOperation(RestCache.java:69)
        ... 9 more
     - I'll look into this more next monday

Comment 1 Jakub Markos 2013-01-23 13:59:39 UTC
Tested with ER9 and EAP 6.0.1.
Hotrod-endpoint is still failing with the error mentioned previously. The rest is ok.

Minor issues (probably not important, just mentioning): the endpoint examples can't handle player/team names containing % and rest and memcached endpoint examples fail when trying to add/delete empty keys.

Comment 3 Jakub Markos 2013-02-26 11:06:49 UTC
The hotrod-endpoint issue is still present in ER12.

Comment 4 Tristan Tarrant 2013-02-26 15:40:27 UTC
Jakub, the Maven repository in ER12 does contain 
com/jboss/datagrid/jboss-javaee-6.0-with-infinispan/1.0.2.Final-redhat-1/jboss-javaee-6.0-with-infinispan-1.0.2.Final-redhat-1.pom

Comment 5 Martin Gencur 2013-02-26 16:07:41 UTC
All three endpoint examples work for me (both compiling and running). However, the problem Jakub described might be related to the maven-shade-plugin which is not able to find artifacts in two different repositories defined in settings.xml. I used EAP and JDG repositories being merged in one directory and pointing the default settings.xml to it through <localRepository> element.

Comment 6 Martin Gencur 2013-02-26 16:14:09 UTC
I've just tried using example-settings.xml with 2 repositories (EAP's and JDG's) defined in it and using "-s" maven option to pass the config file and it works too.

Comment 7 Martin Gencur 2013-02-26 16:20:17 UTC
Jakub,
sorry, you were right. The approach I described in my previous comment does not work - the maven-shade-plugin needs to be updated to version 2.0, which fixes the problem.

Comment 10 Red Hat Bugzilla 2025-02-10 03:27:15 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.