Bug 1392071

Summary: JDBCUpgradeTool throws java.lang.OutOfMemoryError in cache with a single key
Product: [JBoss] JBoss Data Grid 6 Reporter: Gustavo Fernandes <gfernand>
Component: InfinispanAssignee: Tristan Tarrant <ttarrant>
Status: NEW --- QA Contact: Martin Gencur <mgencur>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6.1CC: jdg-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
JDBCUpgradeTool configuration
none
Server configuration
none
Oracle driver module none

Description Gustavo Fernandes 2016-11-04 17:54:20 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Take a JDG Server 6.1, configure basic auth by going to jboss-datagrid-server-6.1.0/bin/add-user.sh and choosing option b), accept the proposed realm, and put role as REST.

2. Use the attached clustered.xml config which contains a JDBCStringBasedStore

3. Start a test oracle database: 

docker run --name oracle -d -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true wnameless/oracle-xe-11g

4. Configure the server. Download the oracle driver ojdbc6.jar, the module.xml (attached) and clustered.xml (attached) and place the files in the right place:

mkdir -p jboss-datagrid-server-6.1.0/modules/com/oracle/jdbc/driver/main/
cp module.xml jboss-datagrid-server-6.1.0/modules/com/oracle/jdbc/driver/main/
cp ojdbc6.jar jboss-datagrid-server-6.1.0/modules/com/oracle/jdbc/driver/main/
cp clustered.xml jboss-datagrid-server-6.1.0/standalone/configuration/

5. Start the server

jboss-datagrid-server-6.1.0/bin/standalone.sh -c clustered.xml

6. Put a single key/value via Rest: 

curl -X PUT --user user:pass -H "Content-Type: text/plain" --data "value" http://localhost:8080/rest/mycache/key

4. Run the JDBCUpgradeTool with the attached conf.properties:

java -cp infinispan-jdbc-migrator52x-6.4.0.Final-redhat-4.jar:jboss-transaction-api_1.1_spec-1.0.1.Final-redhat-2.jar:ojdbc6.jar org.infinispan.persistence.migrator.jdbc.JdbcUpgradeTool conf.properties

Actual results:

Exception thrown:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:955)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1255)

Expected results:

Migration of a single key to a different table

Additional info:

Comment 1 Gustavo Fernandes 2016-11-04 17:55:05 UTC
Created attachment 1217476 [details]
JDBCUpgradeTool configuration

Comment 2 Gustavo Fernandes 2016-11-04 17:56:06 UTC
Created attachment 1217477 [details]
Server configuration

Comment 3 Gustavo Fernandes 2016-11-04 17:56:27 UTC
Created attachment 1217478 [details]
Oracle driver module