aadi160 / sql-to-nosql-importer

Automatically exported from code.google.com/p/sql-to-nosql-importer
0 stars 0 forks source link

issue running the script throwing noclass found error #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Copy the sql-to-nosql tool to a folder
2. copy my database drivers/jars as specified
3. make changes to import.properties by providing the mongo details and xml by 
including the driver and the sql

as per the instructions when i run the run.bat i get below error.

C:\mongodb\SQLToNoSQLImporter>run.bat
Exception in thread "main" java.lang.NoClassDefFoundError: 
com/mongodb/MongoException
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.mongodb.MongoException
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 6 more
Press any key to continue . . .

C:\mongodb\SQLToNoSQLImporter>

#common properties
sql-data-config-file=db-data-config.xml
autoCommitSize=500
#available values are mongo,es,couch 
dataStoreType=mongo

#mongo-db related properties 
mongo.host=localhost
mongo.useAuth=false
mongo.user=sathis
mongo.password=mongo
mongo.db=db2
mongo.collection=eantest

Original issue reported on code.google.com by seedaffo...@gmail.com on 7 Jun 2013 at 8:27

GoogleCodeExporter commented 8 years ago
Not an issue.. as i did not include the mongo jar. after including the mongo 
jar in the in the libs folder it went away.

but  got into other errors.

Jun 07, 2013 1:36:34 PM net.sathis.export.sql.DataImporter loadDataConfig
SEVERE: [Ljava.lang.StackTraceElement;@206be6
Exception in thread "main" java.lang.NullPointerException
        at net.sathis.export.sql.DataImporter.doDataImport(DataImporter.java:88)

        at net.sathis.export.sql.SQLToNoSQLImporter.main(SQLToNoSQLImporter.java
:19)
Press any key to continue . . .

Original comment by seedaffo...@gmail.com on 7 Jun 2013 at 8:39

GoogleCodeExporter commented 8 years ago
Never mind.. the issue is with the config file.. it is not resolved..

very good tool, Good job. thanks a lot. 

Original comment by seedaffo...@gmail.com on 7 Jun 2013 at 8:49