Solved

Error while transfer  data between two database from linux

Posted on 2008-10-22
8
484 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
Comment Utility
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
Comment Utility
Infact all java programs are  giving the same error.

Thanks
Abhishek
0
 
LVL 27

Expert Comment

by:sujith80
Comment Utility
Can you connect to the Oracle database from the machine?
Are the connection detials correct, user/password/sid /port etc?
0
 
LVL 47

Expert Comment

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

% lsnrctl services

If not - do static registration.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:abhishek_gandhe
Comment Utility
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
Comment Utility
Schwertner,

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

Thanks
Abhishek
0
 
LVL 27

Expert Comment

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

Accepted Solution

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

Thanks
Abhishek
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now