Bug 1392071 - JDBCUpgradeTool throws java.lang.OutOfMemoryError in cache with a single key
Summary: JDBCUpgradeTool throws java.lang.OutOfMemoryError in cache with a single key
Keywords:
Status: NEW
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-04 17:54 UTC by Gustavo Fernandes
Modified: 2016-11-04 18:03 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
JDBCUpgradeTool configuration (1.07 KB, text/plain)
2016-11-04 17:55 UTC, Gustavo Fernandes
no flags Details
Server configuration (16.53 KB, application/xml)
2016-11-04 17:56 UTC, Gustavo Fernandes
no flags Details
Oracle driver module (314 bytes, application/xml)
2016-11-04 17:56 UTC, Gustavo Fernandes
no flags Details

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


Note You need to log in before you can comment on or make changes to this bug.