Solved

Error while transfer  data between two database from linux

Posted on 2008-10-22
8
490 Views
Last Modified: 2013-12-19
HI,

I am trying to transfer data from ingress to oracle with the help of java program. The java program is running on linux machine and takes 3 properties file - source info, target info, table info to transfer.
The java program was earlier written on unix platform and it is copied as-is on linux. while running following error is occurring.

Exception in thread "main" java.lang.AbstractMethodError
   at _Jv_MakeVTable(java.lang.Class) (/usr/lib64/libgcj.so.5.0.0)
   at _Jv_PrepareClass(java.lang.Class) (/usr/lib64/libgcj.so.5.0.0)
   at _Jv_WaitForState(java.lang.Class, int) (/usr/lib64/libgcj.so.5.0.0)
   at java.lang.VMClassLoader.linkClass0(java.lang.Class) (/usr/lib64/libgcj.so.5.0.0)
   at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib64/libgcj.so.5.0.0)
   at java.lang.Class.initializeClass() (/usr/lib64/libgcj.so.5.0.0)
   at oracle.jdbc.driver.OracleStatement.executeQuery(java.lang.String) (Unknown Source)
   at oracle.jdbc.dbaccess.DBAccess.setNlsParamsClient(oracle.jdbc.driver.OracleConnection) (Unknown Source)
   at oracle.jdbc.ttc7.TTC7Protocol.initNls(oracle.jdbc.driver.OracleConnection) (Unknown Source)
   at oracle.jdbc.driver.OracleConnection.OracleConnection(oracle.jdbc.dbaccess.DBAccess, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties) (Unknown Source)
   at oracle.jdbc.driver.OracleDriver.getConnectionInstance(oracle.jdbc.dbaccess.DBAccess, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties) (Unknown Source)
   at oracle.jdbc.driver.OracleDriver.connect(java.lang.String, java.util.Properties) (Unknown Source)
   at java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties) (/usr/lib64/libgcj.so.5.0.0)
   at java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String) (/usr/lib64/libgcj.so.5.0.0)
   at cypitg.lib.rmi.Database.getDBConnection() (Unknown Source)
   at cypitg.lib.rmi.Database.Database(cypitg.lib.rmi.ClientProfile) (Unknown Source)
   at cypitg.lib.rmi.DBConnectionPool.getDBC() (Unknown Source)
   at cypitg.lib.utils.TableXferUnique.init(java.lang.String, java.lang.String) (Unknown Source)
   at cypitg.lib.utils.TableXferUnique.main(java.lang.String[]) (Unknown Source)

Thanks
Abhishek
0
Comment
Question by:abhishek_gandhe
  • 5
  • 2
8 Comments
 

Author Comment

by:abhishek_gandhe
ID: 22774664
The syntax I am using is: -

java cypitg.lib.utils.TableXferUnique xfr_from_mchits xfr_to_staging xfr_devmaster_sql

Contents of xfr_from_mchits.properties
cypitg.lib.rmi.dbDRIVER=openlink.jdbc.Driver
cypitg.lib.rmi.dbURL=jdbc:openlink://sjoplha2/DSN=dsn_oren_mchits/UID=mis
#cypitg.lib.rmi.dbURL=jdbc:openlink://mising1.mis.cypress.com:5020/SVT=Ingres II/Database=mchits/UID=c2c/PWD=c2c4rvy
cypitg.lib.rmi.dbUSER=
cypitg.lib.rmi.dbPASSWD=

# Print flag to make server components verbose
cypitg.lib.rmi.printFlag=TRUE
cypitg.lib.rmi.printFlagSerialize=FALSE

# RMI Lookup URL
cypitg.lib.rmi.rmiURL=rmi://:1099/RMIServer

# RMI through a open port in the firewall
cypitg.lib.rmi.firewall=FALSE

# Application user id. Can be over-ridden at run time.
cypitg.lib.rmi.userID=Anybody
cypitg.lib.rmi.appName=Ingres Oracle Table Transfer

Contents of xfr_to_staging.properties: -
# Oracle
cypitg.lib.rmi.dbDRIVER=oracle.jdbc.driver.OracleDriver
cypitg.lib.rmi.dbURL=jdbc:oracle:thin:@colossal.mis.cypress.com:1521:qastg
cypitg.lib.rmi.dbUSER=qabtfstg1
cypitg.lib.rmi.dbPASSWD=qabtfstg1

# Print flag to make server components verbose
cypitg.lib.rmi.printFlag=TRUE
cypitg.lib.rmi.printFlagSerialize=FALSE

# RMI Lookup URL
cypitg.lib.rmi.rmiURL=rmi://:1099/RMIServer

# RMI through a open port in the firewall
cypitg.lib.rmi.firewall=FALSE

# Application user id. Can be over-ridden at run time.
cypitg.lib.rmi.userID=Anybody
cypitg.lib.rmi.appName=Ingres Oracle Table Transfer

Contents of xfr_devmaster_sql.properties.
# devmaster table

commit_size=1000

pre_select=

select=SELECT \
         a.mkt_part_num, b.division, a.active, a.good_bins \
        FROM devmaster a, devcat b \
       where a.active != 'N' \
         and a.mkt_rev = b.mkt_rev

post_select=

pre_insert=DELETE FROM devmaster

insert=INSERT INTO devmaster \
        (mkt_part_num, division, active, good_bins ) VALUES ( ?, ?, ?, ?)

post_insert=

0
 

Author Comment

by:abhishek_gandhe
ID: 22774897
Infact all java programs are  giving the same error.

Thanks
Abhishek
0
 
LVL 27

Expert Comment

by:sujith80
ID: 22775187
Can you connect to the Oracle database from the machine?
Are the connection detials correct, user/password/sid /port etc?
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 48

Expert Comment

by:schwertner
ID: 22776209
If this a 10g database check if the listener has registered the service:

% lsnrctl services

If not - do static registration.
0
 

Author Comment

by:abhishek_gandhe
ID: 22783474
Sujith80,

Yes, I can connect to Oracle (9i) database from linux machine with the help of sqlplus.

All other information are correct.

Please advice.

Thanks
Abhishek
0
 

Author Comment

by:abhishek_gandhe
ID: 22783606
Schwertner,

The database is Oracle 9i. Yes, listner is able to register the service.

Thanks
Abhishek
0
 
LVL 27

Expert Comment

by:sujith80
ID: 22783827
You may look at the connection pooling setup if there is any.
0
 

Accepted Solution

by:
abhishek_gandhe earned 0 total points
ID: 22903079
This issue is solved by myself. The issue was related to use of version of ojdbc jar files.

Thanks
Abhishek
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question