I was using sqlunit to Test Store Procedures for Sybase 12.5.
seems Sybase Jconnect not implement connection.getTypeMap() yet.
anybody knows how to use sqlunit to test Sybase.
thanks.
sqlunit-flat:
[sqlunit] *** Running SQLUnit file: test/sybase/MyTestProcTest.xml
[sqlunit] Getting connection(DEFAULT)
[sqlunit] Cannot build Connection (connection-id=null) because The method com.
sybase.jdbc2.jdbc.SybConnection.getTypeMap() has not been completed and should n
ot be called.
[sqlunit] sqlunit-ant: Cannot build Connection (connection-id=null) because Th
e method com.sybase.jdbc2.jdbc.SybConnection.getTypeMap() has not been completed
and should not be called.
[sqlunit] Cannot build Connection (connection-id=null) because The method com.
sybase.jdbc2.jdbc.SybConnection.getTypeMap() has not been completed and should n
ot be called.
BUILD FAILED
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
SQLUnit has been used in the past to test Sybase, there are some examples under test/sybase which may help. Also, I dont think getTypeMap() is called when the connection is being built (where the error message is coming from).
Can you check to see if the driver is correctly specified? Compare it to the examples.
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if I create connection object in the application and pass it to sqlunit, it works fine.
but if I put connection information in the XML file, I hit this problem.
yes, I was using examples included in the package.
thanks,
-dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, this was a recent addition, and I did not notice it. It has to do with support for UDTs which has been recently added.
So the patch I have is to check to see if UDTs have been specified, and only then get the TypeMap for the connection. In case there is an Exception (such as the one thrown by JConnect), then it will give you a warning message saying STRUCTS are not supported.
The following files have changed. Can you download these, recompile locally and let me know if the errors fixed?
Commit log:
Checking in src/net/sourceforge/sqlunit/handlers/StructHandler.java;
/cvsroot/sqlunit/sqlunit/src/net/sourceforge/sqlunit/handlers/StructHandler.java,v <-- StructHandler.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/net/sourceforge/sqlunit/handlers/ConnectionHandler.java;
/cvsroot/sqlunit/sqlunit/src/net/sourceforge/sqlunit/handlers/ConnectionHandler.java,v <-- ConnectionHandler.java
new revision: 1.11; previous revision: 1.10
done
Thanks
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It appears that the fix for this did not make it into version 5.0. Version 4.9 does not call getTypeMap when building the connection; however, version 5.0 does and it does NOT avoid the call if there is no UDT.
Any chance we can find this fix and get it into 5.0?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was using sqlunit to Test Store Procedures for Sybase 12.5.
seems Sybase Jconnect not implement connection.getTypeMap() yet.
anybody knows how to use sqlunit to test Sybase.
thanks.
sqlunit-flat:
[sqlunit] *** Running SQLUnit file: test/sybase/MyTestProcTest.xml
[sqlunit] Getting connection(DEFAULT)
[sqlunit] Cannot build Connection (connection-id=null) because The method com.
sybase.jdbc2.jdbc.SybConnection.getTypeMap() has not been completed and should n
ot be called.
[sqlunit] sqlunit-ant: Cannot build Connection (connection-id=null) because Th
e method com.sybase.jdbc2.jdbc.SybConnection.getTypeMap() has not been completed
and should not be called.
[sqlunit] Cannot build Connection (connection-id=null) because The method com.
sybase.jdbc2.jdbc.SybConnection.getTypeMap() has not been completed and should n
ot be called.
BUILD FAILED
Hi,
SQLUnit has been used in the past to test Sybase, there are some examples under test/sybase which may help. Also, I dont think getTypeMap() is called when the connection is being built (where the error message is coming from).
Can you check to see if the driver is correctly specified? Compare it to the examples.
-sujit
if I create connection object in the application and pass it to sqlunit, it works fine.
but if I put connection information in the XML file, I hit this problem.
yes, I was using examples included in the package.
thanks,
-dave
Sorry, this was a recent addition, and I did not notice it. It has to do with support for UDTs which has been recently added.
So the patch I have is to check to see if UDTs have been specified, and only then get the TypeMap for the connection. In case there is an Exception (such as the one thrown by JConnect), then it will give you a warning message saying STRUCTS are not supported.
The following files have changed. Can you download these, recompile locally and let me know if the errors fixed?
Commit log:
Checking in src/net/sourceforge/sqlunit/handlers/StructHandler.java;
/cvsroot/sqlunit/sqlunit/src/net/sourceforge/sqlunit/handlers/StructHandler.java,v <-- StructHandler.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/net/sourceforge/sqlunit/handlers/ConnectionHandler.java;
/cvsroot/sqlunit/sqlunit/src/net/sourceforge/sqlunit/handlers/ConnectionHandler.java,v <-- ConnectionHandler.java
new revision: 1.11; previous revision: 1.10
done
Thanks
-sujit
It appears that the fix for this did not make it into version 5.0. Version 4.9 does not call getTypeMap when building the connection; however, version 5.0 does and it does NOT avoid the call if there is no UDT.
Any chance we can find this fix and get it into 5.0?
Hi Sujit,
it works fine now.
Thanks,
dave
Hi Dave,
Thanks for the update.
-sujit