-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OrientDB class loading issue with SQL Server JTDS driver #5421
Comments
Did you put the jtds jar in the lib dir? |
Jar is in classpath |
I have placed jars in lib, but it is java program...I see similar issue if i run OETL utility |
ok, can you write down more details? Such as schema, query, maybe a chunk of the code you write. |
config.json { Test Program: import java.sql.CallableStatement; public class DBConnection {
} Table does not have any blob data type . It has field of type bit, int, nvarchar, datetime, varchar.. |
#5422 : it has issue with bit field. instead of doing "* from", i mentioned columns name and removed field of bit data type from select list. Then it looks to be working without exception |
what version of orient are you using? |
version 2.1.6. |
Ok, so as far I understand a BIT data type is a BOOLEAN in the java world. while JTDS maps it to JDBC BIT type: http://jtds.sourceforge.net/typemap.html I'm improving the ETL data types mapper to handle the BIT type. |
are u also looking into this issue too? |
Well, the staktrace says : Caused by: com.orientechnologies.orient.core.exception.OConfigurationException: [JDBC extractor] error on connecting to JDBC url jdbc:jtds:sqlserver://127.0.0.1:1433/mydb' using user 'user' and the password provided at It seems a connection error. Has fhe conf file you gave me the same problem? |
yes, conf file has issue. you can try with OETL utility |
is it correct? #5802 i don't see any such issue number |
yes.. i copied it |
ok, and what about the jtds jar? Did you copy it in the lib dir ? |
Directory of E:\ORIENTDB\orientdb-community-2.1.6\lib 12/04/2015 02:06 PM .12/04/2015 02:06 PM .. 11/23/2015 08:11 PM 62,983 activation-1.1.jar 11/23/2015 08:11 PM 445,288 antlr-2.7.7.jar 11/23/2015 08:11 PM 43,398 asm-3.2.jar 11/23/2015 08:11 PM 17,985 asm-analysis-3.2.jar 11/23/2015 08:11 PM 33,094 asm-commons-3.2.jar 11/23/2015 08:11 PM 21,878 asm-tree-3.2.jar 11/23/2015 08:11 PM 36,551 asm-util-3.2.jar 11/23/2015 08:11 PM 274,185 blueprints-core-2.6.0.jar 11/23/2015 08:11 PM 188,671 commons-beanutils-1.7.0.jar 11/23/2015 08:11 PM 206,035 commons-beanutils-core-1.8.0.jar 11/23/2015 08:11 PM 588,337 commons-collections-3.2.2.jar 11/23/2015 08:11 PM 298,829 commons-configuration-1.6.jar 11/23/2015 08:11 PM 38,795 commons-csv-1.2.jar 11/23/2015 08:11 PM 143,602 commons-digester-1.8.jar 11/23/2015 08:11 PM 261,809 commons-lang-2.4.jar 11/23/2015 08:11 PM 60,686 commons-logging-1.1.1.jar 11/23/2015 08:11 PM 116,786 concurrentlinkedhashmap-lru-1.4.1.ja 11/23/2015 08:11 PM 168,327 gremlin-groovy-2.6.0.jar 11/23/2015 08:11 PM 22,932 gremlin-java-2.6.0.jar 11/23/2015 08:11 PM 5,600,962 groovy-1.8.9.jar 11/23/2015 08:11 PM 7,284,435 hazelcast-all-3.5.3.jar 11/23/2015 08:11 PM 100,884 hibernate-jpa-2.0-api-1.0.0.Final.ja 11/23/2015 08:11 PM 1,307,968 hppc-0.6.0.jar 11/23/2015 08:11 PM 33,483 jackson-annotations-2.2.3.jar 11/23/2015 08:11 PM 192,699 jackson-core-2.2.3.jar 11/23/2015 08:11 PM 865,838 jackson-databind-2.2.3.jar 11/23/2015 08:11 PM 106,573 jansi-1.5.jar 11/23/2015 08:11 PM 659,343 javassist-3.16.1-GA.jar 11/23/2015 08:11 PM 79,832 jettison-1.3.3.jar 11/23/2015 08:11 PM 87,325 jline-0.9.94.jar 11/23/2015 08:11 PM 914,639 jna-4.0.0.jar 11/23/2015 08:11 PM 1,218,171 jna-platform-4.0.0.jar 01/13/2015 10:37 AM 317,816 jtds-1.3.1.jar 11/23/2015 08:11 PM 1,658,512 lucene-analyzers-common-4.7.0.jar 11/23/2015 08:11 PM 2,356,256 lucene-core-4.7.0.jar 11/23/2015 08:11 PM 166,336 lucene-facet-4.7.0.jar 11/23/2015 08:11 PM 36,012 lucene-memory-4.7.0.jar 11/23/2015 08:11 PM 95,780 lucene-misc-4.7.0.jar 11/23/2015 08:11 PM 211,142 lucene-queries-4.7.0.jar 11/23/2015 08:11 PM 390,054 lucene-queryparser-4.7.0.jar 11/23/2015 08:11 PM 45,729 lucene-sandbox-4.7.0.jar 11/23/2015 08:11 PM 108,362 lucene-spatial-4.7.0.jar 11/23/2015 08:11 PM 388,864 mail-1.4.jar 11/23/2015 08:11 PM 78,814 orientdb-client-2.1.6.jar 11/23/2015 08:11 PM 3,076,168 orientdb-core-2.1.6.jar 11/23/2015 08:11 PM 79,969 orientdb-distributed-2.1.6.jar 11/23/2015 08:11 PM 39,918 orientdb-enterprise-2.1.6.jar 11/23/2015 08:11 PM 153,743 orientdb-etl-2.1.6.jar 11/23/2015 08:11 PM 251,064 orientdb-graphdb-2.1.6.jar 11/23/2015 08:11 PM 47,995 orientdb-jdbc-2.1.6.jar 11/23/2015 08:11 PM 99,981 orientdb-lucene-2.1.6.jar 11/23/2015 08:11 PM 187,131 orientdb-object-2.1.6.jar 11/23/2015 08:11 PM 533,385 orientdb-server-2.1.6.jar 11/23/2015 08:11 PM 53,226 orientdb-tools-2.1.6.jar 11/23/2015 08:11 PM 149,692 pipes-2.6.0.jar 11/23/2015 08:11 PM 430,239 snappy-java-1.1.0.1.jar 11/23/2015 08:11 PM 102,177 spatial4j-0.4.1.jar 11/23/2015 08:11 PM 26,514 stax-api-1.0.1.jar |
You said : |
ok... sorry, if i confuses you. I am using JTDS to extract data from SQL server. SerializationException occurs if i include bit data type field in select statement. I hope that it would be clear now. |
ok, as I wrote, I fix the mapping problem for BIT type. We are going to release 2.1.7 that will include the fix. It seems that the official MS driver maps BIT data type on db side to BOOLEAN data type on JDBC side. Can you try with this driver? |
sure... facing some network issue. Once it fixes, I will try it. |
I am not able to make connection using MS JDBC driver. I got the similar problem with JTDS but somehow i managed to make a temporary fix in my code. Not able to break it in case of MS JDBC driver. For me, it looks like there is some issue in class loading. Caused by: com.orientechnologies.orient.core.exception.OConfigurationException: Error on opening database: the engine 'jdbc' was not found. URL was: jdbc:jtds:sqlserver://127.0.0.1:1433/mydb. Registered engines are: [memory, remote, plocal] Here is simple example: I am making simple SQL SERVER db connection here.. My classpath has two jars OrientJDBC jar and JTDS JAR.
But gets following exception Dec 04, 2015 1:47:11 PM com.orientechnologies.common.log.OLogManager log If i look at stack trace carefully, DriverManager.getConnection should invoke JTDS driver class but it invokes OrientJdbcDriver. Why? |
any update over it? |
I'll check tomorrow |
I'm on that right now. |
ok, problem found and solved. If you need the Orient JDBC, you need a new jar with the fix I've made. But I'm confident you don't need it. |
As i am writing a custom ETL utility to get data from SQL Server to OrientDB, i need both. I reduced the code to tell you, what exactly is happening. |
please re-open it. it's not solved. |
So you don't use the ETL anymore, am I right? |
yes, i don't use ETL anymore. I will download and rebuild source. thanks |
I am writing a custom etl to export data sql server to orientdb using jtds driver.
Class.forName("net.sourceforge.jtds.jdbc.Driver");
String url = "jdbc:jtds:sqlserver://127.0.0.1:1433/mydb";
Connection c = null;
try {
c = DriverManager.getConnection(url, "user", "password");
}
Exception in thread "main" com.orientechnologies.orient.core.exception.OConfigurationException: Error on creating ETL processor
at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.java:242)
at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.java:153)
at com.orientechnologies.orient.etl.OETLProcessor.parseConfigAndParameters(OETLProcessor.java:143)
at com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.java:107)
at DBConnection.main(DBConnection.java:71)
Caused by: com.orientechnologies.orient.core.exception.OConfigurationException: [JDBC extractor] error on connecting to JDBC url jdbc:jtds:sqlserver://127.0.0.1:1433/mydb' using user 'user' and the password provided
at com.orientechnologies.orient.etl.extractor.OJDBCExtractor.configure(OJDBCExtractor.java:75)
at com.orientechnologies.orient.etl.OETLProcessor.configureComponent(OETLProcessor.java:460)
at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.java:206)
... 4 more
if i am trying to run OETL utility, i got the similar exception.
The text was updated successfully, but these errors were encountered: