Hi,
I'm trying to setup Golden Gate environment on Amazon EC2 instance for data replication between Oracle 12c and Datastax Cassandra 3.9.0.
On the target side where I have Oracle Golden Gate for Big Data running. I've configured environment variables as given below:
[ec2-user@tsys_cassandra dirrpt]$ echo $JAVA_HOME
/usr/java/jdk1.8.0_131
[ec2-user@tsys_cassandra dirrpt]$ echo $LD_LIBRARY_PATH
/usr/java/jdk1.8.0_131/lib:/usr/java/jdk1.8.0_131/jre/lib/amd64/server
[ec2-user@tsys_cassandra dirrpt]$ echo $PATH
/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/bin/java/bin:/usr/bin/java/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin:/usr/bin/java/bin
My replicat properties file looks like this:
REPLICAT cas
setenv (JAVA_HOME="/usr/java/jdk1.8.0_131")
setenv (GGHOME="/opt/cassandra/ogg")
setenv (LD_LIBRARY_PATH="/usr/java/jdk1.8.0_131/lib:/usr/java/jdk1.8.0_131/jre/lib/amd64/server")
setenv (PATH="/usr/java/jdk1.8.0_131/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin")
getEnv (JAVA_HOME)
getEnv (LD_LIBRARY_PATH)
getEnv (PATH)
TARGETDB LIBFILE libggjava.so SET property=dirprm/cassandra.properties
DDL INCLUDE ALL
GROUPTRANSOPS 1000
MAP oggsrc.PULSE_MESSAG_GG, TARGET test.switch_message_by_test,
COLMAP(event_id = @BINTOHEX(EVENT_ID), switch_name = SWITCH_NAME, pseudo_pan = @STRNUM(PSEUDO_PAN), transaction_amount = @NUMSTR(FIELD_004), mcc = FIELD_018, track2 = FIELD_035, track1 = FIELD_045, merchant_name = FIELD_043, request_date = LOG_DATE, response_message = @CASE(@STREXT(FIELD_039, 1, 2),'00','SUCCESS','10','PARTIAL APPROVAL','51','INSUFFICIENT FUNDS','96','SYSTEM ERROR'), available_balance = @NUMSTR(@STREXT(FIELD_054, 11, 20)), response_date = LOG_DATE, account_type = @CASE(@STREXT(FIELD_003, 2, 3),'10','Savings','20','Checking','00','Default'), request_type = FIELD_001, is_pin_based = FIELD_052);
Cassandra.properties file:
gg.handlerlist=cassandra
#Avro Metadata Provider Properties
gg.mdp.type=avro
gg.mdp.schemaFilesPath=/opt/cassandra/ogg/dirprm/metadata/
#The handler properties
gg.handler.cassandra.type=cassandra
gg.handler.cassandra.mode=op
gg.handler.cassandra.contactPoints=localhost
#gg.handler.cassandra.port=9042
#gg.handler.cassandra.keyspace=test
gg.handler.cassandra.ddlHandling=None
gg.handler.cassandra.compressedUpdates=true
gg.handler.cassandra.cassandraMode=async
gg.handler.cassandra.consistencyLevel=ANY
goldengate.userexit.timestamp=utc
goldengate.userexit.writers=javawriter
javawriter.stats.display=TRUE
javawriter.stats.full=TRUE
gg.log=log4j
gg.log.level=DEBUG
gg.report.time=30sec
#Set the classpath here to the Datastax Cassandra Java Driver (3.1 latest)
#Link to the Cassandra drivers website
#http://cassandra.apache.org/doc/latest/getting_started/drivers.html#java
#Link to the Datastax Cassandra Java Driver
#https://github.com/datastax/java-driver
gg.classpath=/opt/cassandra/ogg/jars/*
javawriter.bootoptions=-Xmx512m -Xms32m -Djava.class.path=ggjava/ggjava.jar
I've added replicat to the golden gate instance. When I run replicat, I get below error:
ERROR OGG-15050 Error loading Java VM runtime library: (2 No such file or directory).
Detail Error log:
***********************************************************************
Oracle GoldenGate Delivery
Version 12.2.0.1.160823 OGGCORE_OGGADP.12.2.0.1.0_PLATFORMS_161019.1437
Linux, x64, 64bit (optimized), Generic on Oct 19 2016 16:26:25
Copyright (C) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
Starting at 2017-08-01 19:02:54
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Sun May 28 17:08:21 EDT 2017, Release 3.10.0-514.21.2.el7.x86_64
Node: tsys_cassandra
Machine: x86_64
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited
Process id: 14797
Description:
***********************************************************************
** Running with the following parameters **
***********************************************************************
2017-08-01 19:02:54 INFO OGG-03059 Operating system character set identified as UTF-8.
2017-08-01 19:02:54 INFO OGG-02695 ANSI SQL parameter syntax is used for parameter parsing.
2017-08-01 19:02:54 INFO OGG-02095 Successfully set environment variable JAVA_HOME=/usr/java/jdk1.8.0_131.
2017-08-01 19:02:54 INFO OGG-02095 Successfully set environment variable GGHOME=/opt/cassandra/ogg.
2017-08-01 19:02:54 INFO OGG-02095 Successfully set environment variable LD_LIBRARY_PATH=/usr/java/jdk1.8.0_131/lib:/usr/java/jdk1.8.0_131/jre/lib/amd64/server.
2017-08-01 19:02:54 INFO OGG-02095 Successfully set environment variable PATH=/usr/java/jdk1.8.0_131/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin.
REPLICAT cas
setenv (JAVA_HOME="/usr/java/jdk1.8.0_131")
2017-08-01 19:02:54 INFO OGG-02095 Successfully set environment variable JAVA_HOME=/usr/java/jdk1.8.0_131.
setenv (GGHOME="/opt/cassandra/ogg")
2017-08-01 19:02:54 INFO OGG-02095 Successfully set environment variable GGHOME=/opt/cassandra/ogg.
setenv (LD_LIBRARY_PATH="/usr/java/jdk1.8.0_131/lib:/usr/java/jdk1.8.0_131/jre/lib/amd64/server")
2017-08-01 19:02:54 INFO OGG-02095 Successfully set environment variable LD_LIBRARY_PATH=/usr/java/jdk1.8.0_131/lib:/usr/java/jdk1.8.0_131/jre/lib/amd64/server.
setenv (PATH="/usr/java/jdk1.8.0_131/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin")
2017-08-01 19:02:54 INFO OGG-02095 Successfully set environment variable PATH=/usr/java/jdk1.8.0_131/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin.
getEnv (JAVA_HOME)
JAVA_HOME = /usr/java/jdk1.8.0_131
getEnv (LD_LIBRARY_PATH)
LD_LIBRARY_PATH = /usr/java/jdk1.8.0_131/lib:/usr/java/jdk1.8.0_131/jre/lib/amd64/server
getEnv (PATH)
PATH = /usr/java/jdk1.8.0_131/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin
TARGETDB LIBFILE libggjava.so SET property=dirprm/cassandra.properties
2017-08-01 19:02:54 INFO OGG-15052 Using Java class path: ggjava/ggjava.jar:ggjava/resources/lib/optional/log4j-1.2.17.jar:ggjava/resources/lib/optional/slf4j-log4j12-1.7.6.jar.
Source Context :
SourceModule : [gglib.ggdal.adapter.java.jni]
SourceID : [/scratch/aime/adestore/views/aime_adc4150319/oggcore/OpenSys/src/gglib/ggdal/Adapter/Java/jni/JNIHelper.cpp]
SourceFunction : [CJavaVM]
SourceLine : [138]
ThreadBacktrace : [17] elements
: [/opt/cassandra/ogg/libgglog.so(CMessageContext::AddThreadContext()+0x26) [0x7f54b0553336]]
: [/opt/cassandra/ogg/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x6a8) [0x7f54b0546358]]
: [/opt/cassandra/ogg/libgglog.so(_MSG_ERR_JAVA_VM_MODULE_NOT_FOUND(CSourceContext*, CMessageFactory::MessageDisposition)+0x36) [0x7f54b04c8f96]]
: [/opt/cassandra/ogg/libggjava.so(CJavaVM::CJavaVM(bool, CJavaVMOption const&)+0x128) [0x7f54a8597368]]
: [/opt/cassandra/ogg/libggjava.so(CJavaVM::Create(bool, CJavaVMOption const&)+0x65) [0x7f54a8597525]]
: [/opt/cassandra/ogg/libggjava.so(ggs::gglib::ggdal::CJavaAdapter::Open()+0x121) [0x7f54a8573d81]]
: [/opt/cassandra/ogg/replicat(ggs::gglib::ggdal::CDALAdapter::Open(ggs::gglib::ggunicode::UString const&)+0x28) [0x7a5b38]]
: [/opt/cassandra/ogg/replicat(GenericImpl::Open(ggs::gglib::ggunicode::UString const&)+0x38) [0x78bce8]]
: [/opt/cassandra/ogg/replicat(odbc_param(char*, char*)+0xd9) [0x785159]]
: [/opt/cassandra/ogg/replicat(get_infile_params(time_elt_def*, time_elt_def*, char**, ggs::gglib::ggdatasource::DataSourceParams&, ggs::Heartbeat::MapGeneratorParams&)+0xaecf) [0x59430f]]
: [/opt/cassandra/ogg/replicat() [0x632722]]
: [/opt/cassandra/ogg/replicat(ggs::gglib::MultiThreading::MainThread::ExecMain()+0x66) [0x75ea86]]
: [/opt/cassandra/ogg/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*)+0x147) [0x762e57]]
: [/opt/cassandra/ogg/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0x12d) [0x76346d]]
: [/opt/cassandra/ogg/replicat(main+0x3b) [0x634b2b]]
: [/lib64/libc.so.6(__libc_start_main+0xf5) [0x7f54aaed0b35]]
: [/opt/cassandra/ogg/replicat() [0x5238e9]]
2017-08-01 19:02:54 ERROR OGG-15050 Error loading Java VM runtime library: (2 No such file or directory).
Please help me with this issue.
Thanks,
Samarth